Are There Exercises To Build Software Development Research Skills? Would anyone refer me to exercises or resources to help learners build their research skills?  I mean I'm trying to get learners to think in terms of solving their own problems before bothering other, more senior, developers. Part of solving their own problems is knowing how to google for potential solutions--how to research.

Does anyone know of exercises I might use as learning activities to reinforce this skill?

EDIT:

This is for a work training situation.

This article contains advanced google options to refine searches, you could make them into exercises for a work training simulation using Jupyter Notebooks such as "Search for stackoverflow intext: ag-grid AND module.ts", or exercises to walk git branches to become more familiar with the project.

You could also teach them to create a personal database of questions they've already asked, and how to search it, just so they aren't asking senior developers the same question twice.


Courage to Attack Difficult Questions In a recent blog post Eugene Wallingford says that when teaching:

I frequently pose a problem for them to work on for a few minutes before we look at a solution, or several candidates, as a group. All too often some students look at the problem, think it's too difficult, and then just sit there waiting for me to show them the answer. This approach often results in them feeling two kinds of failure: they didn't solve the problem, and they don't even appreciate the solution when they see it.

There is a double problem here, The first is that some students don't attempt to solve a difficult problem - giving up early. This leads to the second problem of not recognizing the beauty of the solution once they see it.
How can we encourage/enforce/demand/cajole students into making a good faith effort on a difficult problem without making them feel defeated at the end?
Often the exercises we give students have a learning objective that is more important than the actual solution to the problem. Learning is to be valued over solutions in a teaching environment. But students don't always see that and can be led to think of themselves as failures even when they work hard toward a solution (Authenticity Bias). We need to find ways to avoid that outcome while we encourage hard thinking.
The big idea here is that the effort to find a solution, even if it goes down an unprofitable path, will lead to learning. The practice of "stretching your brain muscle" is wort pursuing.
One Pedagogical Pattern was originally named Kobayashi Maru after a training exercise that was central to a certain Star Trek episode. In this pattern, the idea is to give students an impossible task to give them practice in very hard problems, possibly requiring orthogonal thinking. (The pattern was later re-named to Mission Impossible). That isn't exactly the same issue here, where we are looking to encourage deep thinking on deep but solvable problems.

This issue is not just about programming. It can be anything. For example a complex database design issue or a complex retrieval. Or in Compilers, some optimization issue that needs to run fast. Lots of opportunities for hard problems in any class.

I think this is a pretty common problem, especially for novice programmers. They're given an assignment and don't know how to start- in fact, they don't even know what it's asking!

I don't think this is due to a lack of "courage" - it's because they don't have the framework required to start breaking problems down yet.

I think step one is to normalize this a bit, and specifically mention that this is a common way to feel. Then walk them through the process of getting over that initial hurdle. What behavior do you want them to exhibit? Model that behavior for them.

I try to encourage people to break their problem down into smaller steps and take those steps on one at a time. There are a lot of approaches here, including:

Restate the problem in your own words.
Break the problem down into logical sub-steps.
Identify your input and output.
Think about how you'd do this without a computer, with a piece of paper and a pencil.
Do the absolute smallest thing you know you need to do, like open your IDE, or write the class or function declaration.

Another thing that I think is important is demonstrating this behavior yourself. A lot of lectures and tutorials cover the happy path of developing code. Students see how easy it is when you do it, and then get home and don't know how to start and think that must mean they're terrible programmers. In fact every single programmer feels this way, so it's important that they know this. So I recommend doing a live demo of working through a problem, including stuff like using Google, looking stuff up in the reference, making mistakes, debugging, etc.


Is there a word for mathematics/physics/data-analytics/....? I'm trying to categorize university courses of the department of computer science and electronic engineering.

Such courses may include:

Data Analytics and Machine Learning
Computer Science and Physics
Computer Science and Mathematics
Cyber Security (NETWORKS CATEGORY)
Computer Science and AI (COMPUTING CATEGORY)
...

With this small list of courses, if I were to combine courses in categories, what would be the best word to use for 1/2/3

UPDATE:

I did some research and found out that science can be separated in Pure Sciences and Applied Sciences.

Pure Science includes:

Physical Science (Physics, Chemistry, Astronomy)
Earth Science (Geology, Oceanography, Paleontology, Meteorology, Petrology)
Life Science (Botany, Zoology, Genetics, Medicine, Nuitrition)

But I'm not sure where TECHNOLOGY (Computation, Engineering, ...) belongs as well as ARTS?

Sciences of the Artificial

There are many ways to categorize the sciences.  Herbert Simon (Nobel Prize winner, pioneer of artificial intelligence as well as economics, organization theory, etc.) wrote a book-length essay called The Sciences of the Artificial to make a case for why the "applied" sciences have a rightful place in academia.

In The Sciences of the Artificial, Simon laid the foundations for a philosophy of the artificial and a science of design. Artificial (i.e. “man-made”) things surround us. They are constrained by physical laws and, if we want, we can study them “objectively” using the natural sciences: for example, a physicist could take an airplane as a given and study the way it is affected by the flow of wind. But this doesn’t really capture the whole truth of the artifact. An artifact such as an airplane also embodies certain goals that we need to grasp if we are to understand it.

  “If science is to encompass these objects and phenomena in which human
  purpose as well as natural law are embodied, it must have means for
  relating these two disparate components.” (Simon, p. 3)

An artifact for Simon could be seen as a meeting point between an “inner environment”, the way the artifact itself worked, and an “outer environment”, the problem it addresses and the context in which it operates. The relationship between the inner and outer environments is where we find human purpose. A problem solver, engineer, or designer is someone who tries to make the inner environment appropriate to the outer environment. For example: for the inventor of an airplane, the outer environment is characterized by the known laws of gravity and air pressure. He makes choices about the inner environment (the materials to use, the type of engine, and so forth) in order to achieve a goal—flight.

"Goals" as subject of study

