Classification problems are reasonable candidates.  For instance, I wrote a GA that looked at the mushroom dataset taken from the UCI Machine Learning Repository with the goal of classifying an unknown mushroom as safe or poisonous based on its traits.  Each candidate solution encoded a series of rules (Red cap means poisonous, blue spores are safe). During the learning phase I used a portion of the dataset, but to perform the final evaluation I used the full set.

That particular dataset might not be well suited to the high-school level, as it has missing values on some entries, but there are a lot of other datasets. Also, numerical data is generally easier to encode than categorical data. That being said, it was a fun dataset to use - "Hey look, after fixing that bug my GA poisons us 15% less often!"

Beyond that, it might be worth deliberately looking at a variety of problems including some that are poor candidates for GAs in order to demonstrate their relative strengths & limitations.


Publication outlets for research by undergraduates?

I am not aware of any journals for undergraduate research journals in computer science. Note that anyone can submit to the journals and conferences, there can be student only papers.

ACM does have a student research competition at two levels, one for undergraduates and one for graduate students in computer science. Those are held at many conferences.

ACM SRC Web page


What teaching techniques can be used, in teaching students from a medical background, to improve their programming?

To get the premedical students involved you can tell them that by the end of the course they will be able to dissect a program. It may not be as gross as a frog, but it will be more interesting. Unlike the frog, when done dissecting the program they can bring it back to life.

The next thing requires that you mean what you say, and follow through with actions that match. Tell the class that their marks in the course will be based on their performance in the course and their apprehension of the course material, not upon their major or program of study.

Final thing is to forget which students are pre-med, chemistry majors, fine arts students, or comp-sci majors, and teach the class as if all the students are willing and able to learn.

The one thing that did catch my eye in the question was that the students in question have no basic concepts of programming. That causes me to wonder if some students are taking a course which should have a prerequisite course and does not, or if the course has been designed, unintentionally perhaps, based on the premise that incoming students have those basic concepts even though it is listed as an entry course.

Perhaps it has been the history of the course that students arrived with prior experience even though it was an entry course, and the faculty has grown accustomed to that and adjusted the course accordingly.


How to figure out what I need to search for in order to create a program?

To a certain degree, it comes down to experience. But if you don't have experience, I feel you can get a lot of mileage of just trying to do the simplest thing possible to see what'll happen and googling your questions as you go.

At some point, you'll run into an obstacle you didn't anticipate and realize you need to pivot and adjust or even entirely re-write your code to accommodate. (Having to rewrite code can seem painful at first, but it's basically something everybody needs to get used to. It's helpful to have a sort of zen mindset, where you let go of your attachment to your code).

Once you do this enough times, you start to develop a sort of gut sense for what sorts of obstacles you might end up.

For example, take your shell example. If I had absolutely no idea what I was doing but just moved forward instead, I would probably...

Start by writing the code to do the user input/output stuff so I can get commands from the user. This code would likely be extremely minimal/something you'd write in a CS1 class.
Next implement some basic shell navigation functionality like cd and ls directly within the shell. Now, my shell is a little more complicated: I need to remember things like where I'm located in the file system; I'd probably have to do some research on how you'd implement things like ls within C...
Next, try I'd try and implement the ability to have my shell call other programs. Since I'm a beginner, I have no idea how to do this, so I'd pretty much immediately just google "C run another program". This will immediately bring up results that mention the "fork" and "exec" keywords.

I might not know what those mean, but it gives me just enough context that I can form more specific google queries. ("C exec example", "C exec vs excv", etc...)

Now, depending on how I previously wrote my shell, I might immediately be able to adapt these examples to my own code, or I might need to rewrite and rearrange things significantly. This is mildly painful, but such is the life of a beginner -- no biggie, I do what I need to.

Then you rinse and repeat...

Another strategy you can try is to try planning ahead: specifically, figure out what precisely you want to do, then decompose that plan into smaller and smaller subproblems. The nice thing about this approach is that it forces you to think about potential obstacles you might run into and can help make it easier for you to form precise google queries.

For example, we want to write a shell. Well, what exactly does this shell need to be able to do? Let's say as a minimum prototype, I want to be able to:

Get user input
Run basic navigational commands like cd and ls
Define basic environment variables
Be able to run other programs

Ok, how do we do all three of these things? Well, if we drill down, we might end up coming up with something like this:

Get user input

Recognize and expand environment variables first?

Run basic navigational commands like cd and ls

Make some kind of system or library call to get the data I need? (Note to self: google this)

Define basic environment variables

Process the user input to get the variable name and the value somehow?
Store the variables in a map of some sort?

Be able to run other programs

??? (Note to self: google this)

Notice that if we had kept drilling down, we'd end up learning about the fork and exec thing here as well.


Suggestions for encouraging good Coding Practices?

We use the Eclipse plugin Checkstyle. The plugin is configured with a set of rules (defaults styles are available with the plugin), and then generates a set of warnings for any violations of these rules. Toward the end of our CS1, we introduce students to the tool (the students have been taught our expectations throughout the semester). After they are introduced to the plugin, all of their remaining projects will lose points if they have Checkstyle warnings in their project submission (e.g., one points off per warning to a max of 10 points). Checkstyle gives them immediate feedback as they are writing code (in the same way compiler warnings/errors are presented in Eclipse) with the loss of points as incentive to not just ignore the warnings. This practice is continued in CS2 from the start of the semester.

This experience is at University level, but should be applicable to anyone using Eclipse in an AP CS A or similar course.


Computer Science in the Waldorf curriculum

Waldorf / Steiner and Technology Use

Waldorf schools aren't against the use of technology in education, they take the stance that introducing technology too early is harmful to natural educational development in students.

This quote about Waldorf schools in the UK (where they're also referred to as "Steiner" schools, since Rudolf Steiner pioneered the movement) sums up the rationale:

  The hugely sensible approach taken by Rudolf Steiner schools is that computers only become useful in the teen years once children have mastered fundamental, time-honoured ways of discovering information and learning, such as practical experiments and books. 1

If you're afraid that this is backwards-thinking in the information age, it is perhaps telling that some of the biggest proponents of Waldorf schools are parents 2 and tech executives 3 who live and work in Silicon Valley.

Digital Literacy Curricula in Waldorf / Steiner Schools

Digital Literacy is a common term used to describe the use of technology in education, though this isn't a Waldorf construct. (It's championed by everyone from Harvard 4 to the Public Library Association 5).

However, in Waldorf Schools, digital literacy is typically applied in a more "holistic" way (another tenant of Waldorf education).

The approach taken by the San Francisco Waldorf School 6 is a good representation of these principles (though not all schools follow this same breakdown):

Early Education

  Young children learn through imitation, imagination, movement, play. Teachers tell beautiful stories with complex vocabulary and sentence structure. Children are unencumbered by the passive consumption of fixed media images, which scientific research confirms are difficult to process and can hinder learning.

Grade School

  Media-free classrooms are places of human connection and experiential, creative lessons. Middle schoolers are introduced to digital literacy, exploring questions of online behavior, information resources, and social citizenship. Families agree upon class community guidelines for the introduction of technology.

High School

  Students use technological tools for learning and creation, and teachers cultivate critical thinking through discussion-based seminars and inquiry-based exploration. There is a media center, rotating laptop carts, and cloud-based resources. Phones are turned off to create a space for learning and social connection.

So, if you want to follow true Waldorf pedagogy, technology should be introduced in the secondary/high-school years, and done so in a way that is "holistic", though some variations do exist.


Should an educator define terms rigorously?

You have two complementary questions here. What should the student do, and what should the professor do. I'll handle them separately.

Whenever you can't understand what is being asked of you, ask for a better or more complete explanation. You can't fairly answer a question that you don't understand. Of course, you should be aware of standard terminology and should be able to depend on that being a shared knowledge. But even if that is not the case, you should ask, or consult other sources, so that you don't have gaps in your education.

The question of what the professor should do, however, is a bit more flexible. Mathematicians and other technical people are rigorous about some things because they are more important and generally useful than other things. For example, we are rigorous about the definition of the derivative in calculus and about what it means to sort numerically. But some things don't need the same care. If a professor needs to put a name to something for a single conversation and it isn't a generally useful or well known concept then there may be no need for complete rigor. A shared, but informal, understanding may be enough for the current purpose.

So, for example, if the professor wants to define something rigorously, I suspect that s/he will want to remember that definition for the long term. If it comes up in an exercise but you will be expected to have learned it well for a later exam, then some rigour is called for. But for the actual example you give, connected sequence is probably enough, with a few examples to get you on the right track.

However, If you are in doubt about the importance of a term, then ask about that also. "Do we need a rigorous definition here? Will we return to this concept?"

Sometimes a teaching analogy or metaphor is enough. If everything were made strictly rigorous your education would become much more difficult (more to remember) and for most learners, much more boring. People are good about learning from metaphor. But professors need to be careful not to load too much onto any given metaphor.

