Failing to find an answer, I wrote this with Billy and Miles: https://dlnext.acm.org/doi/abs/10.1145/3366016

From the abstract:

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).

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.

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.

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.


How can I make database normalization more clear?

There are some things you can only "get" by having repetition wear it into your brain.

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.

Then, step by step introduce the normal forms, and look at how much easier updates are at each step.


Looking for puzzle/game programmes, so students can write solvers

There is a fairly well known game called, alternatively, Hare and Hounds or the French Military Game. 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 "trap" the Spy. The board is a directed graph with limitations on movement.

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 "win" for the Spy if it plays correctly.

A Java program for the automated version can be found at the Green Room. The implementation can use either arrays or Collections.

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.

The game and its solution are also discussed in detail in Beyond Karel J Robot by J Bergin.


Principles of Compiler Design v/s Compilers: Principles, Techniques and Tools by Aho, Ullman

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).
I now prefer Grune:
"Modern Compiler Design", Grune, van Reeuwijk, Bal, Jacobs, Langendoen, Published by Springer 2012. ISBN 978-1461446989
But choosing books to recommend to students is a very personal thing and others may have other choices.

I learned from the 1971 classic "Compiler Construction for Digital Computers" by Gries, but not something you can use on a modern course!


Good beginning assembly language for teaching about stack function calls

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 "home-brew CPU" 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.

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 "real" program off the Internet.

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.


What should be included in student portfolios for CS?

The answer is Yes, but be careful.

As far as employment goes, no recruiter is going to want to go through a student's completed homework.

Professional Portfolios do NOT include practice

However, these students are not professionals. Keeping a website to showcase their practice and skills is good. It's good practice.

When these students graduate, the skills they learned in developing a practice portfolio will help them build a professional portfolio.

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.

Here are a few random tips:

Practice portfolios might help with college recruitment.
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.
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).
Having a website portfolio is also a good place to show off soft skills in writing and communication.
Make sure to get good information to help the students. This is serious stuff. A bad portfolio is worse than no portfolio
Include the project and technical details for portfolio items. Don't include tests, reflections, or "what I could have done better". 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.
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 "thought of the class", or even "what I learned". Portfolios are demonstrations, not promises.
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.
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.

I'm going to add to my answer, as you seem to have a lot of misconceptions about what a portfolio is.

A portfolio is a concise collection of tangible projects created by or in part by the author of the portfolio

Classes, tests, homework, personal reflections, etc do not belong in a portfolio. Not even a practice portfolio. Do NOT do this, please. This is the opposite of the real world.

No one wants to read about someone's entire educational experience. Ever. Not to say it isn't useful information, but that's what interviews are for. Interviews go over the candidates experiences.

Please remember that resumes are promises of your skills. Portfolios are demonstrations of skill. Interviews are insights into experiences and live demonstrations of skill.


Simple, Compact, Rounded Definition of the term "Programming Construct"

Rephrasing

  a language construct is a part of a program that does some special work

This is indeed too vague. First of all, every program is built specifically to do a particular job. "Special" is subjective, often synonymous with "custom tailored" and thus any program can be called a "special work". By logical extension, any part of a program is therefore part of that program's special job.

The quickest (but not perfect) fix here would be

  a language construct is a part of a language that does some special work

It's still too vague, but it hits the nail more 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.

More specifically, I would define a language construct as a predefined operation of the language, i.e. it is not something that developers must build for themselves.

Learners don't yet grasp the big picture

...by semantical definition of what a learner is.

  I could not come up immediately with something more accurate YET WITH LANGUAGE SIMPLE ENOUGH to be at his vocabulary level!

In software development, where everything is so abstract, you only understand a given name (= dictionary entry, vocabulary) when you understand the underlying concept. If your friend does not have a particular word in their vocabulary, they do not understand the underlying concept.

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.

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 show that he knows it.

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.

Overly complex definitions

  “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.”

This sounds like a quote from the Architect in The Matrix, who is often ridiculed for using near-nonsensical liguistic complexities merely as an affectation.

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.

Languages vs frameworks

  Considering it, shall we say class, object, structures, hash tables and such are not programming constructs?