For a while I did a lot of reviewing papers in the "design science" domain in my academic field.  Somewhere in all of that material (I can't remember the author) I came across a categorization of the sciences that used the relationship between the science and human purpose:

The physical sciences such as mathematics, physics, chemistry, pay no attention to human goals.
The social sciences such as psychology, sociology, economics, study human motivations as natural phenomena, but are indifferent to them.
The design sciences or sciences of the artificial such as architecture, engineering, medicine, business, allow researchers to take sides, to work on important human goals.  They study problems as perceived by humans, and they study solutions, both using scientific methods.


How to raise students' security awareness in programming? My first website with a login form had the password hardcoded in the JavaScript code, and if the entered password matched it would redirect to a private URL that was just not linked anywhere, but still public if anyone knew the URL, and yes, that URL was also hardcoded in the JavaScript code.

So in terms of security this was basically a "Do not read" banner, with the "private" content just written below it.

Now, this is just a specific example of me not knowing any better in the early days of web development. There are many other domains in programming where you might introduce vulnerabilities if you don't think about what you're doing.

Is there a generic technique to teach students to keep an eye on their code's security, maybe trying to get them into figuratively hacking their own programs and exploit vulnerabilities?

Make it into an assignment/game. Each student creates a project that is passed to another, randomly chosen student, to hack. Give points for both the project and the "hacking" results. The hacking assignment should also be graded.

Security has to be taught and the value learned, usually painfully. I have lived through many "no one will do that!" only to have a product, or network, broken because someone did.


A category to classify expressions, statements and blocks I was teaching an intro to Programming class, full of social scientists. After explaining that the basic building blocks of a program are called tokens, I took them through Keywords, Identifiers, Literals etc.

I was asked a question. And have been reading to find answers in books and online.
They asked if we group the basic elements of a program under the word "token", then what word groups the other program elements. e.g. expressions, statements and blocks, that are derived from tokens?

Help with a reference or a term that classifies these constructs as a group.

This is a surprisingly complex question. In many languages one can distinguish between commands and expressions. A command is something that changes the state of the computation. An expression is something that returns a value, but doesn't change the state. This is actually a good mental model even in languages that can confuse the two ideas in small or large ways.

Some languages consider statements to be commands, but in C, for example, an assignment statement is also an expression that has a value equal to the value assigned to the variable on the left. That may or may not be the value of the expression on the right, actually, as when a short is assigned to a long.

Likewise blocks can either be commands or expressions in most languages. A function block is an expression, returning what the function returns (more or less) but it can also have command-like properties if it changes the state generally, say by modifying a non-local variable. But the if-clause in an if statement is usually just a command.

So, I don't think there is a single unifying category for all three of your items, but the distinction between commands and expressions is useful.

It is useful for another reason as well. In C a "function" can return a value or not (void functions). But programs are easier to understand if a function that returns a value does not also change anything in the non-local state. Then functions when invoked will be either expressions (the value returned) or commands (the state changes) but never both.

But C also has a distinction that even command-like functions often return an error state indicator, zero if there are no errors. So common practice gets in the way of the useful rule in the paragraph above. C++ can use exceptions instead of error codes, of course.

But in more "modern" languages, the distinction between expressions and commands is maintained with a bit more clarity. Java, for example.


What belongs in a low-math undergraduate AI elective besides ML? The primarily undergraduate institution at which I teach does not have an Artificial Intelligence course. We do have classes on Data Analysis and Machine Learning:

DATA 150: Introduction to Data Analysis (4 Credits)
Data analysis is the extraction of knowledge and insights from complex
data. This course introduces the concepts, issues, and techniques of
data analysis. Topics include data cleaning and preparation, feature
selection, association rules, classification, clustering, evaluation
and validation. Tools implemented in R and Python will be used to
explore data sets using these techniques.
CS 141: Machine Learning (4 Credits)
This course provides a broad introduction to machine learning and
statistical pattern recognition including both supervised and
unsupervised learning from a computational perspective. Topics include
generative/discriminative learning, parametric/non-parametric
learning, neural networks, support vector machines, clustering,
dimensionality reduction, and kernel methods. Additional topics as
time allows.

It's been a long time since I was in school, and even then my knowledge of AI was pretty eclectic. What belongs in an undergraduate AI course that is not covered by the above two courses?
A constraint is that we do not require Calculus in our program, and most students have only had discrete mathematics. (While the above classes nominally have Linear Algebra and/or Calculus-based Probability and Statistics as prerequisites, we sometimes waive those requirements.)

I took both the AI and (basic) ML undergrad courses at Princeton and currently teach an AI elective at the HS level for some very bright students. I've seen some good online material from Berkeley (CS188) and MIT (6.034), and of course Stanford's ML lecture series is amazing. Russell & Norvig's textbook is basically the bible for these sorts of courses.

From what I've seen, AI undergraduate courses have changed a lot in the past decade to focus on ML, since much of the recent breakthroughs and publicity are in those areas. AI is a very broad and historically rich field beyond just Data Analysis or ML. I would say a comprehensive AI course would start from Alan Turing's classic (and often misused) Turing Test and ground itself in an ongoing definition of rationality as effective problem-solving.

From there, there are lot of "classical" AI fields that are very approachable without any calculus; most of their discrete algorithms are intuitive, and you can wave your hands and say the continuous (calculus-involving) counterparts are basically the same idea. Here's my shortlist of essential first topics:

Goal-based state-space searching algorithms (e.g. DFS, BFS, Greedy, A*). These are a great start since the notion of searching is very universal and lays the groundwork for the next two:
Adversarial Game-playing AI (minimax and alpha-beta pruning)
Constraint-Satisfaction Problems (ARC-3, backtracking search) and/or Boolean SAT (DPLL, WalkSAT).

These three areas form my HS curriculum, and provide really rich applications and philosophical fodder ("is this how rational humans think? Is it intrinsically better, or worse, or completely unrelated?")

Some courses might go from these topics into Bayes Nets and/or Hidden Markov Models, though I think this leans math heavy since its all about probability.

Usually by this point AI courses have become more or less completely focused on ML, often starting with k-means clustering, basic classification/regression using perceptrons or decision trees, ensemble learning/boosting, reinforcement learning (usually in the framework of Markov Decision Processes), and maybe deeper neural networks.

EDIT: A follow-up; my course has now changed its third unit topic from CSPs/SAT to Markov Decision Processes (Value Iteration and Policy Iteration) and Reinforcement Learning. Its more exciting, leads into ML, and flows out the Adversarial Games nicely because of the shared concept of finding a "policy", especially if Expectimax is covered.


How to "teach" CSS for students? I have been an expert & mentor in HTML, CSS, JavaScript. When it comes to teaching new students on how to program using JavaScript, it is straight forward. Students can learn that if you do certain actions, you will be able to get the things right. But often I struggle with teaching CSS or design.

They are extremely good with HTML structuring and JavaScripts, but when comes to CSS laying out and the "creative" and "design" part, I am not sure how to train them like how I am experienced. Has anyone been through this and is there a way to really "teach" design sense and creativity in CSS?

If you are struggling with "design" and "beautiful" and artistic mumbojumbo, you can still teach CSS while avoiding trying to turn them into pro designers.

The simplest example task I can think of is having your students create a simple website with a basic style and another style for the visually impaired (and a button to change between the two styles).

If that is done, you can have a contest/assignment: you create a simple website (2-3 pages, few images, a menu), and they all have to create 2-3 designs for it in CSS. Then the class can vote for their favourite. Another upside is that finally it won't be the geeks but the artists in the class that shine.

As for teaching design and creativity, why not ask the help of the art teacher? Maybe you can put together a curriculum for a few classes together? You are a programmer, not a designer, and it is OK to admit it.


Overcoming a friend's self-discouragement Before I turned 19 I just kind of... fell into coding. I used to think programming was something incredibly hard that only child prodigies and people with a 160+ IQ could do. (A view often reinforced by Hollywood stereotypes.) And I thought that I just wasn't smart enough.

Since getting into programming,${}^1$ I have learned that even a monkey could take up coding. (Seeing some code, it seems in fact, they do.) This is not evident to many outsiders, however.

I currently have a friend that is about to finish school and she has no idea what to do with her life. I am trying to encourage her to give coding a shot. I know she would be great at it as she's one of the smartest people I know, even if she won't believe it. Just like younger me, however, she thinks she's too dumb to have a chance at coding.

How do I convince her to give it a shot?${}^2$ What tools are there to show her it is much easier than it looks at a glance?

${}^1$I just kind of happened to get into coding via databases, but that is a rather unusual path to take and not one I would recommend to start out with.

${}^2$I don't want to pressure her into a career in programming; if she decides it's not for her, that's fine, but basic coding knowledge is surely not a bad skill to have.

I am not sure if I agree with the "monkey" part! Maybe everyone is capable of writing some code. Building serious apps is another thing...

Anyway, show her the code.org website, and let her play around for a while. If she does not like, then probably she is not fitted for this "monkey thing" :)


Languages class in high school Every year I focus on one of my courses to overhaul a bit. Partly because I'm supposed to have professional goals, and this is one that's pretty easy to admin to understand. But I also get bored teaching the same thing every year.

Right now I've got a third-year independent study course (high school). When I started the job a few years ago I basically just continued what the previous teacher was doing. Students propose a project during the first two weeks and then have the year to build it. The biggest catch is that there's almost no accountability for the students.

I'm wanting to change it into a more formal curriculum, and I'm leaning towards a languages class. These are 3rd or 4th-year students that have taken AP-A and Data Structures which are both taught in Java and may have a bit of experience with Python or JavaScript depending on the year.

So with that lead-in, I'm looking for some feedback on the plan.

We do 6, six-week grading terms. The plan is to do a different language each six-weeks. I'm leaning towards doing Python and a crash course in HTML/CSS/JS during two of the terms. And then I'm skimming 7 Languages in 7 weeks and the sequel for ideas on what other languages to do.

They'll have already done 2 years of Java, so I'd like to stay away from OOP and C-family languages as much as possible.

And I'd like it to be project heavy. Maybe one big project per language. I don't want to do many, if any, small lab type assignments.

Any thoughts or tips from those that might have been down this route before?

First, some caveats come to mind. The difference between languages isn't primarily syntax, even languages in the same paradigm family. Once a student has a solid basis of programming in a single language, say Java, they have developed a way of thinking about transformation of problems into solutions. They have ways to assure that their programs are correct and complete. One hopes, at least. Changing to a different language requires that they learn to think in a different way, whether it is small or large.

I once considered applying for a job where the focus was to be on languages (my specialty). They wisely specified in the call for applications "Principles of" not "Examples of".

The basis of my suggestions, following, is to focus on the principles, not the examples. And the principles involve ways of thinking, not syntax. It is pretty common for people moving from one programming language to another to just write in the old style. A Python program that is just "misspelled Java", isn't really a Python program. It isn't pythonic, in the jargon.

In a university curriculum there are often (or were) two courses devoted to languages: Language Principles, and Languages and Compilers. I taught both of these for many years. By the time students take the first course in the sequence they are well grounded in at least one language and have likely seen a couple more, mostly in passing.