I'll note that rigor in mathematics is mostly a feature of the previous century. People formalized what was, up to then, considered well known without formalisms. Even today, people discovering new mathematics may struggle for a while about what are the correct formalisms for a new concept. It may take a while for it to "shake out". The important things then get properly defined and names that evoke the correct mind set are applied - or we hope so, in any case.


Teaching students to hunt for and debug their own errors

Debugging is more a craft, an art, than a science. That's where the pedagogical challenge lies.
That said, here are a handful of tools/techniques I used to varying success:

Model the debugging process. I would project sample working code, break that code, and talk through the error messages (and how to read them). Trying to instill the patience and thoroughness required is harder than explaining the actual errors.
Give students broken code... One of the first review activities I did at the end of a unit involved having students correct broken code. Missing semi-colons, commas in for-loop declarations where semi-colons should be, misspelled function names, errant brackets. This is the opposite of the above, and students should work in both directions: break working code; fix broken code.
...to correct by hand. This is where differentiation can shine. It might take reading printed code to recognize where there is a problem. Take time to fix errors off the screen in order to make them more recognizable on the screen.
Not all errors are created equal. Just because a program runs doesn't mean it's free from bugs. This can be the most pernicious because everything appears to be correct on the surface. The Debugging appendix of Think Java is a great resource for this issue. Having students categorize errors into types further solidifies the understanding of bugs and how to eradicate them.
When in doubt, print yourself a message. While it can lead to messy code as debugging messages get commented out, I'd rather a student have messy, working code with signs of thoughtful debugging than clean code that is broken or incorrect vis-a-vis its spec.

In the end, students need to build their pattern recognition, and that comes with a lot of time and a lot of focused practice. There is also an inevitable connection among debugging skill, programming environment, and language. My students were better at C than Python when it came to fixing their programs. That's due to several factors: C being less forgiving, Python feeling simpler leading to carelessness, and the IDE trying to be helpful with errors as students wrote Python. In C, it took the compilation step to find an error whereas Python would identify warnings immediately, a "feature" that muddied the debugging process.


on-What are pre-requisites for teaching version control to a high school CS class?

The biggest one for me would be a reason to use version control. When you're writing small lab assignments, version control probably isn't worth all that much. It's when they get to a point where projects become larger than a handful of methods, or when you're working on separate pieces of a larger project with partners that it becomes useful.

Version control, specifically Git and GitHub, is definitely on my list of new topics to add to my 2nd year course next year. My students are doing collaborative projects right now and it's painful to watch them email code back and forth.


General overview on updating to Java:

First, a general observation about updating to Java. Previous versions of Java used to be released about once two years or so. As of 2017, Java has switched to a bi-yearly release schedule: there will be a new version of Java released every March and September. Each release is also guaranteed to receive two updates (one update per each quarter of the year) before they are no longer supported.

The plan is to also to have a long-term support release (LTS release) once every three years. Java 8 currently is special-cased to be supported until 2025, Java 11 (which will be released in September 2011) will be the first regular LTS release. Java 11 will be supported until at least 2021.

What this all means is that you should be cautious about updating to Java 9 or 10. They may have useful features, but they also have a shelf-life of only 6 months. Java, in theory, is designed to always backwards-compatible, but there are always going to be bugs and breaking changes, so it will likely be less of a hassle if you just wait until whatever the next LTS is going to be.

In particular, you should definitely test your assignments and course infrastructure to make sure there are no kinks or bugs anywhere. The major players ought to be reasonably up-to-date, but if you require the students to use specific plugins or libraries, there may be unexpected breakages. (I found this out the hard way).

General overview on updating to Java 9 and 10:

In my opinion, Java 9 and 10 are mostly incremental improvements over Java 8, particularly from a pedagogical point of view. Specifically, Java 9 does not introduce any major or breaking changes to the language itself. Java 10 added support for variable type inference, which is a nice convenience but not too big of a change (for now?).

Here's a quick summary of the changes I think I worth highlighting in particular:

Language changes and major new features:

Java 9 introduced a REPL called "jshell". This is probably the most relevant and useful change from a pedagogical point of view.
Java 10 introduced variable type inference -- e.g. if you type var a = new StringBuilder(), the variable a will be inferred to be of type StringBuilder.

Although this feature may be worth mentioning, I think it's also safe to largely ignore -- see the section below for more discussion.
Java 9 introduced a new module system (Project Jigsaw). Although this this is a potentially major change to Java/the Java ecosystem, it's unlikely to impact your curriculum in the near future and is probably not something worth teaching (see below).

At most, if you want to be super-precise when explaining how Java works, it might be worth mentioning Java now includes an extra "linking" stage which is necessary when using multiple modules.

Looking forward a few years, project Jigsaw (which, among other things, lets you bundle together a subset of the JRE) could mean that Java could see more usage in robotics and embedded systems, which may in turn increase the number of educational resources available in that area. This is just a hypothesis, though.

Minor new features and quality-of-life improvements:

Java 9 supports Unicode 8.0; Java 8 supported 6.2. This is potentially useful for teachers and students from non-English speaking countries. Unicode 8 also supports a wider range of emoji, which your students may or may not care about. Java 10 followed this up with some additional minor improvements also related to internationalization.
Some of the new APIs might make it easier for you to write tooling and infrastructure -- in particular, the external processes API and the stack-walking API.
Interfaces in Java may now contain private methods. This may slightly affect how you teach ADTs, Java abstract classes, Java interfaces, and so forth.

You may also be able to use this new feature to actually help minimize the amount of time you spend having to teach Java. That is, Java currently has two mechanisms for encoding the notion of an abstract data type: interfaces, and abstract classes. Depending on the kinds of assignments you give out, you may have needed to explain how to use both. Now that interfaces are slightly more powerful, it's possible you may be able to adjust your assignments and skip having to explain abstract classes altogether.
Java 9 and 10 together introduce a variety of convenience methods for more conveniently creating and copying collection types -- e.g. List.of(a, b, c, ...), which creates an immutable list, and List.copyOf(list), which creates an (immutable) copy of the given list.

Other changes:

Java applets are deprecated in favor of "Java web start", whatever that is. This may or may not be relevant to your course.
Strings are no longer implemented using an array of chars and are now stored in a more compact form. This will have no visible impact (apart from improving performance), but it does mean saying "Strings are implemented using an array of chars" is technically a lie (again...).
The way foreach loops were translated to bytecode was actually slightly buggy and could prevent garbage collection in some cases -- this issue was fixed in Java 10. This is unlikely to affect you and your students, perhaps unless you are deliberately asking them to work on assignments that ask them to manipulate large amounts of data.
Java 10 added a few extra features to make using and configuring Java on Docker containers nicer, which may make instrumenting and sandboxing student code slightly easier. More details

Details: Changes in Java 9

Here is the document describing the full list of new features in Java 9: https://docs.oracle.com/javase/9/whatsnew/toc.htm

If you skim through, the majority of the features should have no real impact for both the average Java programmer and for students -- they add additional options for tweaking the compilation and deployment process, and some API refinements.

There are, however, a few features worth talking about in more detail:

jshell, the new REPL tool: this is probably the most useful change, pedagogically speaking. There were a few Java REPLs floating around before, but none of them were very polished or easily usable, from what I understand -- most of them were built into IDEs instead of being available as a standalone tool.

Since this is only a tool, and not an actual change to Java, this would effect only how you present your curriculum, and not the curriculum itself.

One potential blocker to using this in a classroom setting is that jshell, to the best of my understanding, is a command-line based tool, which isn't immediately accessible to beginners. It'll probably take a little bit of time before the tool is nicely bundled and packaged up in a GUI that students can easily use. It's possible this'll be resolved by September, though.
Project Jigsaw, the new module system: while this change is exciting from a technical point of view, my opinion is that it shouldn't really change anything in a typical CS1 and CS2 curriculum. Your students will likely have their hands full trying to learn how to write programs that are only one or two files long at most -- once they're ready to start working on large projects where modules are actually necessary, they'd likely be technologically mature enough to understand how the module system works relatively quickly.

I think focusing on the new module system any earlier then that would be a mistake -- I feel fairly strongly that CS1 and CS2 should be focusing on teaching the core fundamentals of computer science and problem-solving rather then the quirks and foibles of any one particular programming language.

If you do want to incorporate modules into your curriculum, the best place to do it would probably be after students are comfortable with objects and packages: you can introduce this change as an additional tool for encapsulation that lets "encapsulate" many packages, in the same way packages let you encapsulate many objects. Alternatively, you could introduce them as a refinement over standard jars.

A third place you might introduce or revisit modules is when talking about graphs -- dependency management is an application of graphs and resolving dependencies can notoriously difficult in practice (dependency resolution is often, in fact, NP-complete), and it might be interesting to explore different ways programming languages attempt to solve this problem from a software engineering perspective. This is probably too much and too abstract for intro courses, though.

In any case, I imagine the main thing to watch out for is tooling and infrastructure changes, and various 3rd party tools and libraries adapt to these changes.