A language is different from its framework, and this is a very important distinction (that your friend may not understand yet).

Take the example of C# and the .Net Framework. IEnumerable<T> is part of the .Net framework, it is not part of the C# language. However, interfaces and generic type parameters are part of C#.

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:

The language provides language constructs and a syntactical definition
A framework extends functionality by creating additional predefined concepts which rely on the language constructs
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.

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.

At a base level, a language is globally pervasive whereas a framework can be avoided selectively. For example, I am able to write my own IEnumerable<T> as long as I avoid namespace conflicts with my framework's IEnumerable<T>. Good practice suggests I don't do this, but I am technically able to do so.

However, I am never able to use for or switch 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).

Education through 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

When you drill down into software development, things become more complex, not less. The diligence you are putting effort into is what is leading you to the increasing complexity.

Ask a beginner programmer what a "hello world" 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 "hello world" application.

  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.

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.

The vast majority of good developers I've worked with are all "hands on" 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.

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 without misinterpretations if you don't have practical experience to rely on. It's not impossible, but it is highly improbable.

  Just a lucid, compact and rounded definition at the vocabulary level of a high school student not explanations please.

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.
You can teach a child to blindly accept and parrot the symbology of 1 + 1 = 2, 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 2 + 2 or 1 + 1 + 1 as they cannot apply the general concept of addition as they have not yet understood it.

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.

Abstractions stem from practical applications, not the other way around

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 resulting proof that they have understood what a language construct is.

Don't pour your effort into definition. Pour your effort into practical experimentation. The definition will naturally come from your practical experience.


How important is "delivering the content" of a course?

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 assuming knowledge that the student doesn't necessarily have.

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 your students won't know it. However, something to consider:

What is the goal of your course? To ensure that your students know the material so that they can build on it, or to encourage your students to apply their knowledge?

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.

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).
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.

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:

  How can we represent pairings between two variables in a data structure? Can it be done in $\mathcal{O}(1)$ time?

Instead, a lot of the time, the content is just 'fed' to the students directly.

  Here is a hash table. It does X, Y and Z. It is useful because W.

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 you could spend years rediscovering things that are already known, and sometimes just telling allows you to move on more quickly.

Removing 'the content' completely from the course would essentially render it pointless—if there's no goal ("in this course, we will learn X"), the course wouldn't really seem to help anyone.

As a summary of my views: delivering the content is practically a requirement 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 as much as they could.


What part does formal Ethics training play in your curriculum?

I hadn't really considered teaching this, but one could use the ACM Code of Ethics and Professional Conduct, and simply talk through the major points. I looked at the General Moral Imperatives section and it basically boils down to the usual ideas about "doing what you would want to happen" 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.

To answer your questions: There is some "soft skills" 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 "the things we used to assume everyone already knew." Where and how they used to learn it and who is failing in their responsibility, I do not know.

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.)

In this reference - Stanford panel debates: Does teaching ethics do any good? - they ask, "can something as personal as ethics be taught in a classroom?" 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.

It also says, "teaching students social psychology, rather than moral philosophy, is one of the most effective ways to make them more responsible social actors." I would agree. Finally, one participant said, "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." 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?


Explaining how an Interface is a contract

This answer draws on Java examples.

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.

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.

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.)

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.

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 "Triangle and Rectangle don't implement the Comparable interface" or "Triangle must implement Comparable.compareTo" or something like that.

Inevitably, many questions about how compareTo works or should work come up. I explain -1, 0, 1 for <, ==, > 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.

When trying to nail the point, "Always program to an interface," my go-to example is the List interface. I say "Because it's easier to maintain later. If you change the interface, the compiler will require you fix all the implementing classes." 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.

... and right before I think they get it, time demands that we move on to something else. Hopefully some later assignments revisit the interface.


Does it make sense to write tutorial when content of the tutorial can be already learned from internet without that tutorial?

Well, I'd suggest you should, for a couple big reasons:

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.
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.
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.


How might I structure an assignment with two "levels"?

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.

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.

The easier one had something to do with hash maps or such.

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.

They were weighted and graded the same. There was no benefit to the harder one other than learning.

But the students were eager to learn and that made it possible.

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.