I think you are correct in wanting to stay mostly away from other OO languages, except:

The difference between Java and Python (or Ruby) isn't the syntax. It is that Java is statically typed and the others are dynamically typed. If a Java program compiles (and you haven't used casting incorrectly), then it is type correct and will not fail for type errors when running. That isn't true for a Python program since the (still strong) typing is done at runtime, not at compile time. So, one major problem for the Python programmer that isn't faced by the Java programmer, is what tools and techniques (ways of thinking) does the Python programmer need to employ to assure that the (compilable) program they write will actually run to completion.

But, if you want students to learn to think in a different paradigm than what they learned first, you will need to give them time and experience. I think that six weeks per paradigm is probably sufficient if it is done well and fairly intense, focusing specifically on how to think like a whatever programmer.

Some possibilities for languages after OO.

Scheme (Racket) or Standard ML (aka SML). A minor point, but some functional languages use eager evaluation of function arguments (like Java) and others use lazy evaluation. The programming style is a bit different for these two cases.

Modula 2 (or Dijkstra's presentation language) or Oberon. These are for pure procedural programming. Top down problem decomposition, solution of simple problems as procedures, bottom up solution integration.

SQL and the underlying Relational DB theory that underlies it. A really different paradigm. Recent versions are Turing Complete and can be used (awkwardly) as general purpose programming languages. A chance to explore Turing Completeness and maybe even Turing Machines.

Some concurrent programming language. Maybe Rust, which is both modern and a C replacement, Erlang. Or even a data flow language like Swift -- note: That isn't Apple's language of the same name.

Some simple and uniform Assembler Language (not Intel). You need an emulator, though. A simple memory model. A uniform Register set.  Both pdp-11 and MC68000 fit the bill-- more --

Prolog  Logic programming where the program is descriptive, not algorithmic. Actually, SQL has that characteristic also. The algorithms are (almost) all built in.

Perl or bash scripting language

Lots of choices - the list isn't complete at all.

Late in your sequence you could have students work in small groups to produce a report (with examples) on some language of their choice, taken from a list that you supply. You could use a lottery system of some sort to make sure each group has a different language. The language can be wildly different, There are a lot of possibilities. I would probably include R, Self, Processing, Forth or Postscript, Bash, ... -- more -- for my own list. You could also let them make proposals for languages not on your list if they can give you a (written) reason for another language. Don't let them misspell Java, of course. And make sure a processor is available to them for any language.

I suggest that the last few weeks (you say six week terms) would be to summarize what has been learned in the previous segments and make some things very explicit. For example, dynamic v. static typing. You could also give them an idea about what a compiler might look like for a simple language, in particular the separation of lexical, syntactical, semantic, and optimization components of a compiler. A good source for the latter (instructor resource) is Per Brinch Hansen's, On Pascal Compilers. You can probably find a copy in a good academic library. Another good source (again, for the teacher) is David Gries's The Science of Programming. The latter book does an interesting thing beyond its stated purpose, which is to you how an imperative programmer should think in terms of pre and post conditions while developing algorithms. It uses a simple language for exposition that is the same as that used by Edsger Dijkstra in his scholarly papers. A compiler for this language is, like the Hansen book, quite accessible.

You obviously can't do all of this. Nor would a university course. But, I would use at least the following in developing the course.

Choose languages from different paradigms and focus on that - the deep semantics, not the syntax.

Think about all the variations open to the language designer and try to cover as many as you can. Static v. Dynamic typing. Concrete v. Abstract syntax. Strong v. weak typing. Garbage Collected v not. General purpose v. special purpose. Many v. Few abstraction mechanisms. -- more --

In going from one fragment of the course to the next, I'd think about how different the next language is from the previous. Scheme is very different from Java (no syntax, no variable state, dynamic typing,...). SML, at least has syntax and a very interesting type inference system that permits typing at compile time in a functional language.

Summarize at the end. Provide room for a lot of discussion. Have the students write reports and not just programs.


What should be in a CyberSecurity Course in secondary school? When someone says we should teach "cyber security" what does that mean to you? Is it computer science or system management or some mix of the two? What would you include in a course on cyber security that would make it a real computer science course?

The course that I offered was all about gdb, hexdumps, buffer overflows, and format string vulnerabilities.  As a textbook, we used Hacking, by Jon Erickson.
 AP CS A was a prerequisite of the course, though I permitted students to join the class if they were currently enrolled in that course, as long as we had a discussion outlining expectations first.  There were no mathematical prerequisites.

The course was designed with the assistance of a Navy officer. The students practiced fuzzing and hacking (admittedly insecure) programs on old, virtual systems.  This was quite deliberate!  I didn't start by asking, "what will the kids be able to gain entry into at the end?"  Instead, I posed this question to the officer: "High school students are also quite young, so there is little pressure to give them useful skills right now. CTF competitions abound, and my students are already joining those. What is hard to pick up from CTFs, but nevertheless is ultimately quite central? What can we offer them that will help them develop into top minds in this field in the future?"  And that became the central mantra of the course.

Everything was done by hand at a *nix prompt, and they got a fair amount of practice reading and examining hexdumps.  By the end, they could look at a hexdump and see at a glance where, for instance, the text strings were stored.

It was ultimately a computer science course on binary and hexadecimal, on system variables, and on the intricate operations of a runtime stack.  As an additional bonus, they all got pretty adept at navigating a bash prompt.  The students kept asking for network hacking as well, though we didn't have time to get that far.

The material was quite dense and unintuitive.  (Though, I suppose, if these practices were intuitive, they wouldn't have been vulnerabilities in the first place.)  It was an extremely difficult class, although the material itself kept the kids pretty interested, so you will have that working in your favor if you go down this road.


How would you explain what is a race condition to a five years old TL;DR: How would you explain what is a race condition to a five years old. Which analogy to concepts he is familiar with would you use?

Long version:
I am not a teacher but a software engineer. Yesterday evening, while discussing what the day was like with my five years old son I told him that I worked on an annoying bug, that ended up being caused by a race condition. He then asked me what a race condition is.

I tried to explain the concept to him by making the analogy with multiple people all writing a story on the same blackboard. If they all write their story at the same time then one person might start writing over part of a story already written by someone else.

However I think that this analogy was probably not the best because he then asked me which person did “won”. I explained to him that nobody did win because the end result was that the “story” that was written on the blackboard was not making any sense.

He then asked me how did I solved the problem and I told him that I did give each story writer his own blackboard.

So I am looking for a good way to explain what is a race condition to a five years old, ideally without using a programming terminology because that would mean nothing to him.

A lot of race conditions result from improper or unexpected interleaving of processes. Someone that age can probably understand the fable of the Turtle and the Hare.

Give the Hare a ball with instructions to run to a table, some distance away, and leave the ball on the table and return.

Tell the Turtle to go to the table, pick up the ball, and return with it.

Start the two "running" at the same time.

The Turtle has no instructions about waiting, since the proper interleaving is obvious.

Of course, if the Turtle gets to the table first then the process fails.

I'll note that Dining Philosophers isn't a lot more difficult than the above, but probably not accessible to a five year old. Certainly open to one a few years older, though.


How to verify that code you write is not copyrighted anywhere? Is there any guidelines how to make sure that code you write won't be copyrighted anywhere? I meet sometimes situations where I write code that does some particular small thing but there is a similar code on the Internet without licenses. Then I need to think alternative more unnatural solution or how to modify the code more messier to avoid copyright issues.

Don't worry about "similar" code. Copyright is about copying, not about similarity. If you wrote it independently of any other, then there shouldn't be an issue.

But there is also the rule that in some situations there is "only one way" to say something. So if some phrases (or coding patterns) appear in several places it isn't evidence of infringement. The number of ways you can write an iteration through a list is pretty small, after all. Problems recur in computing. So the "natural" programs that solve them also recur.

Also, copyright is about publishing. If you don't publish your code then it won't be an issue either.


About the ACM and IEEE-CS Computing Curricula I've been searching for a detailed definition about what computer science is about for years, when one day I came across these
two documents: Computing curricula 2005 report and Computer Science Curricula 2013.
The latter, more importantly, lists the knowledge areas and their relative content that an undergraduate student in computer science should know.
The content of each knowledge area is divided in core-topics and elective-topics.

What I want to ask is:

1) What exactly are the knowledge areas? Are they the fields of computer science where Ph.D. students can focus their research?
If yes, then how about architecture and organization (AR)? Isn't it the knowledge area where only computer/electrical engineers can focus their research?

2) Is this curricula applicable worldwide or does each country have its own?