Depending on how precise you want to be, you may also need to adjust your explanations of how the Java works (on a high level) to your student -- Java 9 introduces a new "linking" stage which is necessary when using multiple modules.

If we look forward beyond the immediate future, another thing that you might want to watch out for (not in the immediate future, but perhaps several years down the line) is for educational resources and various libraries that allow you to use Java on embedded systems. You can, of course, already do this (Raspberry Pis support arbitrary programming languages, FIRST Robotics supports Java, etc), but one of the benefits of Project Jigsaw is that it's now possible to bundle a subset of the JRE into an application.

This was previously not possible, and I can see people leveraging this to try and make Java run on platforms it was previously unable to run (or making it run more efficiently on existing platforms). I think it'll take some time before we see meaningful results in this area (if at all), but perhaps something worth keeping an eye on.
Internationalization changes: Java 9 now supports Unicode 8.0; Java 8 supported Unicode 6.2. This change adds approximately 10,555 new characters, 29 scripts, and 42 blocks, which I imagine would be useful if you're teaching programming in a non-English speaking country.

Somewhat more relevantly, Unicode 8.0 supports a wider range of emoji, which seems like the sort of thing that could leverage to make an entertaining set of lessons and homework assignment, especially for students at the K-12 level.

It's worth noting the latest version of the Unicode standard is actually 10.0, so Java 9 still isn't fully caught up.
API changes: most of the API changes are minor. The streams API gained three or four more utility methods, the collections library has some new convenience factory methods which might be handy, the process API seems to be much improved (though your students were unlikely to be using that anyways). I suppose you, the instructor, could use the new process API to write better tooling and infrastructure.

One thing to perhaps keep an eye on is the reactive streams interfaces. It appears that the plan is for various 3rd party libraries to implement libraries based on these interfaces, helping increase interoperability. This, by itself, doesn't really seem worth teaching, but programming languages do seem to be adding enhanced support for asynchronous programming as of late. (e.g. Python has async-await keywords now, Node.js grew popular a few years ago in part because it had a good story for asynchronous programming at the time...). The takeaway seems to be that async programming is an increasingly popular paradigm -- in that case, it might be worth teaching it to your students.

That said, I don't know if Java is the most appropriate language to do this in, or if this is an appropriate topic for intro courses. If you're going to do this, if at all, it should be probably relatively late, once you're convinced your students are ready to learn additional paradigms beyond imperative and OOP. You could maybe introduce this earlier if you cover web programming if you really want, since asynchronicity comes up everywhere in that subdomain, but this seems sort of moot, if you're teaching Java.

Another thing to perhaps keep an eye on is the new Stack-walking API. You (the instructor) could perhaps leverage this API to provide students with better tooling to help them debug their code or to allow you to perform more fine-grained analysis when writing automatic grading scripts.
Language changes: the language changes also seem to be relatively minor. The main thing that might be worth mentioning is that private interface methods are now allowed, and that using underscore as an identifier is deprecated.

If you previously needed to teach students how to use both abstract classes and interfaces (e.g. if you want them to extend some code you provided for an assignment), this change may be enough to let you convert over to just using interfaces, possibly letting you avoid needing to talk about abstract classes entirely.

Strings are also no longer implemented using a char array -- rather, they're implemented using a byte array with an encoding field to improve on space efficiency and possibly performance. This, of course, makes absolutely no difference to the end-user, since the API is completely unchanged, but it does mean saying "Strings are implemented as an array of chars" is technically a lie, again. This statement is now completely true only in Java 7 and 8.
Applets are deprecated: Java web applets are deprecated in favor of "Java web start", whatever that is. I imagine most people aren't using web applets anymore, but if you are, upcoming versions of Java might be breaking changes.

Details: Changes in Java 10

The changes landed in Java 10 are comparatively smaller (which makes sense -- Java 9 was released about two years after Java 8; Java 10 was released about 6 months after Java 9). You can find a full list of changes at the following two documents:

http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html
http://cr.openjdk.java.net/~iris/se/10/latestSpec/

Some changes worth talking about:

Java now has variable type inference. That is, it's now legal to do:

var foo = new MyLongObjectType();

This is treated as being exactly equivalent to doing:

MyLongObjectType foo = new MyLongObjectType();

This is a nice feature, but (IMO) is really only a minor quality-of-life improvement especially since it's unlikely you'll have excessively long class names in a pedagogical setting.

This feature also interacts oddly with the diamond operator. For example, the following code:

var foo = new ArrayList<>();

...is treated equivalently to doing:

ArrayList<Object> foo = new ArrayList<>();

This is unfortunate for two reasons: (a) the inference engine is not smart enough to infer the correct inner type based on context (b) the inference engine will always default to inferring the specific type instead of the interface type.

For these reasons, I think variable type inference is (currently) more trouble then it's worth to teach.

This may change in the future though, if Java were to one day add anonymous types a la C# -- type inference plus ad-hoc anonymous types is a potent combination that you can leverage to write code in a much more fluent way then Java currently allows. (No more having to create a bunch of one-off classes everywhere!)
Java 10 (and Java 9) added a variety of convenience methods revolving around creating and using various collection types in cleaner ways. The two releases taken together have added the following methods:

List.of(a, b, c, ...): creates an immutable list
Set.of(a, b, c, ...): creates an immutable set
Map.of(k1, v1, k2, v2, ...): creates an immutable map (up to a fixed number of key-value pairs)
Map.of(entry(k1, v1), entry(k2, v2), ...): creates an immutable map containing an arbitrary number of key-value pairs. Requires you to statically import the Map.Entry.entry method.
List.copyOf(list), Set.copyOf(set), and Map.copyOf(map): creates an immutable (shallow) copy of the underlying data structure. If the data structure is already an immutable list/set/map, it's returned unchanged (no copy is made).
Optional.getOrThrow(): equivalent to Optional.get(), but is now the preferred name.

These are all minor changes, but they might serve as a good opportunity to have a discussion about the current trend towards preferring immutable data structures/an immutable style of programming.
A memory leak related to foreach loops are now fixed -- the generated bytecode now explicitly sets the implicit iterator to null, which can help prevent memory leaks in some cases. This may potentially affect assignments where students need to manipulate large amounts of memory (and is also an interesting case study of how you can find bugs in even seemingly well-used and well-tested code).
The javadocs tool has seem some minor improvements -- there's a @summary tag now; there's an --overridden-methods=VALUE flag you can use to group documentation about inherited methods with no spec change together. More details.

Java 10 added a few extra features to make using and configuring Java on Docker containers nicer, which may make instrumenting and sandboxing student code slightly easier. More details
Java 10 removed several methods from the standard library -- however, it looks like they were all obscure and relatively unused methods, so it seems this is unlikely to be a breaking change for anybody. Full list.

And finally, I think it's also worth briefly mentioning changes that do not appear to be a part of Java 9 and 10. From what I can tell, value generics (e.g. List<int>), value types, and reified generics appears to be have been deferred to Java 10. These proposed changes to how Java's generics function, had they been included in Java 9,  would have required some changes to a Java-based curriculum, but alas, not yet, it seems.

I believe there were also some plans for adding new APIs for JSON manipulation, and money/currency stuff, but those also seem to have been deferred.

It's unclear if these proposed changes will land by Java 11, but if so, that version of Java would be the one to keep an eye on.


Good resource for practice problems for inductive proofs

Any book on elementary number theory will likely have quite a few recurrences as examples and in the exercises of the early chapters. For example, the sum of the first n odd integers is $n^2$. As a recurrence this is just $n^2$ = $(n-1)^2$ + $2*n - 1$. Or possibly it will be shown as $a_n$ = $a_{n-1}$ + $2*n -1$, with $a_1$ = 1.

Some books on discrete math have many of these as well. Some even have these in summation form, rather than as recurrences.

Likewise the sum of the first n integers (start counting with 1) is $n(n+1)/2$.

From these recurrences or sums you can develop a program to give the students or have the students prove the relations and then develop the program themselves.

Even a web search for recurrence relation turns up some ideas.

A rather important sum (the geometric sum) is this: Let r be a real number and k a non-negative integer. If $r \neq 0$ then $\sum_{n=0}^k(r^n)$ = $(1 - r^{k+1})/(1-r)$.

Moreover, if $|r| < 1$ then as k increases this sum approaches 1 - r  which leads to an infinite sum that is pretty comprehensible.

Also David Gries' The Science of Programming has interesting examples that he shows along with how to develop programs from pre and post conditions. The book has been mentioned in answers to other questions here also.


What is a good analogy to introduce databases and SQL?

I think that to understand the SELECT queries, the Who is Who? / Guess Who? game could serve as a nice metaphor.

The idea of the game is: you have a group of pictures of persons with different facial features. One gamer selects one of them and the other gamer has to make questions to try to eliminate the ones that are not relevant and try to guess which one the other gamer has chosen. It is kind of like what you do in the WHERE part of the SELECT...

SELECT faces
FROM board
WHERE hair = white
AND has glasses
AND has a mustache
...