How can we educators improve a lot of the negative behavior within the CS community

I reject a lot of the assumptions implicit in the question. Computer science isn't just for geeky or "smart" students. And I don't think it's fair to say that students in other classes are "more expressive, outspoken and creative." 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.

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?

Things to consider:

How are you "advertising" 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?
What types of programs are you using in your lessons? Are they "boring" command line applications, or are they interactive and visual?
What types of programs are you assigning for homework? Do they encourage students to express creativity?

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 "non-traditional" backgrounds. More things to consider:

Are you "making room" for students who often get drowned out by louder or more active students? "We've heard from Grace already, why don't we give somebody else a chance to answer?"
Are you recognizing the work done by every student? I'd like to show you all a really creative example of how Ada used for loops in the last homework assignment...
Are you calling out bad behavior? Are you encouraging good behavior? 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?

These types of change have to start with you. 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.


I let the kids cut and paste code but with the following caveats:

They must cite the source (be it a classmate, another student or a site like StackOverflow)
There has to be enough of their project that is their own code to show mastery of whatever the assignment's all about
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


What are the essential ideas that students need to know about Artificial Intelligence?

Computers are stupid
Do some role playing.
Have students describe how to draw a house, they can not use house words, just geometry words: line, square, triangle, etc.
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, but not what the mean).
Dangers of AI
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.


Teaching with just a single Makey Makey and Sphero

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.

Since you have one Sphero, you might want to try something like CodeSnaps 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.

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 "making" 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 Facebook Makey Makey Educators Group.


Attempting to prevent learning of poor techniques when self-teaching

I think there are two phases here: the first is just being aware of what the correct idioms and best practices are, and second is attempting to apply what you learned and getting feedback.

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 "feel" of a language:

"X best practices"
"X style guide"
"X idioms"
"X common mistakes"
"X philosophy"
"X ecosystem overview" (or "X popular 3rd party libraries")
"X tips and tricks"
"X history"
"X advanced features"
"X linter"
"X style checking tools"

(Replace "X" with the name of the language. If the language name is common word like "Go" or "Swift", try replacing "X" with something like "Go language".)

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 "lay of the land". 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).

Other things I personally find helpful is to browse through the top-voted questions about a particular language on StackOverflow or SoftwareEngineering.SE (previously Programmers.SE). The knowledge won't be immediately useful (or sometimes comprehensible), but it does 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.

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 http://reddit.com/r/python 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.

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.

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.

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 are a few things you can try.

One resource to try is CodeReview.SE, though it's probably best to submit relatively small programs for review.

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 "open source for beginners" -- that reveals plenty of resources and websites that attempt to connect projects looking for help with beginners.


Seeking advice on mentoring without participating in exam cheating in the new chaotic environment of the pandemic

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.

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.

My guess is that at this point, most cheaters who wish to hide what they are doing will give up on working with you.

(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.)


Would you mentor other people for free/voluntary donations?

I is hard to give a sufficiently nuanced answer to this question. There are many factors. I will try to give my own perspective.

First, I give away a lot for free in this forum and in others, both within the SE framework and to the SIGCSE and APCS communities. So, my basic instinct is to be generous with my skills and experience.

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.

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.

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.

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 "investing" a lot of money and want a good return and will therefore "invest" a lot of effort.

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 "invest" 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.

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 faithfully on the web.


How many of "The Seven Laws of Teaching" are still relevant for teaching computer science today?

These "laws" mostly reflect how people learn, so they are still quite relevant.  But going through:

("Know thoroughly and familiarly the lesson you wish to teach; or, in other words, teach from a full mind and a clear understanding") is interesting in a CS context, since we often don't have fantastic knowledge of the material, because it is so new. We have a question about that which has some interesting discussion on teaching what you don't really know.

("Gain and keep the attention and interest of the pupils upon the lesson. Refuse to teach without attention.") 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, "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."

("Use words understood by both teacher and pupil in the same sense—language clear and vivid alike to both.") This is (I hope) always the goal of communication, no?