3) Some topics are elective. How can I study the elective topics I'm interested in since my university didn't have enough time and resources to teach them?

Any answer will be appreciated.

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.


What is a good design for a Capstone Course in CS? Some Computer Science programs in the US have a course that is informally referred to at a Capstone Course that attempts to bring together most of what the student has learned. The course may be required or not and is usually offered to students just prior to graduation, having several prerequisites.
One possible design is a Project (Senior Project) that may be team based on individual. The student may or may not have an advisor, similar to a thesis course. It may or may not require a write-up or a computer program.
What is a good design for a Capstone Course that requires the student to use most of what they have learnt in their program.
Most helpful would be examples with which you have some experience and which you can attest to success. Also useful would be notable failures and caveats that an implementer might need to be aware of.
Finally, what other changes do you believe are necessary to prepare the student for their future Capstone Experience.

Personally, I'm a believer in a project based capstone and a group one at that.

The project should involve going from generating (and pitching) an idea through design, development and ultimately delivery and should require integrating multiple tools.

Since many kids would want to use such a course as preparation for internships and jobs, I'd say it's more appropriate to take in the junior rather than senior year. That's ok though since you're done with most if not all core major requirements by then and are taking electives.

I know taking a capstone prior to the senior year sounds wrong to some but it should show mastery of many if not all of the core concepts in a typical CS major and fill a big hole in a students development.


Dealing with students who complete labs very quickly One of my goals is to minimize homework.  My high school students are high performing, grade conscious, and constantly stressed out as it is.  Many of them fall into the "Ivy League or bust" camp, which is a tremendous amount of pressure.

So, when I give labs, I try to give sufficient class time that a majority of kids will be able to finish it with no more than a couple of hours of outside work.  That means that I provide lab periods.

Certain students have a lot of natural acuity for CS, and seem to finish labs far faster than the rest of the group.  If I provide seven lab periods for a lab in AP Computer Science, I may reach my homework time target goals, but there will often be one kid who gets the lab done by the middle of the second period.  What strategies do you use to deal with these kids?

I have 3 tiers of labs.

First are the required labs. They're worth 100 points each and every one must do these. If they don't do one, it goes in the gradebook as a zero. These are also the labs that I think are the best of each topic for practicing what they need to work on. My calendar is based on how much time I expect 90 plus percent of the students need to finish this set.

Second and third tiers are bonus and challenge labs. They're worth 110 and 125 points respectively. If a student does these they go in the gradebook. If not, the grade is omitted so there's no penalty for not getting them done. These tend to be extensions of the required labs, but might be a little more difficult.

Generally the students that are the fast finishers are also the ones that like doing the labs, so throwing a few more their direction will keep them working. Plus, it's an AP class so the 10 or 25 extra points on a lab grade will be a motivator.

I also have a page with a list of websites they can go to if they're finished with all 3 sets of labs. It links out to sites like code.org, codecademy, Code Combat, and CodingBat. Sites that are related, but a little more fun than just cranking out labs.

And I'll also let students come up with independent projects to work on.


Single-dimensional array and simple looping activities of significance I give a lab on single-dimensional loops and arrays. By "single dimensional loops", I mean that there is no nesting of loops.  (I will later give a second lab on multi-dimensional loops and arrays, but that is not this lab.)

The problem is that few of the problems on my lab right now are of any consequence.  What I want is to provide activities that are significant in computer science.  These students are still early enough that I'm not requiring nested loops, but that doesn't mean that they can't be exposed to significant ideas.  The trouble is, what are those ideas?

Good activities would either be algorithms of significance, or they will set the stage for later comprehension of deep and important ideas in CS.

What are lab activities that can be done without nested loops that reflect important problems in Computer Science?

The Dutch National Flag problem is linear in running time. Essentially sort an array with only 3 distinct values each of which may appear 0 or more times. (not length 3). You are allowed only one pass over the array, so the solution is a single while loop with some prior initialization.

It was probably originally posed by Dijkstra. It is mentioned in David Grits's The Science of Programming where it can be solved very nicely by posing pre and post conditions using David's ideas of finding invariants from pre and post conditions.

You can also make it a simple object oriented problem if you like by using objects as the array elements, for example.

A more interesting formulation of the problem refers to the Dutch National Flag which is a Tricolor: Red over White over Blue. You have an array that has some jumbled up red and white and blue cells, zero or more of each. You want to move all of the red cells to the left end, all of the blue cells to the right end, with the white cells in the middle. The restriction is that you may make only a single pass over the array. The correct solution is very creative and demonstrates the power of loop invariants.

I have mentioned this problem in answers to other questions here. A search for "dutch" on the questions page will reveal them.

Solving it without hints can provide a gigantic a-ha moment for almost everyone.

If students can do the classic version, they can also think about a modification that will handle 4 values instead. From that you can talk about the inherent complexity of sorting values from any finite set.


Search for a useful interactive programming environment More interactive environments are easier to learn, but the text based ones I have seen lately don't let you change your mind.

I have used Read–Eval–Print Loop (REPL) environments. However these are not suitable, as it is not possible to edit or view code that one wrote earlier.

In [1]: a=5

In [2]: b=a/3

In [3]: b
Out[3]: 1.6666666666666667

In [4]:

they are of some value. However it becomes less useful when creating something big, when creating routines.

I want to be able to create sub-routines interactively, and then be able to inspect them, and edit them. It also needs to be easy enough for teaching beginners.

In [4]: def double(a):
   ...:     return 3*a
   ...:

In [5]: show double

    def double(a):
        return 3*a

In [7]: show --all

    def double(a):
        return 3*a

    def oneMoreThan(a):
        return a+1

I am not too worried about language. I am just looking for a nice interactive learning environment, that combines the best of REPL and editing. Can you tell me of anything that you use or know of?

I will add an answer that shows what I have found, but it is not an acceptable answer as I don't think it is easy enough.

I am not too worried about language. I am just looking for a nice
  interactive learning environment, that combines the best of REPL and
  editing. Can you tell me of anything that you use or know of?

Runestone Academy has a component called ActiveCode that allows you write Python code and run it. It also has a slider so that you can go back to earlier versions of your source code to review and run.

In addition to activecode, you can also execute Python code with the assistance of a unique visualization tool. This tool, known as codelens, allows you to control the step by step execution of a program. It also lets you see the values of all variables as they are created and modified.

There is a lot more to the web site but is what I use to help others learn Python 3 and the nicest part is that once the students get the hang of the e-books they tend to take off at their own pace.


Is it a good idea to have students see syntax much earlier than they write it themselves? I was wondering if there was any research on whether or not students generally perform better later if they're introduced to the syntax they'll be learning far earlier than they actually use it.

As an example will students ultimately learn import/export better if they're given code that has import statements in it long before they actually create their own modules; or will introducing the syntax too early be more likely to overwhelm students if they haven't been taught what it does? If the former is it likely to distract or worsen the students from learning the current objectives?

If there is more specific research than just yes/no I'm definitely interested. For example things that would be useful to know:

Are there certain ways to classify students where some group will benefit or detriment from being introduced to syntax early?
Do certain age groups handle early introduction of syntax better?
Is there some minimal skill set after which early introduction of syntax will begin to add benefits?

Boldly Go...

First, I'll just say yes, it is a good idea to introduce things (let students see them) before they have to deal with them in detail. There is actually a Pedagogical Pattern, See Before Hear, that suggests that it is a good idea to let students see things before you even lecture on them. This isn't true about just syntax. The essence of the Spiral pedagogical pattern is that you teach things repeatedly to different levels of detail over a course and a curriculum. I'm pretty sure you would think it foolish if the first time the students hear the word "compiler" is when they need to build one.

Research

But to address the question of "Research" is a different issue. I think the kind of thing you might mean by research would likely be unethical. Educators, like doctors, have a "do no harm" directive. You can't run an experiment in education in which you even suspect that some technique might be worse than another, but apply the two techniques to two groups. You run the risk of doing harm to one group. You can only apply techniques that you believe to be best practice.

The only kind of experiment that would be valid is to poll teachers on their practice and then either (a) ask them how their students do or (b) somehow measure their students actual performance. The first is just opinion based and the second is very difficult to arrange, partly because it can be disruptive to the educational process. Another reason why such research is usually not repeatable (hence basically invalid) is that there are too many variables in education: between teachers, students, environments, etc.

An alternative: Patterns