Maybe this game is now so popular currently... it sure was when I was a kid.


What 'procedural' habits to break when teaching 'functional' programming?

I undertook this study myself about a year ago. I started working through the Programming Languages MOOCs on Coursera (Part A Part B Part C), which are based on a UW course of the same name.

I didn't really know what I was getting into, but it sounded interesting. Before I knew it, I was learning a radically different approach to programming first with SML and now with Racket (Ruby is up next).

Here are some of the key ideas that were a major departure from my having programmed in C and Python:

Avoid mutation. Over and over again the professor emphasizes why mutation is a bad thing (or at least potentially problematic). From the world of C where I learned about declaring and updating variables almost immediately, this forced me to think differently about the information my programs contained and processed.
Don't call them variables. As a continuation of the above, they aren't variables (because after all they shouldn't vary because they don't mutate); rather, call them "value bindings." Moreover, these value bindings exist in an environment. This latter idea is essential (and has only recently sunk in) for understanding function closures.
Think recursively. Of the 3+ assignments I've completed for Part A and Part B, thinking recursively has been an essential component for creating elegant, efficient solutions. Indeed, in some cases it's been the only way to solve a problem thanks to the goal of avoiding mutation. This is not to say that recursion doesn't exist in other languages (because it obviously does), but it's been a more fundamental element to the design of solutions using functional programming languages.

Those are my big three; I'm sure there are more. Obviously understanding anonymous functions, higher-order functions, first-class functions, and all that comes with them (e.g. currying) is what functional programming entails. However, this content wasn't a "rewiring of old habits" in the same way that the above points were.

For what it's worth, I appreciate what C has taught me about what happens on a lower level, but I think studying a functional language qua an approach to programming has made me an overall better programmer.


How should students be encouraged to reflect and improve after summative assessment?

First, I dispute your statement that "the summative exam does nothing other than provide a coarse measure of the candidate's performance during the exam."  Assessments are not merely chances for us to discover how the students are doing, they are also useful in the learning process itself.  They provide a focus for study, and they provide vital motivators for memory retreival, and they provide the stakes that allow strong enough emotions to trigger memory.

Now, as for your question itself, I have also particularly struggled with summative assessments, and I ultimately concluded that I did not really believe in the model, and could not administer strict summative assessments in good conscience.

You've pinpointed the problem perfectly: once you've given a summative assessment, where do you go from there?  Instead, I utilize a test-retest model for all assessments provided throughout the year.   Every retest is provided with a lower maximum attainable grade.

At my current institution, I have calibrated this at 6 points per makeup.  (At a previous institution, I used 8 points.)  This is not a deduction, it is a cap.  So, earning a 65 on a first makeup will net you a 65, but earning a 98 will net you a 94.  My goal is to encourage targeted study, so I do not allow for further makeup penalties.  This means that the highest grade always wins, so you cannot lose points by taking a makeup.

Now, I also create a practice quiz or test for every assessment.  This approach certainly involves a lot of work on my part (as I am always making 3 versions for practice-test-retest, and sometimes have to create 4, or even 5, assessments), but I love the net results I get in my class.  This system has virtually eliminated students falling seriously behind.

I do have a rule that students who fall below a certain grade (a) must take a makeup, and (b) must check in with me or a pre-approved student (roughly a TA) before they are allowed to take it.  This prevents the problem that some students have of simply taking makeup after makeup, with no appreciable improvement from one exam to the next.


How can I convey the idea of a programming language vs. a markup language?

I also have this problem frequently.  I use the example of Microsoft Word, and I would say something like this:

"Word allows you to give a document the appearance that you'd like.  You can bold, you can center, you can change font sizes.  Word is creating a markup (in this case, it is generating a type of markup called XML).  "Markups" mark up text, just like it sounds.

But, could you create Word itself in Word?  You can edit fonts, you can center text... but does any of that give you the capability to make a whole program like Word?  Similarly, you can't use Word to make Firefox, Chrome, or the alarm clock on your phone.

Markup languages only format documents, but when you need to actually make a function calculator, or an iPhone app, or a video game, that's when you need code instead."


How did you begin to teach Java to your students? I bet you didn't start by showing them the Backus-Naur form that the Java parser follows. Instead, you probably introduced a simple "Hello, world" program, and slowly built on that with assignments and projects for the students to work on.

I'm sure you can see the parallel here—teaching XML as a prerequisite for HTML is not, in my opinion, a productive or helpful exercise. XML is a rather boring language; it doesn't do anything, so you don't get that instant feedback when you write some code, unlike in HTML, where you can see the webpage unfold as you add elements.

HTML is also simple enough that you can generally pick it up as you go along; explaining that you start an element with <tag> and end with </tag> should be simple enough, and any mistakes in the markup will be visible when you load the page.

As a general rule, if you want to teach [insert language here], you probably don't need to teach a different language first; teaching XML to make HTML easier probably won't give you the benefits you're expecting.

I'm rather partial to the typical "Hello, world" for HTML. Almost certainly, your students will spot that the title is "My First Webpage", and I imagine that they'll be able to guess
 with some guidance.

        <title>My First Webpage</title>

Hello, world!

The general structure should be obvious, and you can reinforce it with some tasks, such as:

  Add a paragraph (
) after the heading.
  Add this image: [insert image link here] using

I would expect that  would need some explanation, because it will be the first element with attributes, and it's self-closing, which is different to all the others.


If your student has tried it once, you can use sudoku as an example (it does not work so well if the student has never heard of it).

Given a completed sudoku grid, write a program that verifies that it is valid: your student can probably write this simple program in a few minutes, or if you give the answer see that it is really easy.
Given an incomplete sudoku grid, write a program that completes it. Much harder (although semi-naive backtracking works well for 9x9 grids)!

It gets even better because, if you already gave the Map coloring (or graph coloring example), you can show easily that a 9x9 sudoku is just a particular instance of graph coloring and this becomes a good example for NP-completeness. (Just remark that a 9x9 sudoku is just a graph where each vertex corresponds to a cell in the sudoku, and an edge between two vertices means that the two corresponding cells are in the same row, column or block. Once a graph is built, try to 9-color it).


The value might not be in knowing octal itself (although as noted in the comments, there is inherent relevance to it). Rather, it might be what learning different bases teaches about abstraction and the representations of numbers in general.

I think of this Essential Knowledge statement from the AP CS Principles curriculum:

  EK 2.1.1G Numbers can be converted from any base to any other base.

The transition from decimal to binary is one step, and the move to hexadecimal can be an even bigger jump. To then have students see that there can be base-8 or base-32 or base-60 or base-37 is at times mind-blowing. The design of a particular base system, while not entirely arbitrary, is a design choice that comes with advantages and trade-offs.

Moreover, this process of conversion to and from different base systems strengthens students understanding of the underlying algorithmic process. The example I share with students is that 100 in any base system is equal to the value of that base squared. (Indeed it verges upon tautology.) Part of that is breaking down the idea of the 1s place being followed by the 10s followed by the 100s, etc. and replacing it with 10^0 followed by 10^1, etc. Replacing 10 with 2, 8, 16, or any other integer becomes trivial.

Having students see that 100 is not so much "one hundred" but a combination of base numbers and exponents and why that is is powerful.


Can sharing learning stats be beneficial to guide beginner students?

We had a question recently that also touched on some of these same issues.

I am a fan of expressing that the material can be difficult, as it sets the tone and prepares students to work hard in a course. However, if failure rates are as high as you suggest, then that suggests something is going seriously wrong.

For context, I teach at a high school where kids apply during 8th grade into 4-year majors. They are tested in math and literacy, and we interview them to see if they are generally engaged kids. We do not evaluate them on programming or CS background, because most of the 8th graders have none.

If accepted, they cannot change their major at any point. That means that our CS kids will have a 4 year CS curriculum that builds upon itself, and it gives us teachers a very powerful motivation not to lose kids at the beginning. It simply isn't a viable option. A freshman who gets lost will probably remain lost for their next 3 years in the school.

Not every kid remains enthusiastic  about CS. That's okay! They applied to the school when they were quite young, and many move on to other interests.  However, over the last 3 years, we have had exactly one student not pass the AP test as a sophomore, and that student was dealing with significant mental health challenges that also brought about high absenteeism.

Now, a university program is not under the same constraints, and not every student at every institution can be classified as "gifted" (whatever that actually means), so I can absolutely accept that our results might be an outlier.

However, virtually everybody can learn to code. It comes down to what work the student puts in, and how well the instructor breaks down the concepts and designs the course materials.

My general advice to achieve high passing rates is to create good supporting materials to use with kids who struggle, and to break things down (and make connections explicit) far beyond what you would think you would need to. I know that that advice is quite vague!

And if you are ever unsure about how to break down an idea really clearly, ask around. (Heck, I could tell you about this one website devoted completely to getting answers to the problems of CS educators ... ;-) But please don't accept a 30% failure rate as the norm, or even as acceptable. So much more is possible!