("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.") This is surprisingly controversial.  (Consider Anthony Gregorc's learning categories)  However, it pretty well reflects what we know about how the brain learns.  (See the section on encoding), 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.

("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.")  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.

("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.")  Other than the controversy I mention in #4, this is clearly good teaching in any topic.

("Review, review, REVIEW, reproducing correctly the old, deepening its impression with new thought, correcting false views, and completing the true.")  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.

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.


How do you wow second-year students into saying "bare-metal programming is cool!"?

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.

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 & did some talking with friends in the know and some research.

Here’s the widow’s mite I pieced together. Hope it helps:
You can add the following to your first lab “sales pitch’:

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:
Add to your spiel, a history of Assembly telling them of Kathleen Booth & others etc. Make it interesting. Search & 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).
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.
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:
https://spectrum.ieee.org/geek-life/reviews/three-computer-games-that-make-assembly-language-fun.amp.html

https://www.quora.com/What-are-some-cool-assembly-language-projects-I-can-do?top_ans=21546329

https://brianslam.wordpress.com/2014/04/06/assembly-is-fun-sort-of/

https://news.ycombinator.com/item?id=16710543

This one is a Compendium of Assembly Coding Practices from Coding Project. It may help illuminate your teaching:
https://www.codeproject.com/Articles/1116188/40-Basic-Practices-in-Assembly-Language-Programmin


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.

However, the real problem is that "what is elementary" 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 first. 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.

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.

But there is also a larger issue of program structure - what you imagine the nature of computation to be. These are even more "elementary", 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).

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 "model" of computation can be simulated this way. I point you to Greenfoot, for example, and it's companion teacher's site the Greenroom. The latter has a large number of such simulated programming "worlds" that can be adapted to teaching novices.

I don't mean to discourage you, but ask you to consider that the problem is bigger than you imagine and your "solution" might only apply to a small part of the whole landscape.


How can we determine which students are a good fit for an educational program?

tl;dr Approximate the "real world" practice/environment as the assessment.

Pre-setup

To begin with, I'm going to presume that there is some form or pre-screening, and/or qualification process. I.e.: having taken such & such 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.

In addition, as the program involves working remotely, 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 "private" channel between the mentor and mentee, and a "team" channel. A third channel for all the mentors and mentees to network, outside of the project development would also be beneficial.

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 Keybase and Discord. 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 git and create an encrypted repository outside of GitHub. As a user of both, Keybase would be my choice for a professional development environment.

Assessment setup

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.

Projects could include:

Create a routine to perform this task given parameters of X, Y, and Z and returning t and v.
Given this pre-existing routine, extend it to handle this.
This method, given (one, two, 15, false) should return expected_result, instead it returns bad_answer. Why? Fix-it.

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 "unavailable" 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 "table" that problem and work on another one?

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 "ringer" who already works for the company.

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 "Google is your friend" 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 "answers" 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.

GitHub

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 not doing 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 "reset" 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.


How can I discourage poor design while using automatic grading of submissions?

I am a strong advocate for code interviews.  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.)

For some context, I discuss regularly that there are two audiences of code: computers, and people, and that these audiences have very different needs.

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 mostly creating crystal clear code.

Don't drop that autograder! Even with code interviews, it is still tremendously useful. Having a good autograder means that, during the interview, I only 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.


How to construct non computer-based, Paper Parsons Problem

If you have a metal surface to work on, such as some whiteboards, you can get "magnetic paper". 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.

Search for "magnetic paper" to find several varieties and brands.


Teaching intermediate Java to students familiar with C

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.

There is no reason in a Java course to discuss pointers or the preprocessor. Objects are "referred to" by reference variables, not "pointed to" by pointers. Learn and use the Java vocabulary for things. Once sends a message to an object, not "calls" a method.

In this way, your C students have a leg up on syntax, and the places where the "look of the language" helps them without getting into, likely only partially correct, analogies that may confuse them.

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 "box". 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.

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.


About the ACM and IEEE-CS Computing Curricula

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.

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.

The goal of the committee is to design a "model curriculum" that is appropriate for either advancement to graduate school or to industry employment if a student has, at least, most of the knowledge implied.

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.

Some university CS programs are accredited by ABET, 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.

If your university doesn't have courses in some area, you can ask them what can be done to "fix" that. You can also seek instruction in the missing areas through private instruction, another university, or online courses.