Patterns, are a kind of "experiment" in that they are a means to capture the practices of experts, vetted through a process (the patterns process) by other experts. The process is quite involved requiring many re-writes to have a pattern accepted. This is true of all patterns of course (design patterns, org patterns, etc.), not just pedagogical patterns. The pattern not only includes the what should be done but the why this is the right thing to do (resolution of forces).

Another pedagogical pattern that pushes your syntax idea to the max is the Fixer Upper pattern in which you give students a fairly large program that (a) has good structure overall, but (b) you have broken in some well determined ways. The student task is to repair the program. This can be a first day exercise, in fact. The students first look at any syntax is a complete program that they need to work through.

One of the reasons that this sort of thing "works" is that (a) much of what you want to teach them they may already know or will pick up instantly, but (b) which particular things that is differs for each person. Letting students see an organic whole lets each of them draw on his/her strengths in understanding it, leaving you only the task of filling in the holes as needed. Each person needs to learn different things from the class; not all the same thing.

Another reason that the opposite thing does not work is that everyone learns differently. If you make the assumption that people learn by seeing or hearing something and then immediately "knowing" it you are treating the brain like a disk drive. I doesn't work that way. The brain works by reinforcement. So, if your teaching style is to teach everything only once and completely, then you guarantee that you will reach only a tiny fraction of your students, and many of those don't need the instruction anyway.


Where can a student independently learn elementary recursion, preferably in Java? Normally, Java 2 is a prerequisite for my Computer Architecture course. I gave permission to a strong student who has only taken Java 1 to take Computer Architecture, provided that she learn the basics recursion over the summer. (In Computer Architecture,  the student write recursive programs in assembly language.) Can anyone recommend a free online source where she can pick up, and ideally practice, elementary recursion? The only language she knows is Java.

Update

I modified my question to make more clear that I am only asking about elementary recursion. (I teach about recursion, in depth, in a more advanced course, Programming Languages, in the functional programming unit.)

I ended up recommending to the student:

Any of

The Recursion section of Introduction to Programming in Java by  Robert Sedgewick and Kevin Wayne, recommended by ItamarG3
Chapters 17 and 18 of Programming via Java by Carl Burch
Recursion in CS50 Study, recommended by Peter

Recursion-1 problems from CodingBat, recommended by Peter

Often times, google is our best of friends (I hope). A rather simple search leads to a very informative site:

http://introcs.cs.princeton.edu/java/23recursion/

It is very thorough, and explains many use-cases for recursion.

Another very handy resource is, inevitably, Stack Overflow: this question also provides some information, but it is rather specific. Instead of staying there, one can navigate to the Related Questions section, and from there choose a promising question (usually the one with the highest votes, but not always) and reading it. And so on, and so on... (recursively ;)).


How to teach students to work with multiple layers of abstraction? I'm currently preparing to teach a course on data structures and algorithms. In my past experiences helping teach similar courses, I've noticed that many students find it challenging to "hold multiple layers of abstraction" in their head. This problem manifests in several different ways:

Students find it challenging to transition from working on assignments where they need to implement only one or two classes to larger projects involving multiple, interlocking classes.
Students find it challenging to understand in full detail how more complex data structures work.

To help make this more concrete, I'll pick a specific lesson/assignment I'm developing: having students implement a hashmap with separate chaining as a part of a larger project (in Java).

In order to successfully implement just the hashmap, students need to understand that the hashmap has several different "layers" of abstraction.

The Map abstract data type (ADT): in particular, understanding the difference between the ADT and this particular implementation.
The key: understand what it means for a key to be hashable (both in general and within Java).
The hashmap internals: understanding what we do with hashed keys, resizing strategies, etc.
The chain: Understand that the chain can again be abstracted (we can use any map other then a hashmap for the chain).

And of course, once they're done, students need to successfully use the data structures they've written to complete some other task which might have even more layers of abstraction.

Ideally, I want students to develop the ability to selectively "abstract" and ignore different parts of a project when implementing something to reduce mental overhead. Some students seem to intuitively grok this idea but others instead try and hold the entire data structure (or project!) in their head, have a compulsive need to read all instructor provided code, etc, and quickly become overwhelmed.

In this particular case, I've observed students seem prone to becoming confused by where the hashing logic lives, or losing sight of what the map ADT is asking them to implement in the first place.

Some of this is certainly solvable by just explaining hashmap more effectively, but my core question is this: What are some strategies for helping students become more comfortable working with multiple layers of abstraction? How can I help students develop the meta-skill of being comfortable with abstraction?

I'd welcome answers discuss potential strategies in context of this hashmap example as well as answers that address the more general question.

Link to real life

“Who has came to school by bicycle?”
“OK so we need to know how to make a bicycle”
“What time did you get up? It must have taken a long time to build the bicycle?”

Take it to the limit; be absurd. So the pupils tell you “You don't need to know all this to get to school.” Agree with them.

“Any one here ever fix a bicycle?” — “yes”
“So you have to fix it every time you ride?” — “no”
“But you do have to think about how it work, the inner tubes, the oil, the gears, every time you ride it, right?” — “no”
“Why not?”

Link to past experience, in subject

“Now what about a print statement, we need to know how that work to be able to use it, right?” — “no”

“So over the next few days/week we are going to be looking at a more complex system than before. We can not hold it in your head all at the same time. So I am going to ask you to do what the professionals do: don't try to remember/understand it all at the same time. We only need to understand ‘how’ for the bit we are working on. It is enough to understand ‘what’ for the bits that this uses”

This is only the 1st draft of an idea, and not tried with a class.


Tools for running classes remotely Today, university after university in the US announced moving to online classes. This is perhaps easier in CS than in, say, ceramics or dance, but it still presents unique challenges.

  Can anyone recommend tools for hosting online class meetings with active learning?

I know I could use Zoom or google chat to simply lecture to students, but when I teach I like to get students working in groups to solve problems. Is there anything like Zoom that allows for a "talk to your neighbor" moment? Or should I just assign students a buddy and have them facetime each other during the active learning portions of class?

  Another question is: what are the other needs we should be thinking about?

For instance, I just saw a new question asking about proctoring exams. I'm also thinking about online discussion forums like Piazza where students can get debugging help from each other (the sorts of easy questions they often ask me during class or office hours). But I'm sure there are many aspects of course management I'm not yet thinking about, and hoping others can chime in and suggest some (plus, ideally, software that can help). Feel free to retag. Thanks!

A good beginning is to see what tooling is already in place at your institution. Rare are the schools which have zero online content. If it's already in use, you have an expert base to draw on.

Not knowing how it's grown over the past decade I can only suggest investigation into Blackboard. As a student I found it easy to use and the non-tech teachers seemed comfortable with it.

Some of the features, student-facing, which I recall being used are:

Online testing, multiple choice through essay (grading I have no clue about)
Timed dissemination of resources (date-based and progress-based)
Seemingly full featured messaging:

Non real-time student-instructor message panel
real-time one-on-one chat for instructor-student
real-time group (class) chat, with instructor piority
student-student (controlled by enrolled class) non real-time messaging
gradebook with current and progressive totals, with access to the results of each assignment for review
instructor to class broadcast messages

Personal contact controls seemed to be well made, including using a system supplied email (a couple schools had student email systems) or personal 3rd party email (Gmail, etc.)
Ability for student to personalize their interface and link their classes together and merge course calendars into a personal calendar.

My most recent use of Blackboard was in 2011, and goes as far back as at least 2004, perhaps more. (An earlier school had something like it, but I don't recall if it was Blackboard or otherwise.)

Found their website, but haven't done any looking. They are [Blackboard.com][https://www.blackboard.com/].


How Can I Apply Spaced Repetition To Teaching CS? Lately I've been seeing quite a bit on the importance of spaced repetition in retention of skills.  My job is to level up a group of C# developers and I'm trying to figure out how to apply the idea of spaced repetition to what they do.

I've got some ideas--in no particular order:

1.) Periodic reinforcement via syntax flashcards

2.) Weekly/monthly coding contests of some sort (possibly vary this with minimum information puzzles as well since problem solving is such an essential skill in software development).

3.) Using Exercism.io and other such online academies to reinforce as well.

I would love to hear the thoughts of other educators on this subject.  I'm specifically looking for these answers: does one or any of those strategies seem better than others in terms of teaching software development? Are there articles on the application of spaced repetition to teaching software development?

I'm sorry--I know this is a fairly broad question so if others can suggest ways for me to narrow the question please do.  I just can't think of another way to ask this.