How do I construct a basic lesson on computational complexity and undecidability?

The hard parts of this are hard for everyone, of course: P = NP (or not). But the others aren't too difficult to get across in a short period of time, especially if the students have something of a math background.

You can easily construct problems that grow exponentially and whose programs for solution must also grow at that rate. Drawing a completely connected graph for example and adding vertices.. Listing all of the permutations of n distinct elements, for example.

The halting problem is great, of course, and you can often use a graphic to illustrate the problems: a machine that takes machines as one input and tapes as another.

But you can also convince students that most problems don't have solutions as there are only a countable number of computer programs given any finite character set. But the number of problems is uncountable. The fact that we know of only a few unsolvable problems is similar to the fact that we know only a few non-algebraic numbers, though most (again uncountably many) real numbers are not algebraic while only countably many are algebraic.

But laying out the broad outlines (feasible, non-feasible, non-computational) lets you say a few words about what we don't yet know and why CS, like math, isn't a fixed body of knowledge, but a field ripe for research.

You can even go a bit farther and talk about the issue that for some problems a solution is hard to find, but easy to check, which is fundamental to encryption. It is hard to find factors, but easy to check that they are factors once found. This gives you a way to talk about nondeterministic algorithms of which "repeatedly guess and check" is one variety.

One final idea that can be fun. Assuming you have already covered sorting to some extent, you can have the class, or small groups within the class, brainstorm the most inefficient sorting algorithm they can think of. But it needs to be an algorithm, not just randomness. But "Mix the values and check if sorted. Repeat until done." is actually an algorithm if your mixer is truly random. That is, it is guaranteed to sort.

If your students know some calculus, you can mention Newton's Method for finding zeros of a function. While it seldom gives you the exact value it is a process (pseudo algorithm) for guessing and then improving the guess in the next iteration. I say "pseudo algorithm" since it isn't guaranteed to terminate or to find an exact answer. But it is an improvement on pure "guess and check"

A resource on Non Computability and its relation to self reference and recursion is this paper by Owen Astrachan of Duke


Strategies for self-learners to transition into working on larger projects

You have set a difficult task. The reason is that there are two dimensions here, not one. The first is that larger projects are usually built by teams and not by individuals. Certainly if you are interested in preparing for employment, then teamwork is essential. The second dimension, independent of the first is that larger projects are normally built to the vision and specification of someone other than its builders.

This leaves four cells in a grid. You probably already have experience building alone and to your own vision. This is the easy case. The hardest is building in a team to someone else's specification. You can get there immediately but it is very difficult to transition that way. Instead you can first move through one of the other cells.

You can find a team to work with you on some project of your own vision. You can, perhaps, find a description of such a project online or in a course description. You can also just try to replicate some software that you normally use that seems big to you. Build a spreadsheet program, for example. The hard part, however, is to find the team to work with. Note that the project need not be terribly large, but you will learn important large-project skills in any case.
An alternate way is to move into the other cell. Build something yourself, but with another person specifying the program. This will be a lot harder than what you usually do, but is an essential step. One way to find the problem is to find the client. It could be a teacher with a need. It could be a local social service with a need. It could be anyone with a need. But you need to give complete control over what is to be built over to the client, while you are creative only on the how to do it. Again, the size of the project is less important than that you are learning how to work with a client.

Once you have some experience in one of the above, you will be ready to move to the externally specified-team built cell. But the experience in the simpler case may give you some insight into how to find the team and the client. Scaling at this point will be more reasonable than you think.

Good Luck.

I should not that even in formal education, when a project is specified by a professor, it isn't quite the same as working for a client. The typical university project normally grants the student a large part of the design space. A true client will not. Normally the professor won't ask you to change direction in the middle of a project. A client might. A professor might grade you. A client might just reject your work or ask you to do it over. A university project is normally thought out completely in advance by the professor. A client may make it up as you go along.


How Can I Apply Spaced Repetition To Teaching CS?

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.


TL;DR Use the Python module dis to show students Python's bytecode alongside Java's bytecode. Avoid the "compiled v. interpreted" rabbit hole to start (because it may lead to more confusion than clarity) and instead show students what's actually happening underneath the hood.

Begin by defining "bytecode" in the context of Python. Here is the Python 3 documentation:

  Python source code is compiled into bytecode, the internal
  representation of a Python program in the CPython interpreter. The
  bytecode is also cached in .pyc files so that executing the same file
  is faster the second time (recompilation from source to bytecode can
  be avoided). This “intermediate language” is said to run on a virtual
  machine that executes the machine code corresponding to each bytecode. [emphasies added]
  Do note that bytecodes are not expected to work between different
  Python virtual machines, nor to be stable between Python releases.

That might sound to students not too dissimilar from their experience with Java and its use of a virtual machine. Also, take a close look at the documentation for the dis module.

Let's consider this very short Python program test.py:

print("Hello, CSEducators.SE!")

If I run the command python -m dis test.py, I see the following Python bytecode:

  1           0 LOAD_NAME                0 (print)
              3 LOAD_CONST               0 ('Hello, CSEducators.SE!')
              6 CALL_FUNCTION            1 (1 positional, 0 keyword pair)
              9 POP_TOP
             10 LOAD_CONST               1 (None)
             13 RETURN_VALUE

Now, let's write Test.java:

public class Test {
    public static void main(String args[]) {
        System.out.println("Hello, CSEducators.SE!");
    }
}

I run javac Test.java then javap -v Test.class. Here's a small part of what I see:

  public static void main(java.lang.String[]);
    flags: ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
         0: getstatic     #2                  // Field java/lang/System.out:Ljava/io/PrintStream;
         3: ldc           #3                  // String Hello, CSEducators.SE!
         5: invokevirtual #4                  // Method java/io/PrintStream.println:(Ljava/lang/String;)V
         8: return
      LineNumberTable:
        line 3: 0
        line 4: 8

This is only a small part of it; the full output leaves a lot to explore. Nonetheless, at this point, students will see fewer differences than similarities (hopefully).

Additionally, consider this SO question: "Compiled vs. Interpreted Languages". It's not quite so black-and-white, and forcing it into a pure dichotomy may do more harm than good.

Let it be a bit messy. That's what learning is all about.


How to bring attention to computational complexity?

One technique I use for sorting algorithms follows after CS50's demonstrations of the differences among bubble sort, selection sort, and insertion sort. I have 8 students line up in the following order:

4 - 2 - 6 - 8 - 1 - 3 - 7 - 5

Here, 4 represents index 0 of an array of numbers I'd like to sort. I literally walk them through the algorithms, and they can see how much walking I have to do up and down the "array" in order to get it sorted. When it comes time to examine the code for these algorithms, I remark on the use of for loops and how nested for loops lead to $O(n^2)$.

We compare the iterative approach with the recursive approach of merge sort (which certainly could be added to the "walking" demo), which goes back to something we discuss on Day 0 about linear v. binary search. I have students explore this visualization tool. There are also a number of videos on YouTube I draw from that compare algorithms sorting the same data.

Students also have to complete an assignment called Sort Race, which requires them to implement sorting algorithms and test them against data sets of varying types: reversed, already sorted, all sorted but one, and random. When they see algorithms take a significant amount of time on an already sorted list, they get why it's not the preferred solution and can then go back to the code to see what slows it down (and what doesn't slow down others in some cases).


Do I need Prolog to teach logic concepts?

Logic is a tool for distinguishing true and false statements. If a statement is proved, then it is true. If its negation is proved, then it is false. Hence the core skill is checking whether a proof is correct and finding/inventing a proof of a statement.

Prolog is based on a subset of logic. A Prolog implementation finds proofs automatically. IMHO, anybody should learn how to find proofs by hand and have a bit of practice before using any automatic prover. Prolog is so weak that it can't find even simple theorems that are of interest, like theorems of Peano's Arithmetic. Moderately complex statements, like the axiom of induction, can't even be expressed in Prolog. No wonder that

  I tried to use this IBM's NLP as an example, but this pattern matching
  exercise does not covers much concepts from mathematical logic.

Prolog surely is an example application of logic, but it is too weak to show what mathematical logic is. A proof assistant is a better way. Prolog is not the only application of logic. Other options are reasoning about programs, hardware, and computer systems, proof assistants and provers, and Artificial Intelligence.


Introducing file systems to students who really don't understand

The problems

Hierarchies are not obvious

First let me point out that a hierarchy is not the most obvious or best structure for storing files. It is still based on library categorization systems, where a book can be in only one place. I file could be indexed in more than one place (and sometimes is).

A tag system as used on this-site, gmail and elsewhere, that allows you to give multiple tags to a file, is better. E.g Tag something as education, computers, file-systems, cats, boxes.

Tags should be arranged hierarchically, not files. However as educators there is little we can do about this.

Microsoft's Windows, Mac OS X, Android, and iOS hide things

Of the big four major proprietary Operating Systems (Windows, OS X, Android, iOS), Microsoft's Windows hides the directory structure the least. Apple is probably the big villain here. They made an active decision starting with the iPod and iTunes that directories needed to be hidden, and the world has been moving that way ever since.