My standard answer for this is the following, copied from another answer I've given here.

If you want a thorough study of how to approach and develop algorithms, get a copy of:
David Gries, The Science of Programming
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.
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.

It shows algorithm development in a way that results naturally in optimized algorithms.
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 "introduction to algorithms" may be a bit shallow, of course.
The gold standard, of course, is the multi-volume The Art of Computer Programming 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.
However, if you are interested in Functional Programming (Scheme) instead, you want to start with The Structure and Interpretation of Computer Programs 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.
In fact, none of these books start with some "algorithm" and say "now, let's optimize it". 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.


How can I remain a programmer and move into currently "hot" areas?

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.

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.

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 "idea department" 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.

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.

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.

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.

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.


How to explain the concept of a variable to a 9-year old?

Buffy's lovely answer 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.

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 "role".

The President of the United States is currently Donald Trump.  (You should substitute the head executive leader of whatever country your child lives in for this example.)  But a few years ago, it was Barack Obama.  Later, it could be Mike Pence, or someone else entirely.  When important things need to go to the president, they go to whoever is the president right now.  They don't go to Barack Obama any more, and some day, they will no longer go to Donald Trump.  But they always go to the President.

So, to put this into Scratch, we can make a String in scratch called President, and then we can use the set box to set President to "Donald Trump".  We can then make an item in the main field that behaves as a button, that changes that variable to [insert your child's name here].

Now, we can create another value, called x, and set that to a zero.  Now, when you press the button, change x by 4, and we can watch the variables change.  Press the button 10 times, and the value becomes 40.

So, what can we say about x?  Sometimes we say that x is 40, but is it really?  Or does it just hold 40?

This is the most important early understanding to arrive at when describing a variable.  When we say that x is 40, what we really mean is that x holds 40.


What are good models for an Honors Program for CS students?

First, I will describe my university's program, and then I will give my thoughts on its efficacy as a participant of this program.

My university makes a distinction between the general "University Honors" program and specific "Honors in the Major" 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.

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.

The other criteria that must be filled is what is called "experiential learning". This involves getting "12 semester hours" 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.

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.

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.


Demonstrating the possible dangers of SQL injection

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 "hack" 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.

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.

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.


Does/should a CS education include information about responsible use of human subjects in research

I would mention it in any class in which it is relevant, such as User Experience or where A/B testing might be used to show different users different versions of a website and measure their behavior. Because such research is ubiquitous (consider Google's testing different shades of blue), Facebook was unprepared for the backlash against their emotional manipulation study.


How to teach Stack Overflow more efficiently?

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:

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.
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?
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 "front-load" your question so you don't waste people's time.
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.)
They're ineffective debuggers and so can't figure out a way to distill their issue into a specific question, even if they wanted to.
They don't know how to gracefully accept criticism and feedback when they inevitably do make a misstep.

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:

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).
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.
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.
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 binary debugging. 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.
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...

(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.)

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 "don't use Stack Overflow". 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.


Conflicting meaning, between exam board / teaching resources, and technical meaning

You are seeing a difference between virtual memory as described to a computer user some number of years ago (this is more frequently called "swap" now), and virtual memory as understood by an operating system developer.

If one goes back and looks at, say... Mac OS System 7, one can see this description:

  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.

Or over in retro computing

  To avoid slow performance, Apple suggests that the amount of virtual memory you select be less than the system RAM.

This is the virtual memory as understood by a user.

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.


Teaching the tradeoffs of the foreach loop

I think the advantages are huge, overwhelming.

They avoid

off by one errors - the bane of the novice programmer
needing to allocate an explicit iterator - avoiding adding names to the namespace.

They enable

thinking about iteration at a higher level than just counting
compact coding

I use them whenever available. The collection knows its members. Just ask it to yield them up. It is a brilliant design.

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.

My preference is to teach concepts from the top-down. Higher level thinking means (in part) "closer to the language of the problem". 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.

I actually try to move even further up the abstraction scale as illustrated in this  post https://cseducators.stackexchange.com/a/1379/1293

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 for and while so that you can teach, say, object-oriented abstraction principles.