This is also called Spiral education. There is a pattern devoted to it in Pedagogical Patterns: Advice for Educators. But it is more than just repetition. The basic idea is that one introduces an idea early in the course, but in a basic way. Possibly nothing more than its name if the idea is applied early. There can be a lot of such ideas in any given course.

Then, the instructor returns to the idea repeatedly, each time with a deeper explanation requiring deeper understanding. Both the lectures and the student work need to reinforce this.

Students are unlikely to learn much the first time they see an idea, especially if it has deep implications for which they don't already have the background. Ideas are interrelated, not stand-alone. So, on each loop around the spiral the whole set of ideas gets a deeper understanding. Some curricula actually recognize this. Advanced Calculus in some mathematics programs covers the same material as basic Calculus, but in a deeper way. But you can apply the same concept at a smaller level with short iterations.

The final work of the students, perhaps a project, can bring all of the ideas together in a fusion.

However, repetition itself, independent of the Spiral deepening idea is also needed, even for simple things. This is a result of the way the brain works. To move something into deep, long term, memory and especially to make it available for use, the brain needs to re-wire itself, making new synapse connections. This requires repetition.


Did the spread of smartphones increase or decrease general computer literacy? In my experience, as a general observer of the world around me, and as someone who teaches some really simple basics in python to non-IT students, it does seem to me that general computer literacy (of those that use/have to use computers*) declined, compared to back in the day™.

When we had fight with flimsy Windows98 (or geek it out in unwelcoming linux, but that never was a mainstream thing) even for normal tasks, you had to have some basic understanding of what you're doing (or you got punished with crashes and viruses) and computers were seen as practical, but complicated machines.

Nowadays, way more people use computers everyday (and I'd theoretically put smartphones into that category), but everything is easy and appified and marketing makes you believe those things work with unicorn farts and magic. Everything even remotely technical gets hidden from users, there's dozens of mechanisms protecting you from all kinds of stuff and phones generally are a black box that you're supposed to just consume on.

So from my experience, most people are overwhelmed by even the most simple things, like working in a folder structure or the realization that you can use a keyboard to make the computer do things or that error messages can contain more than just "Oops, something happened" and that you should please read them before shouting for the teacher that "It just doesn't work!"

Now am I just having nostalgia or is my observation valid?

I would suppose there should be some literature on this subject, but this is totally out of my field, and google scholar doesn't bring up anything useful when looking for "computer literacy" smartphones. So I guess I'm mostly looking for objective literature on this subject.

And don't get me wrong, I don't want to go back to the time where computers where only mastered by the most 1337 wizards and win98 would surprise you everyday with a new fuckup. I love it that I have the power of all my trashed computers in my pocket and that I can simplify things that once used to be hard. And I'm aware that this simplification opened up a whole new world for a lot of people, but I feel like there's also some negatives associated with it, and I'd like to see what I can do to counter those.

*There is probably a whole different discussion to be had on the issue that many, many more people now are using computers (in the traditional PC/Laptop Form, but mostly, smartphones), so that the general "amount" of computer literacy in the population probably went up, see the answer by @Kevin Workman, but for this, I'm focused on the literacy of the users, not of users and non-users combined.

If somebody has some statistics, that would make a great answer, but in the meantime I'll offer some thoughts.

First off, I think it depends on what you mean by "general computer literacy". I can think of a few interpretations:

If you pick a random person, how computer-literate are they?
If you pick a random person who owns a computer, how computer-literate are they?
If you assign a score to "computer literacy" and then calculate that score for every person and then take the average, what would that number be?
If you assign a score to "computer literacy" and then calculate that score for every person who owns a computer and then take the average, what would that number be?

Are we asking about everybody, or are we only asking about the people who own a computer?

According to the US census, ~60% of American households had a computer in 2003, compared to ~80% in 2015. So if we're asking about everybody, then I would guess that general computer literacy has gone up, because more people have access to computers.

In other words: if you don't have access to a computer, you have a computer literacy "score" of 0. If you have access to a computer, even if you aren't an expert in computer science, your "score" is above zero. So if we're asking about everybody, then the literacy increases as more people own computers.

If we're only asking about people who own a computer, then I think it's fairly obvious that "computer literacy" has gone down, but I don't think that's necessarily a bad thing. Until recently, you had to know what you were doing in order to work with a computer, like you've outlined in your question. Since then, hardware and software companies have done a great job of making their products more accessible, i.e. easier to use even if you aren't an expert. The previously-required expertise has not been necessary, so "computer literacy" has gone down.

However, I don't think all of this hinges on smartphone usage. People have been complaining about the new generation of non-tech-savvy users since the internet began. Eternal September happened in 1993.

Anecdotally, I started college in 2004, before smartphones were popular (the iPhone was released during my junior year). Plenty of my classmates chose the Computer Science department because they were "good at computers". Many of these students struggled when they found out that being "good at computers" meant more than playing video games.

This phenomenon is more general than computer science. I don't have any numbers to back this up, but I've often observed that anytime something becomes more accessible to the general public, many of the previous "experts" see the craft as becoming "watered down" rather than celebrating the fact that more people are participating.

To come up with a specific example: thanks to the internet, now anybody can record themselves playing music, and put that out in the world. Compare that to how music was shared in 1980, and it's easy to see that more people are sharing their music now. But because it's so easy, many of these people are not professional musicians. Many of them are not good at music (yet). So because more people are playing music, does that mean music literacy has increased? Or because more novices are playing music, does that mean music literacy has decreased?

More total people are using computers, but of the people using computers, more of them are novices. Does that mean computer literacy has increased or decreased?

You can ask the same question about anything that has been made more accessible or shareable. Has art literacy decreased because more people are posting their doodles online? There are more novices participating, but does that mean "general literacy" is increasing or decreasing?

Another thing to consider is that "computer literacy" is very broad. If I'm an expert in ethics in AI, but I've never touched a command line, am I computer-illiterate? If I'm an expert in Linux but I don't know how to use a web browser, am I computer-literate? I would argue that we're trading some kinds of expertise (like navigating the file system) for other kinds of expertise (like navigating social media). One isn't inherently better or "more computer-y" than the other.

I also think it's easy to forget how it feels to be a novice. Being new to a subject is really hard, and as experts we tend to forget that feeling. So when we work with a novice, we can be dismissive or frustrated- "it's just a for loop, what don't you understand?" But we're forgetting that it took us a year to figure for loops out. A little empathy goes a long way.

I'll end this with a conversation I had a few years ago that stuck with me. I had a coworker, who went to college back when they used punch cards, where they had to walk to the only mainframe on campus (uphill, both ways) at midnight to run their code. I asked him: do you get frustrated by this new generation of coders who don't know how anything works under the hood?

He responded: "No way! The new generation can do things I never dreamed of doing!"


Explaining how the Internet and the World Wide Web work I have been having trouble finding a good resource (ideally a video) or analogy that helps me to explain how the Internet and the World Wide Web work.

It does not need to be too in-depth. Only enough to cover how web pages are made available to the end user, and how HTTP requests work on the surface. Preferably,  something that isn't over 10 minutes long and that the student can understand without prior knowledge of Web Development.

This is for a first lecture at an "Introduction to the Web" course, where students with zero experience in coding are introduced to HTML, CSS, JavaScript, and usability/accessibility topics. Explaining how the Web works in a concise yet effective manner that sticks has been my biggest challenge so far.

Any suggestions?

Update:

For the first lecture, I ended up using a combination of all suggestions. I used Code.org's videos, but they turned to be a bit too lengthy for the attention spans of my students, so in the next opportunity, I will address this a bit differently.

I will not go in depth into how the Internet works and how the data is transferred, but I will use the buses/highways analogy more superficially or even as an add-on explanation instead. I may go into what the DNS is, but that's about it.

In a Front-End Web Development course that only goes as far as using JavaScript with JQuery, potentially touching on a little bit of what is AJAX, the extra details are unnecessary, so rather than focusing on how the Internet works, I can focus on how Web sites work, or more specifically, what happens behind the scenes from the moment you type in "www.google.com" in the web browser, until the web page is rendered and ready to consume.

The most important bit for my students, perhaps, is to be aware that every asset on a page involves a new request, something more that must be downloaded. And that every element in your HTML document must be "translated" and drawn by the browser. Thus, it is all these assets that must be gathered, and the number of elements to draw onto the browser tab or window, that we need to take into account when developing these pages, because the more of them we have, the longer it takes for the browser to load or update the page.

One analogy I use in my intro class is transportation. The Internet is the roads, bridges, and highways. The World Wide Web is the cars and trucks that travel along these routes, carrying cargo to/from different places.


Which of the following programming languages will help me better to teach the basic concepts of CS and why? I'm really looking for opinions from experts

I have been asked to teach a group of students “How To Program”, these students are really new to programming.

What I want is to make them like programming and enjoy doing it (as I do), so which programming language should be used to teach them, in order to achieve that goal?

The students are about 17 to 22 years old, and there are 25 students in the group.

My background lies in 9 years of programming experience. I had used many programming languages like C++, Java, VB.NET, C#, JavaScript, PHP, Swift, Python.

Of the languages you mention knowing, I'd recommend Python.

Advantages:

You know it.  This naturally applies to the other languages in your list, but there are other languages that would also be candidates if you knew them.  It's certainly possible to learn a language and teach at the same time, but best to avoid it if you can.
It's succinct. You want them writing code, not boilerplate.  It'll be simpler for them to learn to understand code logic if every line is actually doing something meaningful instead of just existing to fulfill syntactic requirements.
It has a REPL environment. The ability to do easy interactive debugging and testing of individual lines quickly will make it easier to try things out early on.
The annoying "whitespace is syntactically significant" thing, while pointless and occasionally counterproductive for experienced programmers (who would already be formatting things correctly) is actually a good thing for beginners who need to be trained in proper indentation.
Simple GUI (and other) Libraries. Anything that lets them see the results of their coding on the screen as quickly as possible will help get their interest.  And GUIs are hardly the only libraries available; chances are anything they want to play with has an associated library out there.  You want to get them writing real (albeit simple) code instead of toy programs, so they can get excited about it.
Support for functional programming. Not the first thing they'll be doing, but an advantage of Python over dedicated teaching languages that were never intended for practical use is that the advanced features are there once the students are ready for them.  They can learn the basic syntax, then start playing with, e.g. list comprehensions, then move on to a fully functional style (when that's the best approach) when they're ready for it.
Free, portable and open source. No need to tie them to a specific platform if you don't have to.  This also makes it easy for them to work on projects at home one whatever hardware they have available.