What I say in this section applies generally to all 4, but I have given specific example for Microsoft's Windows.

MS-Windows has some strange non-folder folders (Desktop, Documents, Videos, Music), sort of like symbolic links but not. This causes problems of understanding. For example, I have used a tool and known that it has saved to Images, but have taken over 10 minutes to retrieve the file, as I did not know where on the file-system it was.

Recent versions of MS-Windows have dropped the ⬆ up arrow (I think they then brought it back again), in file explorer.
It only has ⬅ ➡ left and right arrows. This makes it difficult to navigate and experience the hierarchy.

Recent versions of MS-Windows, by default hide file extensions. This may not affect understanding of hierarchy but dose affect understanding of file names. (While I agree that file extensions to encode file type are a bad idea, hiding them under the carpet is just making it worse.)

Microsoft wants to store pictures with pictures, music with music, spreadsheets with spreadsheets. I want to store teaching stuff with teaching stuff: A class may have a presentation, a work sheet, some images, some source code, etc. it all needs to be kept together.

Some solutions

A teaching metaphor

I have taught some year 7 pupils (age 11 years old), by showing them a set of slide and telling them a story. The story was about how you can but a box in a box, and a box in a box in a box, and several boxes in a box. Boxes have names/labels, cats have names/collars. You can also put a cat in a box, but you must never try to put a box in a cat. Boxes are like folders/directories, cats are like files.

You can ask students: “Can a box be in more that one box?”, “Can a cat be, fully, in more than one box?”, “Can a box and a cat be in the same box?” …

If using Microsoft's Windows

Disable hide file extensions
Install classic start menu, it will enable ⬆ up arrow for folder navigation.
Do something about these Libraries (non-folder folders): In my Virtual Machine with Windows-7, I have disabled all of the libraries.

Learn the file-system and operating system.

I would teach the Unix command line (UNIX, Gnu/Linux, BSD). It does makes it easier to see how things work. Nothing is hidden, but things are often nicely abstracted. “It is so simple that, if you come up with a metaphor to explain how it works, it probably is how it works.” — miss-quoted from one of the founders of Unix (Thomas, Ritche or other).

I would also recommend using the dolphin file browser. Dolphin has an integrated command line, where directory changes are synchronised in both directions. This makes it easier to switch back and forth between text (command line) and graphical view and/or controller.

  You are currently in your home directory. Type cd «somedir» and press
  enter.

See the change in the Graphical part of the display.

  Click on a directory

See the change, in both GUI and command line

Gnu/Linux with KDE, has a great GUI, and command line. Intuitive, simple, and follows the principle of least surprise.