How can I teach the students a package/module in a computer lab?

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.

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.

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.


How widespread is the use of the PEP/8 assembly simulator in education?

At Colorado State University we teach the LC3 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.

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.
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).
Hardware - students study hardware using Logisim. They commonly design some of the control for the LC3 machine.

In looking at other schools, I have found several that use subset of MIPS. I hope that helps


Platform for annotating students' code assignments

I was not aware of GitHub ClassRoom as mentioned by @Ryan_Nutt above, but I have been using repl.it for classroom coding exercises.

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.

It is free.  I link to it from Moodle and with the link the class can "join" 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.

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.

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.

Hope this might be of some benefit to you.

Sean.


How to gamify the learning management system

Let's try a rundown of some points in your question, relating them, where possible, to the system that hosts your question. (You already hinted 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.

  Can this idea really succeed with people inclined to study computer topics?

I'm going to give that part a resounding "yes" based on the statistics, including growth, of Stack Overflow. 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*, are inclined to study computer topics and, as I understand the system, the gamification is one key element of retaining users and generating answers.

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 hook for some people, it does not produce significant negative effects either. In addition, while not true for all 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 "gamification"?

  How effective is this for techniques you have used?

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, "active learning" 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 "ladders" 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).

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.
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).

Personal experience from the receiving end. I am not in the "competitive" camp, and usually try to avoid "ranking" 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.

Nevertheless, I have 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.

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.

* Computer Science, Theoretical Computer Science, and Software Engineering are among the obvious exceptions to that qualification.


Need review of course content: Javascript History and Capabilities

I think this answer is the second derivative.
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.
I'm teaching an introductory course on web tech right now at Ashesi University; 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.

In the beginning the web was focused solely on structured markup.
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.
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.
Netscape embraced Java; and began writing much of their software in it.
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.

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).
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.


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.

For me it takes two things.

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.

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.

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.


Intensive basic VBA course - which variables to teach?

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.

Teach them stuff that is useful. Date, Currency (Don't use float types for currency, it will cost you your job, and someone a lot of money), Decimal (A float type with base 10 radix: it has less unexpected behaviour), and string.

Integer has some value, but manly for performance. If when doing loops you use foreach, then integers are not needed. Also looping is simpler and safer.

Booleans are only needed when doing conditionals, and conditionals are over used.

In addition:

Static or dynamic

If you teach not to declare types first, then that is what you will get.

Assignments

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.

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.


I highly recommend this tutorial: http://learngitbranching.js.org/

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.


How to communicate expectations around "rabbit holes"?

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.

It is hard to condemn such students, of course. They were very clever. They learned something. But the worry is that what they learned helped them avoid learning something else that may be more important in the long run.

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.

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.

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.


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.
An Excerpt From CLRS

What are the prerequisites for reading this book?

You should have some programming experience. In particular, you should understand recursive procedures and simple data structures such as arrays and linked lists.

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.

From a OpenCourseWare course thought by Prof. Charles Leiserson (The L in CLRS) based on CLRS in Fall of 2008

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.

Prerequisites: A strong understanding of programming and a solid background in discrete mathematics, including probability, are necessary prerequisites to this course.

These are the prerequisite courses recommended for Introduction to Algorithms

6.001 Structure and Interpretation of Computer Programs

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.

6.042J / 18.062J Mathematics for Computer Science

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.

Professor Cormen's answer on this subject

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.

More of Professor Cormen's answers

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.


Are programming contests beneficial to students?

Programming contests are useful for some students in some contexts, but they're harmful to other students in other contexts.

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.

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 less likely to participate in these, and requiring them to participate can actually discourage them from pursuing computer science.

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 "competition code" that you mentioned in your question.

I'd also recommend focusing on "hackathons" or "game jams" 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.


Popular demonstration of cryptographic tools

There are some engaging lessons on encryption in Unit 4 of the AP Computer Science Principles curriculum from Code.org.  Lessons 5, 6 & 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 (https://studio.code.org/s/csp4/stage/5/puzzle/2 ) and vigenere cypher (https://studio.code.org/s/csp4/stage/6/puzzle/2 ).  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 (https://curriculum.code.org/csp/unit4/ ). The materials are free to access.