Disadvantages:

No real low-level facilities. Python won't teach them about memory management, pointers, etc.  They'll need to switch to something that does eventually (I recommend C for that), but that can be the second language.
No variable declarations. This is going to be an annoying source of bugs for beginners as well as experts; if you misspell a variable you're writing to, it'll just assume you're declaring a new variable and silently do just that.  Python could really benefit from something like Perl's use strict.
Poor scope resolution and visibility mechanisms. In, e.g. C, you can have variables that are global, local to the file, local to the function, or local to the block.  Probably in part due to its lack of explicit block delimiters, Python doesn't really have that kind of granularity; everything's either global or local.  And since it doesn't declare its variables, there are positions in the code where a write to a variable will have local scope but a read from the same variable would have global scope.  Python 3 has improved this somewhat  due to the introduction of nonlocal scope.
Python 2 vs Python 3.  Python 3 is the better language, but since it broke backwards compatibility, sometimes you have to choose between Python 3 and a library you want to use.  Less of an issue with beginners than it is in real practice.

I would also strongly anti-recommend PHP and Java; the former was put together in a very hackish manner and will teach them bad habits, and Java is a full-on new BadHabitFactory().createBadHabit().getInstance().getHabitSet() generator.


Tips for self-study with just a textbook and google I'm going to be working through a textbook on discrete mathematics that has a special focus on computer science. My only resources are the textbook (which, in its defense, has answers to the odd numbered problems in the back, and "self-tests" with answers) and the great and powerful Google. Since I don't have a teacher per-se to help me, are there any things I should do to help keep myself focused and retaining the information I read? I'm planning on doing every single odd-numbered problem, but are there extra projects I could be doing (programming or whatever) to reinforce aspects of it?

The book is Discrete Mathematical Structures, 5th edition, by Kolman, Busby, and Ross. Chapters are

Fundamentals (covering set theory, matrices, etc)
Logic
Counting
Relations and digraphs
Functions
Order relations and structures
Trees
Topics in graph theory
Semigroups and groups
Languages and finite-state machines
Groups and coding

Your general plan seems good: Do a lot of exercises. An old proverb (Chinese, but maybe more general) is that you don't know something until you've practiced it ten thousand times. (Rule of 10,000).

I've found wikipedia to be quite good, but not perfect, for questions on mathematics. Be a little skeptical if anything seems a bit strange in an article there. I once came upon an article that seemed sketchy in part - just a paragraph or two in the middle of a long piece. I came back in an hour or two and it was gone. A professional isn't likely to be misled, but a student should be just a bit cautious.

Also, take notes. What are the most important three ideas in this section/chapter? Don't try to re-write the book, just abstract the gems. Highlighting has less impact since your brain is less engaged. You want to do things while self studying that are "active" enough that your neurons get rearranged. This is why the exercises are especially good.


How can I automate the grading of programming assignments? As a TA, the usual workflow for grading programming assignments for an introductory course would be:

Some instructors used email as a submission mechanism (yes, really.)
So, search for submissions in email and download every submission
Organize it to make grading easier later on
Go into each directory, compile it. Realize it doesn't work.
If I email the student, I get a response 'Works on my computer'
Debug it and make it compile on my computer
Due to lack of test cases, every student has demonstrated their work with their own version of output on the console
Decipher their output and hopefully they get a good grade
Partial grading is hard because I have to dig through the code and see what parts are done and how far away they are from a working solution

All in all, it takes about 7-10 minutes per submission if I do things carefully. 100 students, 3 programming problems = 300 submissions. 10 mins per submission = 3000 minutes = 2 days of continuous grading. Impossible.

I have heard instructors make scripts, use some tools. Sometimes, they get super strict on the output of the program so they can grade it easily. Worse, they make problems easier so it's easier to grade.

How can I automate this efficiently?

The degree of automation that you can achieve depends on how you want to grade. The most valuable type of grading (to a student) does not only cover whether the code works or not, but also offers suggestions as to how to make it better, including readability, design, and so no. And that you cannot totally automate.

You can (and should) automate basic setups, compilation, and  tests, and generally remove as much grading-boilerplate as possible via automation. Todo so, the first step is to make sure that students will follow certain reproducibility guidelines. In my case,

The instructions for assignments always include a specific test environment and test command, that must run. So for example, this could be "jdk 1.7 as installed in the lab" + "javac of your .java files". This allows me to ignore "works for me in my place" excuses -- unless it works in the test environment, it will not receive a passing grade. Note that this is generally not a the development environment; that may be eclipse or whichever other IDE they choose. I generally try to stick to the lowest common bare-metal standard.
JUnit or other unit-testing frameworks are great to assert minimal performance. You can either request them to write their own tests (make sure to specify what these should cover), or provide them with pre-written tests (more effort, but hopefully more in-depth testing). Ryan Nutt's answer also offers good suggestions. Unit-testing is huge not only because it helps you to grade, but also because it makes students aware of their own errors; they will then fix these errors before submitting the assignments, which is a clear win-win.
Mandating command-line friendly build tools (maven, scons, makefiles, scripts, ...) really helps to quickly pass the above tests.
Students must use an online submission system (eg.: Moodle task) to upload their code.

Afterwards, in my grading setup,

I download all submissions for the assignment, and each will be nicely tucked into files named after the uploading student. I then run a small shell script that extracts each submission into a single folder. After significant frustration, the script has been tweaked to deal with .7z, .rar, and .tgz archives instead of the requested .zip files.
I write small per-assignment scripts that I can point at a submission and will

open my favorite IDE pointing at the submission
compare it side-by-side with previous submissions by the same author, assuming that this is an incremental project, using meld or a similar visual diff tool.
launch any corresponding unit tests to see if anything fails

I then write a per-assignment check-list of items that I want to look at in each submission. This gets refined until I have graded 5 or so, when it sort of stabilizes.
Finally, I get to grade the bulk of submissions, writing comments for students as I go, and often copying and pasting comments from previous submissions. When all are graded (and not before, because I sometimes have to backtrack or refine grading criteria), I copy-and-paste comments and grades to the online submission tool so that students can see them. The most frequent mistakes make the bulk of the next lecture.

So essentially I recommend standardizing as much as possible, and investing some time into per-assignment automation, in order to speed up actual grading.


Teaching with just a single Makey Makey and Sphero Last summer I was excited to get my hands on a Makey Makey. I played around with it for a couple days, but it ended up just gathering dust for most of the year. The same goes for a Sphero SPRK.