Gnu/Linux is more available (When compared to some other OSs e.g. MacOS, Microsoft's Windows) : You have the freedom to download it. Run it. Distribute it. Study it. Modify it.


Nna, its a challenge always. Your question resonates with me. I was and still is at the same situation where I am looking for interesting projects for my coding students. You asked for online resources or books or a list. I will share general principles I came to of how to create interesting projects in my similar difficulties (more difficult because I work in a developing country where resources aren’t easily available, and internet service is expensive and sometimes erratic). I’ll share specific examples in some cases.

Before that note something: in view of the level of your students, they may not do great projects “they can reflect on …” and use later yet because of their limited knowledge and experience. However, for beginner what you should strive at is to give them work that will exercise, stretch and consolidate their coding muscles.
My suggestions may not work for you. If they don’t I hope they stimulate enough tangential thinking in you that gets you there. Amen.

Now some “thinkPoints;” for students’ coding projects:

On strategy for giving projects: For freshmen, generally don’t expect “big” projects, give baby projects that are either stand-alone or parts of a bigger project which the students have to tie together at the end of their second semester.

consider posing problems from subjects they take or which you or them can find material for them to understand the issues involved e.g.
For Maths: Algebra, Coordinate Geometry, Arithmetic and Numerical analysis, Matrices, solving cubic equations, simultaneous equations etc.

For Physics: areas of interest may be topics in Mechanics like program to resolves or compose for forces, a program that takes input of any combination of time, distance and velocity etc. and automatically selects and uses the appropriate equation of motion to compute the required value. Smaller projects may be calculating linear & cubic thermal expansivities, receiving gas process inputs and the program making a judgement whether the process is isothermal, isochoric, adiabatic etc.

If they take general studies courses like Economics or are majors of it, better. Give them to develop a program that takes as input prevailing interest rates, liquidity rates and other macro-economic variables (you deem necessary), analyse them and give a prescription of whether the economy is on course, overheating or about to go bust. A more micro project will be like asking them to develop a program that calculates elasticity of demand and advise whether the demand is elastic, inelastic, unitary elastic etc.

For medical people or even others, let them build a program that calculates Body Mass Index (BMI) given height and weight of a person, use the derived value to advice a patient if he/she is obese  etc. and whether he/she is predisposed or not to hypertension and allied obesity diseases. The program should make a prescription of diet, drugs or life style change as is appropriate

Other subject matter, business or operational areas, Etc.

Where you or your students have no expertise in a subject matter in which you see an interesting project topic like the BMI example above, get a subject matter expert to prepare you a project background info paper that provides basic understanding. Take your students through and tell them to go read up more. That’s what every programmer does in subject matters areas (and there are many) of which we have no training or knowledge.

Set up academic type projects: E.g.
A menu-driven quiz that allows user choose a subject to take quiz from. The user picks any random number from a range of numbers of questions (“Enter any Question number you want to answer between 1 – 10”), is presented a question and allowed to choose an option or enter some text as answer. The score is announced and cumulated with previous scores and he/she chooses another question to answer till he/she decides to stop. At the end he/she is told his/her scores and congratulated or encouraged to try better next time.

A program that presents small amounts of materials as part of a lesson, allows student to branch of to find any further information. At certain points in the lesson, the user is given and graded on short quizzes before proceeding to next lesson.

Program to receive raw test/exam scores, convert them to letter grades (A, B, C etc.), and grade points (4.0, 3.5, 3.0 etc.), calculate G.P.A and C.G.P.A, highlights areas of students best performance and advises where the student can improve next term/semester then prints an e-mail to the student, faculty and his/her parents.

A synonym/vocabulary game where the system puts up a definition/usage or synonym and the student has to supply or choose from options, the correct word or synonym.

Take a problem you have in the operations or processes of the department or institution or personal life of the students and use as coding project. In these matters, involve the students. Ask their ideas, you may be surprised at the bountiful harvest of project topics.

For online resources, the easiest place to find good projects are the competitive coding sites like Codebyte, Project Euler, HackerRank, Codewars, CodeChef etc. However, as @Buffy has pointed out earlier, students could go to the sites too. & they could copy and paste code for you therefore doing nothing. So, always borrow project concepts from these sites and give it your own twist, complication and/or a local dimension that they can’t find easy online. & test google your final assignment concept to see if you too find anything thus verifying if they can easily “copy and paste” answers.

I hope even if you find nothing you can use here, your creative juices will have been stimulated to get you thinking of problems for students “baby” coding projects.


How do you make your CS lectures more interesting?

Kill 'em with clarity.

I have a working memory that borders on handicapped, which has forced me into a solution that I have not seen others do.  This is going to sound like total anti-orthodoxy, but I actually focus very heavily on my Powerpoints to keep things moving and breezy, and it really can work!  Fair warning, though: doing this well takes a tremendous number of hours to pull off.  It is not unusual for me to throw 2-4 hours into making a single slide.

I started with TED's powerpoint recommendations.  Many of the top talks there utilize PowerPoints, but take a look at those slides and you'll see something funny: there is virtually no text at all.  The 7x7 rule (no more than 7 lines of text, no more than 7 words per line) doesn't make for interesting slides.  I aim for no more than 5 words altogether, and 0 words is even better.  (I don't always attain this, but that's the goal.)

My slides consist almost exclusively of graphics and figures for discussion.  The graphics are often heavily animated.  Very little of the animation is aimed at being cute or funny.  The huge majority is designed to make sure that the concepts are extremely clear.  So, I might construct a graph in small segments based on the order in which I wish to discuss the parts.

For instance, when I talk about how two dimensional arrays are stored in memory, I begin with a graphical representation of how I suspect my students typically imagine it, and then have pieces fly out or fade in, slowly replacing the fictitious model with the correct systems one at a time, giving me a chance to talk about each new element.

The other thing I build into the slides is the activities I want the kids to do.  "Try this exercise!"  "Look at this prompt and work with a partner."  "First one to write the correct answer on the board wins!"  This was at first a nod to my terrible memory, but it has actually helped the pacing in my classroom as well.

The whole enterprise is very highly choreographed, and after every lecture I give, I make notes on any place where kids seemed to fall off.  If it slowed down or became unclear at any point, I rework that section, often very thoroughly.

There are still limits, and it is still lecture.  After about 30 minutes, kids will still start to very seriously drift if they don't have other things to do. However, the feedback I have received about clarity has been very consistent.

One addition I intend to make this year is pre-made notes for every lecture with blanks for them to fill in as we go, and integrated exercises that they can work on at various times throughout the lesson.  (Again, this is all highly choreographed.)

What I like about the system is that, as I hone it over the years, it really does get more and more effective.  It also provides me with a nice set of resources that I can share if students need to review material.


Research into the use of symbol names, in programming, and how it affects learning

You don't have control over the libraries, though you can provide a filter class that, itself, provides better names. Yes, names matter and shouldn't be confusing.

But when you create examples and libraries pay a lot of attention to the names. When you present them to the students and learn that there are confusions, change them. Even better, ask the students to suggest better names. One of the purposes of the Navigator in a Pair Programming scenario is to suggest alternate names to the Driver.

In my somewhat extreme view, every name should be intention revealing. The only exceptions are very common acronyms and abbreviations. But in general, I don't create either acronyms or abbreviations and try to make the names as clear as possible. I fail at this of course, but it is the goal.

However, in the current example, the students should also have a metaphor about the overall structure of the simulated world. Turtles only move in the direction they are facing. They can turn, either left or right. There should also be some per-instruction documentation that makes it clear. If they can learn to think in terms of the metaphor, rather than the detail, they will have an advantage as long as the metaphor itself is sound.

Also, in the current example, I'll note that too many people name things emphasizing short names over self-explanatory names. I sometimes think that they believe that the hard part of programming is the typing. There was a point in time in which program preparation (punch cards) was extremely frustrating but those times are gone. Good IDEs today do typing completion, so names seldom need to be typed in full. But even in the card punch days, real programmers employed data entry clerks who did the card punching from hand written coding sheets. A good clerk could correct quite a few minor errors along the way.


How to get girls more interested in computer science?

If you're just looking for the key points on how you can begin to solve the problem, you need only read the second section, but the first section provides valuable context on what the actual problem is and the root causes.

Why are so few girls interested in Computer Science?

There is an issue, not limited to CS, but throughout STEM fields (particularly Physics, Mathematics and Computer Science, according to recent examination statistics) with gender balance, where women are extremely underrepresented. In 2014, only about 10% of entrants for the Computing A-Level were female.

Miura (1987) suggests that women's self-efficacy regarding computing is lower, which leads to lower interest in the field and lower uptake at undergraduate level.

Fisher, Margolis & Miller (1997) also propose that women have less previous experience than men in the field—many have already started to self-teach or practice at home, whereas this is less true for women in the study. They also state that, from their interviews, women seemed to appreciate computing more as they went through their studies, whereas many of the men in the study showed a keen interest as soon as they were introduced to computing.

Fisher & Margolis (2002) discuss the "Geek Mythology"—the stereotypical male computer scientist—and its effect on women:

  While the stereotype of the computer science student as someone who is
  myopically focused on computing is rejected by many male and female students,
  women report more distress and are more affected by the perceived
  difference between themselves and their peers. One-third of the male students
  we’ve interviewed say they differ from the stereotype, that they have
  a broader range of interests than just computing. But twice as many women
  (more than two-thirds of those we interviewed) feel different from the
  stereotype. And 20 percent of the women we interviewed question whether
  they belong in computer science because they feel they do not share the
  same intensity in focus and interest that they see in their male peers.

How can this be changed?

Benbow & Vivyan point to a pedagogical solution which may benefit:

  Pedagogical interactions are an important factor in determining
  whether students feel included or excluded in a particular educational field, and our findings in
  this regard confirm results from previous studies. Most significantly, students across our sample
  reported that working with real-world problems, as well as active instructor encouragement in light of student
  questions and peer collaboration, made them
  feel more comfortable and more confident as computer science majors—often despite
  brogammer-oriented field norms.

There are many groups aiming to change the culture around computing, such as Django Girls, an organisiation running free, one-day courses for girls and women interested in web development with HTML, CSS and Python. Events like this would seem to satisfy the goals of a supporting group of instructors, and a real-world problem to solve, which favours participation from women.

As a teacher, even changing the classroom environment may help to favour women and girls. Cheryan, Davies, Plaut & Steele (2009) state:

  People can make decisions to join a group based solely on exposure to that group’s physical environment.
  Four studies demonstrate that the gender difference in interest in computer science is influenced by
  exposure to environments associated with computer scientists. In Study 1, simply changing the objects
  in a computer science classroom from those considered stereotypical of computer science (e.g., Star Trek
  poster, video games) to objects not considered stereotypical of computer science (e.g., nature poster,
  phone books) was sufficient to boost female undergraduates’ interest in computer science to the level of
  their male peers.

The solution to this problem might not be one big change; rather, lots of little changes might improve participation from girls and women in CS classes.

Trying to create real-world scenarios, in a balanced classroom environment may bring some more success, but it's often hard to know if the solutions you try actually have any effect. Ensuring the culture of the class doesn't become too male-oriented might also help to avoid bias against women in the demographics.

I'd be very interested to hear anyone's experiences with applying methods like this, and whether they did seem to make a perceptible difference.


Quick and easy intro to computer science for kids for an Engineering Field Day

Since Logo was intended for this age group you might explore something there. My quick idea would require two or three screens with some sophisticated and time consuming simulation running on one and the kids/adults exploring simpler exercises that might (or not) build up to the one running. You can run, for example, a space filler (Sierpinski) program and have the students explore turning, etc. With lots of trial and mostly error.

In Karel J Robot, the recursive graphical solution to the Eight Queens problem takes a bit of time and is built up from only a few primitives that can be combined and extended. So that would do for the running demo and the students can explore simpler aspects, such as a robot backing up, for example. The advantage of Eight Queens is that it is easy to explain, unlike, say, sorting.

You can do this sort of thing in most languages - a complex graphic simulation built up from simple parts. The students explore only a bit of it. They can even modify some of the code of the running sim and run it to see what happens. It can lead to a lot of laughter, and some insight. If you sit with them you can suggest things that do something fun/weird/good/bad and ask why that happened. Lots of possibilities.

But the running sim gives an unattainable target in the time frame. Like playing on the beach after professional teams of sand-castle builders have shown their skill.

The suggestion is that if the simulation is built with something like Model-View-Controller that the students only modify parts of the model.


Any auto grading site that supports all-testcases-in-one-file (and/or in github)?

At the TU Delft we've developed WebLab, which is used in various CS related courses. It has support for programming assignments, for which students code their solutions in a web-editor, and run their code against their own tests, and the spec-tests.

Grades are automatically calculated based on the number of succeeding specification tests.

As a Course Manager, you specify the spec-tests by writing JUnit tests in a single file (in case of Java).
Students can run the spec-tests, and the UI will only reveal the test score to students, while managers have access to the complete output of the program.

Optionally, the automatically computed grade can be combined with manual grading components (e.g. a checklist).

It provides an interface to walk over all submissions.
Each Grader can be assigned their share of the submissions to be graded

Other types of assignments supported include: Essay questions (manual grading), Multiple Choice questions (automatic grading), File Submission questions (manual grading) and Peer Review questions (manual grading). For programming assignments it has built-in support for Java, Scala, Python and C, but this can be extended with any language for which you can provide a Docker image that handles input/outputs results in WebLab format.

You can sign up and enrol for this demo-course to get an idea of its interface as a student.
If you're interested, we can set up a demo course for you by submitting a course request (sign in first).


Four relatively easy ideas would be to:

Conduct periodic code reviews where you point out style issues like these. If you make code reviews a regular thing, the repetition should hopefully help students eventually start using functions independently. Since your students are in elementary school, this should obviously be a very lightweight and informal code review.
Develop an automatic style checker for whatever language you're using to perform these sorts of style checks for them. (Hopefully, whatever language you're using is exportable into a text-based or otherwise structured format that actually does permit this sort of analysis.)
Heavily emphasize that if the students are at any point copying-and-pasting, they're doing something wrong. Make it clear that copying-and-pasting is a sin. (This is assuming whatever language you're using is actually usable enough to make this a truth rather then a lie.)
Give them a short style guide to follow; include a note about eliminating redundancy using functions/myblocks in the style guide. This will probably be more effective with older students.

If you have control over how students learn to code, a broader (and probably more effective) strategies would be to teach students how to use your MyBlocks/functions first and foremost, almost before anything else.

That is, teach them the absolute bare minimum functionality to make something happen, then teach them how to decompose a large problem into smaller subtasks, and have them create a MyBlock for each subtask. I would do this first, before teaching them things like control flow, variables, etc... Basically, make the idea of "refactoring" and "identifying subproblems" one of your first lessons.

The hope is that if you make using functions/MyBlocks one of your very first lessons, they're less likely to pick up the bad habit of writing redundant code.


LINQ to SQL alternative C# Visual Studio 2017 MVC

I cannot think of a better alternative for LINQ to SQL, especially in Visual Studio 2017. You have said that you have spent 2 years already into MVC, which means, familiarity with MVC can be assumed.

If so, I would say that don't give up on the LINQ + SQL + EF + MVC ( I will simply refer to this as the MVC combo ) combo yet. I am guessing that you have already looked at this link. I use that in my introductory sessions on MVC, and even newcomers ( I mean, people who have not even tried MVC, or any of the MVC combo components ) have found it easy to use. In my experience, 10 to 15 hours is all it takes to train folks on that (at least the basics).

Give it a go, and yes, if you have questions about that link as you teach the different sections, come back and post questions here. We will take care of it for you.


Teaching OOP in Java, to students who already know Java

I'm going to jump the gun a bit here and make a suggestion with less than complete information. Assuming that the students have seen a fair amount of Java and its libraries and also assuming that the book they used isn't terrible on OO concepts then I'd suggest that you run a project course. There are a fair number of possibilities for projects

One is to use your own doctoral research interest as stated in your profile and have students build a software system to solve fair cutting problems.

Another possibility is to use an old APCS Case study that was quite well developed and used for a few years in the APCS course in the US: Grid World. The study comes with a starting code base and a student manual.

You might also join the Greenroom and look at the various projects available there. It is also a community of educators who might be able to offer assistance. The Greenroom resources use the greenfoot IDE which is simple but complete, but the advantage in your situation is the various projects that you might be able to develop into a course.

The BlueJ IDE is a bit more sophisticated and the community there also publishes a number of projects via the Blueroom. Many of them might be considered as the basis of a project course.

Of course, another consideration is how well you know Object-Oriented programming yourself, as you don't say. If you are less than an expert, you might consider for yourself to look at something like Polymorphism: As It Is Played by Joseph Bergin. I don't think it would be suitable for a course text, but it might give you some background in OO thinking if you haven't already acquired it.

I also note that in a project course you have the opportunity to introduce students to some of the additional personal practices they will need as they advance, such as teamwork and, perhaps, pair programming and test first development. Moreover, to ease your own workload, a project course could be very flexible, with students starting work on early requirements while you develop later ones. I'm thinking of something like an agile methodology here, of course, with yourself as the students' "customer".

Of course, if you want them to learn OO style and not just build code, then you need to watch over them. There are a few ways you can do this. I'm assuming that your class is reasonably sized (say 20 or less). I'm not sure how to make it work for 80. You can use the class time as design sessions for coding. You can have students work in groups for a while and show you what they come up with. Initially you can suggest designs for sections of the project. The idea is to "nudge" teams in the desired direction, rather than to lecture on the ideal.

I used to teach the Compiler Course in which a goal was also to improve OO thinking. I would review the student's code every two weeks. Student pairs (or teams) would submit printouts in a folder every two weeks. They needed to use a highlight marker to mark the changes from the previous report. It is relatively quick to go through 10 or so folders if marked up. You don't need to note every detail in these, nor do you need to grade them, but just give any needed feedback. For many groups as check mark is enough. But for some, you know you need to provide more guidance.

If teams are larger (say around 5-6) I would do two things. One is that I'd appoint a "captain" who was responsible for keeping me informed (not for team management). I could discuss the periodic report with him/her. Depending on the number of students, you could have a weekly "captain's meeting" as part of class or office hours, perhaps. I also named teams with names they though clever to give them a sense of belonging. "Lions" and "Tigers" might work, or "Earth" and "Sky". I made up the names to avoid possible improper "creativity."


An example that compares a computational with a non-computational thinking approach

I think you have a misunderstanding about something, but I can't say precisely what. You seem to really be asking for two different sorts of CT, not CT vs something else. Both math and CS require some facility in CT and, thus, CT is a prerequisite, whether taught explicitly or learned on one's own.

So, if a student can provide a "trivial" solution to a programming question then they are already engaged in computational thinking. So no "example" is likely to be very powerful in extending their thinking.

But CT is much broader than that and is a skill that people need in general, not just for computing. You need it at the market to pay for things and check that you get the right change (or, you did before electronic payments became ubiquitous). But thinking in terms of orders of magnitude, at least is useful even when reading the newspaper about scientific discovery and maybe even politics.

Let me suggest a couple of things.

If you students seem to be weak in CT, then teach that prior to getting in to the details of programming, which has its own pitfalls. Use something like CS Unplugged if you want something directly connected to computing, or a more general approach. If they are already strong in such things, there may not be any need.

Second, independent of the strength of the student background, use a lot of metaphor in introducing new concepts rather than being pedantic about the details of programming. Use "real life" examples of the concepts so that students "get an idea" first about some important topic. But, always be aware that metaphors have limits and they can give the wrong idea about things. So, be ready to dispel those misconceptions.

An example is "search for the reddest apple". This might be useful as a metaphor, unless you can see all of the apples at once and use powerful visual cues that don't have an analog in computing, where things need to be looked at one or two at a time.


Teaching "CS integer" vs. "math integer"

This might be an interesting way to do it, but here goes.

Give your students a blank sheet of paper. Have them write out "3". Then have them write out $2^{10^{1000}}$. Most will probably stare at you blankly. A few clever/sassy ones will just write out the exponential notation. Tell them that just as they write out numbers a little differently depending on size, the computer stores numbers a little differently depending on type.

If a number has a decimal point, it treats it differently from a number like 1 or 2, and it treats that differently from a really large number and it treats all of these differently from something like a string. This is the whole reason that you have to convert between types when you ask for a number as input() in python and then get a TypeError when you try to add it - instead you must add float(input()) or int(input()). It's the computer's way of making life easier for itself, just like we make lives easier for ourselves using exponential notation.

Also, by now hopefully they've realized that the world of math doesn't directly translate to some of its uses. Math is a very abstract thing, though it describes many things remarkably well. Pure math is very different from most math they've seen, and I think they understand the difference, for the same reason they understand the difference between x = x**2 and $x = x^2$. It's a different context, so it has a different meaning.


Is it important to teach pointers in a first course using Java?

Learning about references is important, but I don't feel that learning about pointers is that important for beginning Java students. Certainly intermediate students will need to understand them.

When I started learning about pointers, I had a hard time grasping them at all until I learned assembly language. Once I learned assembly (for any processor), pointers made sense. It helped that I learned PDP-11 assembly at about the same time I learned C.  Since C is essentially structured PDP-11 assembly language, I was easily able to see the relationship between the pointer structures and the compiled code.

Java hides the concept of a pointer sufficiently deeply that I would be hard pressed to explain it with java. I can explain java structures in terms of pointers, but have difficulty expressing it the other way around. For teaching pointers and pointer concepts, I would probably use C (yep - plain old C, without the ++) and the x86 assembly language as a starting point.

After that, it's easy to explain that the JVM is built in C, and java object references are implemented as pointers.


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


Note-taking policy: laptops, or by hand?

Neither is better. What is true for one student may not be for another.

Studies can show trends. Students are not trends; they are individuals.

As an example I encountered today that seems to go against that wisdom, I caught a news piece about a local girl in the Scripps National Spelling Bee. As she spelled the word she was moving her fingers in a weird fashion. Half-way through the word I recognized what she was doing. She was "typing" the word as she spelled it. She was able to remember how to spell the word by remembering how she would type it.

I have personally attended classes with someone who "doodled" their notes. She drew random-looking doodles, not pictures or pictographs, as the instructor presented. Later she was able to translate her doodles better than I could translate my long-hand notes. She also scored better on the fact-based questions than most of the class.

There is one major drawback to laptop note taking in class, however: noise. Few keyboards are truly silent, and the key noise, even if it's just the sound of fingernails hitting the plastic, can be very distracting to other students.

If you're willing to allow it, and school policy does not prohibit it, a third option is audio recording.

I've only been in one classroom where computers were allowed to be on, and it was distracting. I've never allowed them to be used when I lecture, or even during study time unless it's also lab time.

What seems to work best for situations involving lots of data, especially where layout and syntax can be significant, is to provide the lecture material in some manner after the lecture has been delivered. That could be done via Google Drive, or some other online source. Online access allows the student to retrieve it when they need it without having to access it immediately after the lecture. It also helps for the disadvantaged students that may not have laptops to bring to school. They can access it from the library, or any other source of online access.


How do I approach teaching Python to 12-year-olds as a first-time teacher?

Check out the Python books written by Al Sweigart. His homepage Invent with Python includes some great, free resources that are geared to the age range of your students. In particular he focuses on creating games which is, in my experience, an effective hook. Two books to use to inform your teaching are the following (in order):

Invent Your Own Computer Games with Python
Making Games with Python & Pygame

You can read the books for free online and download each one's respective source code.
I've spent time teaching the age range in question, and most students just starting out aren't really fascinated by the finer details of variables, loops, and conditionals. They want to see something happen, to make the computer do something fun. Games are the perfect vehicle for this to take place.
Part of what makes Al's approach inviting is that there is a lot of supplied code that students can then customize. They might not get why variables matter at first, but if it becomes a discussion about tracking the level of a game or the current high score (or a list of all-time high scores), then the students' interest will be piqued.