They were fun to play around with, but they weren't overtly connected to what I was teaching, so I didn't prioritize finding creative ways to integrate them. However, I get the sense that there was some untapped instructional potential in these devices.

Are there lessons and demonstrations using only one Makey Makey or Sphero that can effectively illustrate CS concepts? Moreover, do they have a place in a CS class?

I'm looking mainly for short, self-contained lesson ideas since I only have one of each; a classroom set would necessitate a separate question.

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.


How can programming skills be improved? I often take help from online videos to improve my programming skills, but I am not successful. Videos help me in debugging my code, but I am not improving my programming. Is there any other way through which I can improve my programming?

The only way to learn a lot of things, maybe most things, is practice and feedback. In a standard course (not online), the professor assigns some work to do - homework, projects, .... The professor then gives you feedback on it - grades, but hopefully more.

To learn on your own, you want to try to simulate this as much as you can. So, to learn something, you not only have to see and hear about it, or even read about it, you have to do it. Moreover, you need some way to get feedback on the success of your efforts.

If the videos don't suggest projects then you will have to find them elsewhere, perhaps in a textbook. Do a lot of small and large projects.

But then the feedback part is just as important. One possible way to simulate that is to work with a friend in your learning. Each of you does the same exercise separately and then exchange your work and each comment on and improve the other's work. This isn't perfect, since the other person isn't an expert, but it is better than nothing.

You might even be able to use an online forum to get comments on your attempts. The Code Review here, might work for you, though I don't know how welcoming they are of novices.  Be sure to see their "help center" for guidance.


How to illustrate scope problem when creating variables inside `if` statements in Java One of the problems that my students will stumble upon every year is trying to create or initialize variables within an if/else block.  Why, oh why, can't they perform an operation like this?

if (someBooleanCondition){
    int x = 7;
} else {
    int x = 0;
}
System.out.println(x);

After all, they reason that x has been created and initialized no matter what. This year, I discovered a nice way of explaining why this operation does not work. I will be posting my answer below, and I am also curious to see if others have different explanations that they use with their students (or corrections to mine).

I like to use an analogy from Finding Nemo.  I tell them their programming language has the same problem Dory has - short-term memory loss.  When a variable is declared within a block, Java will forget about the variable (just like Dory) after reaching the end of the the block.  So a block declares the "scope" of Dory's short term memory.

I've been concerned that students would think that the variables assigned in a block would lose their value after the block has ended, but I've never run into that problem for some reason.

What's interesting about your example is that it won't even compile without the print statement!  Java doesn't allow you to have a single declaration statement in an if or loop.


Will I Regret Using Python As A Teaching Language When I Later Need to Teach Static Typing? Given the prevalence of Python as a first language at many universities I think using Python as a language to teach new software developers is a good approach.  But there's one thing that concerns me.  Eventually these developers will be moving to a statically typed language and I want them to be aware of static typing and what it implies.

Do you think using Python for teaching will be a large hindrance to later instruction or am I just worrying for no good reason?

Would anyone care to recommend other teaching languages I might evaluate as well besides Python?

If you teach Python's typing system correctly, you should have no problem later. The rule in Python is that names don't have a type associated with them, but all values do. It isn't that "things" change type. They don't. Objects and other values have a well determined type when they are created and that type never changes. Names never have a type to be changed. But any name can be associated with any value.

When you move to a language that requires explicitly applying a type to names (Java, say), then you just need to teach them that names are given types also, as a sort of redundancy so that errors can be caught earlier (compiler v run-time). A name associated with a type can only refer to a value that has that type.

Applying types to names (as well as values) isn't really that big a deal, and the students will be more sophisticated when you get to it.

However, they may not like having to explicitly apply types to names. But that is a different issue. The reason given above will be enough for many of them.

Finding errors early is a big win in programming. If you take that attitude when teaching Python you will stress things like early testing (preferably test-first programming) so that errors show up soonest.

For the distinction between a "thing" and a "name applied to a thing" it is often instructive and always fun to return to Haddock's Eyes. Lewis Carroll was more interested in mathematics, of course, but the ideas apply equally well to CS.

Don't confuse "typing" as hitting keys on a keyboard with "typing" as applying a type to a name or value. It may be that the first version of this was confusing in that regard. Here "typing" means only the latter.


How to teach operating systems development nowadays? I have been appointed to change the contents of an Operating Systems course, because it was too IT oriented. I mean the lectures were oriented only to know the differences between some OS like Windows, Linux or Unix. From my perspective, and considering the recommendations of the ACM Computing Curricula, I believe that the course should include some hands-on programming in the development of some parts of an operating system. The problems that I am currently facing are the following:

The students that I will teach they had only an introductory Python course, so I was planning to teach some C at the beginning of the term.
I remember that in the old-good days with the use of floppy disks it was "fun" to give a skeleton of an OS for the students to modify and that it could boot on a computer. How can I emulate the same behavior in modern computers?

Actually, are there any kind of emulators or tools that could help the student to learn the concepts of OS by using some C programming? I do not want them to become experts in the field of OS, but at least that they do know what is happening inside an OS and not see it like a black box.

Implementing a whole OS may not be the best approach if you want your students to learn operating system concepts. This is specially true if your students are not proficient in C and Assembly, since major parts like booting, context switching and virtual memory need to be coded in Assembly. This might be daunting for students that have experience only with Python.

An alternative approach is presented in Computer Systems: A programmers perspective. It is a very in depth book, but instead of implementing everything the authors decided to study the System Calls in the POSIX specification as a way to illustrate Operating System Concepts. IMHO it maintains a very good balance between the abstract concepts and their concrete implementations.


What kind of game (in Scratch) would require use of a list? I teach an introductory Scratch class to a group of elementary-school students. Most of the focus is on having fun creating simple games, but i still try to introduce a little higher-level programming as well, so that they have the tools when they decide they need them.

What are some relatively easy games that require using a list that i can assign them?
Ideally it should be something that can be done in an hour-long lesson.

A variant on the usual random drill and practice test would be to pre-populate with the questions and answers, then remove question and answer from each as they get answered correctly, allowing players to get more practice on the questions they get wrong. Here's an example for times tables.

You could try something for an adventure game, building up an inventory of items collected in a list. Another possibility would be an adaptive 20 questions style game, adding additional questions into a database (of sorts) as the player gets to the end of a branch of the tree.


What non-programming book is vital for learning the CS mindset? If you had to recommend a single book to introduce the way programmers think to anyone, but it had to be from outside the field of CS, what would it be?

For programmers, my hands down, all-time, crushing winner would be "Becoming a Technical Leader" by Gerald M. Weinberg, which is mainly about self-development but still for an already technical audience. When I was in High School ,the book "Godel, Escher, Bach" by Douglas R. Hofstadter had just come out, and we had an entire course devoted to it. It is probably one of the most quoted books of all time.

What one book (besides "Alice in Wonderland") conveys the mindset and enjoyment of mental processes similar to programming, to a non-technical person? What is it that makes this book important/vital?

The hardest part of determining anything in computer science is the requirements first.  If you don't know what the program should do, then there is no way to do it correctly.

Thus, Winnie the Pooh is a wonderful book on the matter.  It clearly describes time and time again how simple misunderstandings of the base assumptions lead to absurdities of action.  From tracking a woozle of one's own making (and debugging where the error was actually being originated) to trying to define a heffalump and building something completely wrong as a result.

With the summary of Winnie the Pooh in "In which Christoffer Robin gives a Pooh party, and we say good-bye" we realize that our jobs as writers of code is to take the stuff of dreams and make it into reality.

Winnie the Pooh has the advantage over many other books by being accessible by all levels of readers and can often be found in less expensive books compared to many other textbooks.


How to gamify the learning management system I have been reading up on how to shift more of my teaching resources on to the Learning Management System, to make it easier to access from other locations even though I mostly teach in a classroom. It is a way to learn more about online course presentation.

I have read that gamification using even such simple techniques as points, levels, badges and leaderboards... Wow, trying to think of an example... It is right in front of my face... Is a very effective way to get people to use the content and stay in the course. The sources I read say that it is most effective for people over age 45, including those over 65. That seems to surprise people.

My question, should you choose to accept it, is: how effective is this for techniques you have used? Apparently gamification brings out the competitive nature of the 60% of people with that tendency, while not sufficiently putting off the other 40%. Personally, I don't think gamification would do anything for me, as I have not been a fan of computer games, sports, board games, competition or anything else that leads me to work against others and egoically for myself. Can this idea really succeed with people inclined to study computer topics?

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.