Is there a compilation of AP CSP scores by curriculum? The overall distribution of scores for the first AP CSP (Computer Science Principles) exam was recently released, and I'm wondering how much is described there about students' performance when their classrooms used Code.org vs. Beauty and Joy vs. Mobile vs. all the other flavors out there.

Is there a site/blog post that compiles/reports the scores by curriculum?

I know it's a bit early to ask, but maybe this will prompt the creation of such a resource :)

I work for UTeach CSP and as far as I understand, the College Board released has results to endorsed providers from 2017-2018 (meaning projects like CS50 and CodeHS aren't included because they were approved after the beginning of the year). They are not planning to release the scores themselves, but leaving it up to providers to share. Below are links to provider score publications that I have seen. There may be information for BJC and PLTW, but I haven't seen them.

UTeach: UTeach Computer Science Principles and Underrepresented Students

Code.org: 73% of Code.org students passed the AP exam!

Mobile CSP: 78% of Mobile CSP Students Passed AP Exam


Order of parameter / variables on stack in C Several years ago, I put together this little memory address exploration for my students to help them to understand pointers, arrays, the stack, and the heap.
I just compiled and ran it in a new environment (gcc on a AWS Linux server) and the order of the parameters for foo are different from what I would expect. The local function variables (d1 and e1) now have a higher address in comparison to the function parameters (a1, b1, and c1).
The addresses for the parameters / variables in function foo are listing as:

&a1: fa2740fc
&b1: fa2740f0
&c1: fa2740e8
&d1: fa27410c
&e1: fa274100

Any thoughts on why variables d1 and e1 have higher addresses than a1, b1, and c1?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int* foo (int a1, int b1[], int *c1)
{
  int d1 = *c1 + a1;
  int *e1;

  e1 = malloc (sizeof(int));

  printf ("5) Addresses of arguments/variables of foo:\n");
  printf ("   Update your stack sketch.\n");
  printf ("     &a1: %x\n", &a1);
  printf ("     &b1: %x\n", &b1);
  printf ("     &c1: %x\n", &c1);
  printf ("     &d1: %x\n", &d1);
  printf ("     &e1: %x\n\n", &e1);

  printf ("6) Values of arguments/variables in foo:\n");
  printf ("   Include these on your stack sketch as well.\n");
  printf ("     a1: %x\n", a1);
  printf ("     b1: %x\n", b1);
  printf ("     c1: %x\n", c1);
  printf ("     d1: %x\n", d1);
  printf ("     e1: %08x\n\n", e1);

  printf ("7) *c1 == %x, why?  Explain using your stack drawing.\n\n", *c1);

  printf ("8) e1 is a reference to an integer, much like c1.  Why is e1 so\n ");
  printf ("   different in value?\n\n");

  return e1;
}

int main ()
{
  int a = 5;
  int b[] = {8, 14, -7, 128, 12};
  int c = 10;
  int d = 14;

  printf ("1) Locations...\n");
  printf ("   Use these locations to sketch the stack.\n");
  printf ("     &a: %x\n", &a);
  printf ("     &b: %x\n", &b);
  printf ("     &c: %x\n", &c);
  printf ("     &d: %x\n\n", &d);

  printf ("2a) Values:\n");
  printf ("   Why does b != 8?\n");
  printf ("     a: %x\n", a);
  printf ("     b: %x\n", b);
  printf ("     c: %x\n", c);
  printf ("     d: %x\n\n", d);

  printf ("2b) Values:\n");
  printf ("   What memory address is *b accessing?\n");
  printf ("     *b: %x\n\n", *b);

  printf ("3) Notice that the following increase by 4 each, why?\n");
  printf ("     &(b[0]): %x\n", &(b[0]));
  printf ("     &(b[1]): %x\n", &(b[1]));
  printf ("     &(b[2]): %x\n", &(b[2]));
  printf ("     &(b[3]): %x\n\n", &(b[3]));

  printf ("4) Pointers can be added, but the addition might have interesting results.\n");
  printf ("   Explain why b + 1 != b + 1 in the normal way of thinking about addition.\n");
  printf ("     b:   %x\n", b);
  printf ("     b+1: %x\n", b+1);
  printf ("     b+2: %x\n", b+2);
  printf ("     b+3: %x\n\n", b+3);

  foo (a, b, &c);
}

I haven't delved into the details, but if a language doesn't define its own implementation (few do) then the implementation will vary depending on the architecture for which it is compiled. It will also vary over time as research provides hints and clues about efficiency (both compile time and run time efficiency).
So, one stack protocol might be appropriate for one architecture, but wildly inefficient on another, depending on the registers available for the stack as well as, perhaps, paging systems, and all the rest. So, the implementer will take advantage of whatever hardware is available on the machine of interest.
The normally thought of "normal" architecture (register-transfer) disappeared in the 60's or so. It is fun to think about and to simulate, but not especially realistic. C was designed originally for the PDP-7 architecture, which is pretty much obsolete.
Also, if a compiler uses some top-down techniques derived from LL processing as well as more "normal for C" bottom up processing, the parameters, in particular might wind up in a different order. For example, a compiler might use an intermediate language that is itself compiled and who can say what the characteristics of that intermediate language might be.
It doesn't affect your question, I think, but heap implementations might differ wildly between implementations.


How Effective Is "Rosetta Code" as a Teaching Technique? When working to teach developers Scheme (which is functional programming) I'll often show them analogous examples in C#.  The idea is that by seeing something familiar it will make it easier for the students to understand the unfamiliar.  But I'm not sure that this may actually be causing more confusion to the students.  Any thoughts or suggestions on the wisdom (or lack thereof) of showing parallel code samples when teaching developers?

By the way, this is what I'm referring to by the phrase "Rosetta Code" in the question title. It's analogous to the idea of the Rosetta Stone presenting the same text in multiple languages.

EDIT

In case it wasn't clear from original question I was thinking of both the aspects of compare and contrast between languages (i. e. this is how we code a loop in C#, this is how we code it in Scheme) and the aspect of relating the unfamiliar (Scheme) by comparing it with the familiar (C#).

Here I think the teacher's instinct and experience is the best judgement. You know your own students best. Your worry, of course, is well founded, especially since the two languages are so different.

Learning to think functionally is a big deal and a mind expander. In some ways doing it cold-turkey (with no support) is good to do, since the students need to just thrash about until the see the A-Ha. But that can be very frustrating. It isn't good to leave your students frustrated, of course.

Another reason for not using the technique you suggest is that you don't want their functional code to be just misspelled C#, using ideas from imperative and/or object-oriented thought patterns. Code in one language based on knowledge of another can be truly ugly and the programmer can miss the elegance of the new language.

And functional program can be truly elegant and mind expanding.

To balance the trade-off you can, of course, use "Rosetta Coding" only sparingly. And only when it seems really needed. Perhaps you could start out without it at all and use it only in situations in which the students are struggling, rather than as a main-line technique. You could also use it only when working with individuals (office hours) rather than with the larger group if a student needs to be reminded of the basic structure of an algorithm. Personally, I wouldn't use it as the main structure of the course and am happy to let my students thrash a bit in mildly turbulent waters. But that needs limits also, of course.

Salt is fine, but don't over-salt. Judgment and a bit of restraint, perhaps.

Since the two languages are from different paradigms the difference in resulting code can be quite stark. For example, reversing a list in linear time in Scheme is quite a lot different than you would likely program it in C# with mutable data. But even Java and Ruby, closely aligned, are not the same language and have different thought  patterns. It is the thought patterns that are the most important lessons of the various paradigms.


Using autograding (Github Classroom) - pitfalls and best practices? I'm currently as a TA developing a series of programming assignments for a bachelor course on machine learning. Since we expect the number of students taking this course to grow in the future, we're looking at autograding to see if it's useful for us. In particular, we're looking at using Github Classroom. I have a number of related questions about this. Feel free to answer all or only some of them.

Autograding leans heavily on unit tests to grade, and these unit tests are in the students' repositories. This means students can work on their code until it satisfies all the tests, which would result in a perfect grade. What kind of assignment setup/grading setups are possible that aren't so all or nothing?

Can you stop students from altering files in the repository that they're not supposed to alter? For example, if their starter code contains a file assignment.py and tests.py, can you enforce that they only change the assignment file?

Is it possible to apply hidden unit tests, that aren't visible in the students' starter code repository? For example, we might want them to implement a ML algorithm, then test it on a dataset they haven't seen yet, to see if it generalizes well. Also, it would enable us to have a tamper-proof unit test (see point 2).

What are general issues to watch out for when using autograding for (some of) the assignments in a course? Or Github Classroom-specific problems?

What are in general best practices for using autograding in a course?

In the auto grader I use, the following process is followed:

The students files are copied into a pristine work area
The "provided" file(s) are removed from the work area
If I intend to use MOSS, the remaining files are copied for later use
The "provided" file(s) are copied into the work directory
The result is built (if necessary)
Tests are executed and graded

Note that the "provided" file(s) copied in at step 4 may be a superset of the file(s) provided to the student in the assignment and typically contain other/additional test cases.
If the build fails because a student has modified a "provided" file, the students gets no points. If Java assignments, the provided file is often a interface, sometimes an abstract class. In C/C++ assignments, the provided file is often a header file.
If some test cases are provided and reused verbatim in the final run, those test cases only account for 60% of the final grade. Thus, the student can not receive a passing grade by just making those test cases pass.


Physical Activity for Objects I have a vague notion that I could create some sort of introductory activity for Objects.  There would be worksheets ("programs") to get kids (high school, in this case) to physically go through the process of isolating behavioral groupings into different people, and using message passing to solve a problem or accomplish an algorithm, but I don't have a great idea for one to actually implement.

It would be a bonus if it wasn't immediately apparent what problem the students were solving at first, but the final output created a nice "A-ha!" moment.  This would allow us to talk about the benefits of dividing a problem into component/machines instead of merely into sub-functions.

Has anyone done something like this?  Or does anyone have an idea for a fun, physical activity to introduce some core OOP notions?

If the objects are something like robots or other things that "move", like froggies, or such, then you can do things like maze solving and other interesting things. If they can move some sort of other objects by picking them up and putting them down in piles, then you can sort and such. Of course they need some sensory behavior to sense boundaries.

There are a number of scenarios available for Greenfoot for example that permit this sort of thing, either with a Java program or with student "actors".

The left hand rule for walking a connected maze is kind of fun. And there are actually sorting routines for physical objects that are unlike the usual algorithms.

But it is moving under some constraint that makes it work.

Find the resources at the Greenroom for ideas. I think the first scenario in Greenfoot involved Wombats, but the developers were then in Australia.

Alternatively, you can have the students simulate a cpu that executes the program, moving some objects on a game board. The hard part of this, however, is capturing the message passing idea of OO. That is a bit easier if the students are, themselves, objects, since speaking/asking is a lot like message passing.


How do you teach something when you don't know it yourself? Teachers are sometimes called upon to teach something with which they have no experience. Don't laugh. Doctoral level education is often exactly like this. The student's advisor may have no background in the student's topic, but must still provide effective guidance.

At the other end, teachers are often called upon to teach something like APCS-A when they don't themselves even know Java and have little, if any, experience in Object-Oriented Programming. How can they proceed and be effective. I don't think that "Keeping one day ahead of the students" is any sort of answer to this and will likely leave the students frustrated and confused.

If you are in this situation, I assume that the obvious solution (DON'T) isn't available to you. Similarly "Fake it 'til you make it" isn't a solution since the future of your students is at risk.

It is possible, of course, to borrow a syllabus and book list from some other teacher, but the deeper issue is about how you respond to student questions and concerns when your own knowledge doesn't provide an answer.

What would you do in a situation in which you know very little, to provide effective learning among your students? Past successful experiences would be especially welcomed. So would caveats.

Here are two links that speak to some of the things in this question:

https://www.chronicle.com/article/Teaching-What-You-Dont-Know/135180
and
http://harvardpress.typepad.com/hup_publicity/2011/07/tips-for-teaching-what-you-dont-know-huston.html

This is a vital question, perhaps the vital question, for a CS educator to deal with, because technologies will keep pushing us.  There is no end to this particular merry-go-round.

I have been stuck, non-stop, in exactly this situation, for the last four years in a high school for gifted students, and I can attest that it is physically, mentally, and emotionally exhausting. It can push you to the edge of a nervous breakdown. It can also be incredibly rewarding, both for you and for the students.

I claim no special wisdom, but here are some of the techniques I've been using.   I hope will be of help to other teachers gazing down the barrel of a similar gun at some point in their career:

Don't be dishonest with your students or try to hide your lack of background.  There will be moments that you come up short, and your honesty and forthrightness from the start will help to mitigate any loss of trust that students might feel when this happens.
Find several great resources.  Do not depend on one resource to give you the sort of thorough understanding you need to do this well.  A strong textbook is great, if there is one to be found, and can help you both understand the material and sequence your lessons.  However, single-source preparation leads to two problems: (a) your understanding will be brittle, and you will be left with only one way to explain a concept when students are lost, and (b) it will be very difficult to deal with questions, particularly from your brighter students, that go off-script and try to connect with outside ideas.

In my best situations, I will have a textbook, a tutorial series (such as might be found on YouTube or a website somewhere), some exercises to work though, and a tutor to help me when I get stuck.  SE can, itself, act as the last two of these for CS topics in a pinch, though it is not as good of a tutor as an actual tutor, who will build a dialogue and set of understandings with you over time.
Use the lesson planning itself as your final preparation, in which you summarize the key understandings and design exercises to help your students fill in the dots.  Over-prepare your lessons, because your instincts for how long the material will actually take to cover are not yet honed.

(I once prepared what I thought would be 3 lectures, and ended up delivering it as 1 lecture because things went extremely smoothly.  At the end of the hour, ,I arrived at the end of literally all of the material I had prepared.  The students enthusiastically told me that the lesson had made a lot of sense.  "Great," I thought, "I'm glad that made sense to the students, but what in the world am I going to do tomorrow??")
When students ask interesting, tangential questions, don't be afraid to reply by asking if they would be willing to research it a little and report back to the class next time.  It is important that not every student question become a major research assignment for you.  Instead, choose your battles carefully. Burnout is a real danger, and your time is valuable.  You have made a pact to help guide students through the main topic; don't get caught up in too many tangents on your first pass.
If you're really caught for time, you can simply present learning materials and ask students to work together to try to make sense of it.  Be careful not to do this too often, because while this technique can work reasonably well for your high-fliers, it does not leave you in a position to guide and help the students who really struggle.
Accept that this is an imperfect business.  You will mess up from time to time.  You will make mistakes.  You will arrive at a lecture feeling prepared, receive a student question, and suddenly realize that you don't understand something that you thought you did.  You may even discover that something you taught was outright wrong.  Be prepared to go back to the class and revisit an idea if you screw up.  But also, be prepared to forgive yourself for some amount of weakness.  You are an imperfect being trying to build a learning opportunity for your students, and all you can do is try your best.


What to consider when choosing version of Python? I will be giving a small course on the Python programming language to a group of interns this summer. As I am sure you know, there are many different versions of the Python language.

I am wondering what to consider when choosing a particular version of the Python programming language. Is choosing the latest version of Python always the correct decision?

A few years ago, the answer to this would have been "stick with Python 2; the libraries aren't ready for Python 3 yet". In many cases, that would have been a deal-breaker, because many of the older libraries were pretty useful, particularly for scientific computation.

However, the story's a bit different now, in 2017. There isn't much of a reason to stick with Python 2; almost all of the top 360 libraries support it now.

A few popular resources, like Learn Python the Hard Way, have remained ardently Python 2-only until recently (early 2017), and I suspect a lot of old tutorials haven't been updated.

If you stay with Python 2, you miss out on all of the really nice features, like async and f-strings, which have only been added to the 3.x series.

Something to consider, though: Python 2 and 3 are very similar, and learning one will mean you can relatively easily switch to the other. Python 3 just removes the major 'gotchas', like 5 / 2 = 2, or bad things happening when you use Unicode. For beginners, I think it's a great advantage for things to work intuitively (until, of course, you fight with the floating point representation issue).

Generally, I don't think you'll experience any problems with Python 3, and it seems logical to me to learn the future of the language, rather than Python 2, which is legacy.


What are good, practical labs and activities for unnested loops? I am teaching some high school students, also the first time programmers, some basic programming concepts and applications.  When introducing loop I find that using it to check prime number (or find prime number) is a good example. It teaches them the concept of loop but also make them think, e.g. it just need to loop to $\sqrt{n} + 1$, no need to loop to $n$.
I would like to know other examples like that to introduce loop, not too easy or too hard (for high school students) and better to have some practical application.

Note that the following are intended for the instructor, not always directly for the student. If used well they require some analysis, not just coding, from the student.
Use the fact that the sum of the first n odd numbers is $n^2$ to compute the integer square root of an integer.
Test data should include 63, 64, and 65 to catch edge cases.
This can be extended past the decimal point and optimized in various ways to compute more accurate approximations of square roots.

Notes on the above, but I suggest you try it before peeking:

To make it a bit more obvious, this involves using inverse functions and computing inverses. The loop actually needs to count subtractions and uses facts about perfect squares to compute square roots. That same idea might be exploited for other problems.

Note that $\lfloor$  $\sqrt 65$ $\rfloor$ = 8.

Other simple things:

How many digits does an integer have?

How many bits are required to represent an integer? (Note that the structure is the same as the above)

How many times does zero (for example) appear in the decimal representation of an integer.

Sum of the digits of a given integer.

Is the number of 1 bits in a binary representation of an integer even or odd?

Read a real value x from input. Then read the successive coefficients of a polynomial from input and evaluate the polynomial at x. Note that the stopping condition needs to be specified and by varying it you can have different systems. Reading it from input is one of the obvious variations. Hardcoding it is another. Later on, the coefficients can be in an array, of course.

In teaching loops it is important to also give exercises where the correct number of iterations is zero. For example, give x and y, find the number of multiples of 3 that are larger than x but less than y. Don't exclude the initial condition y < x.

Nested loops: Once you have the solution to "is X prime?", how many primes are there between a given x and y?

A bit harder:
Euclid's algorithm.

Extensions:

Use other similar sums (than the sum of odds) to compute other things.

Look at the Wikipedia article on Taylor Series to get some ideas about how to approximate some interesting functions with sums.

A solution to the square root problem follows, using a personal (executable) pseudocode:

     $ "Computes the integer square root of a non-negative number";
    With
      value; current; count; odd; // integer variables
    Program
      Read value;
      current <- value;
      count <- 0;
      odd <- 1;

      While current >= odd {
          current <- current - odd;
          odd <- odd + 2;
          count <- count + 1;
      }

      Print "The integer square root of ", value, " is ", count;
    End


Should Java Static space and Memory Model be a part of AP CS Disclaimer: I am teaching in Canada and therefore I am unfamiliar with the American AP CS A and AP CS P curricula that others may have talked about. In my school board at least, it is still very grey what exactly to teach in AP CS. Essentially this is a grade 12 course continuing from grade 11 (which taught variables, arrays, loops, functions and simple inheritance). The goal of AP as posed to regular is to focus more on OOP, specifically SOLID principles.

With that out of the way, here's the situation. I am teaching a summer course to high school students who want an enriched Computer Science course in order to succeed in University. This is the first time this course is offered during the summer (and my first time teaching this course). This week, I decided to go over some review of Java basics to gauge the overall knowledge of my class. Ironically enough, everyone seemed to know variables and access modifiers, but as I began going over some Inheritance, students became confused over static variables, static space and where variables were.

I drew out a simple memory model and showed where static, heap, stack and meta-space. I could already tell there were a lot of blank faces (okay, let's back track). I essentially explained that things declared in the static space are global to the project and belong to a class as posed to instances. However, surprise surprise, I spent majority of this week helping students with "non static variable cannot be referenced in a static context".

For the rest of the term, I am wondering if I should devote a week to thoroughly explaining what exactly the static keyword means, what static space is and the Java memory model, or continue with the material (as there is a lot to cover) and just try to stray away from involving static space and variables in my examples?

Static is within the AP subset and is fair game for the examination.  Oddly enough, the memory model of Java that operates here is not, so students could, hypothetically, memorize a series of arbitrary rules and be fine here.

If you think it seems silly to teach about static without at least giving a passing understanding of how memory works, then you and I are on the same page.  However, in this instance, I provide a simplified (and terribly inefficient!) view of memory usage, because I don't want to delve too far down this rabbit hole in what is essentially an introductory class.  (Especially because we haven't yet covered the all-important idea of passing this as a parameter.)

Here is a picture of the PowerPoint slide with the setup itself (sans animation).  Also not seen is another slide that says, "Hey class, when can a lie serve the truth? ... Right now!")

There are more slides, and quite a bit of discussion.  But in essence, this model allows me to ask discussion questions like:

Why are there 3 Doublers in memory?
Why is there only one count?
What did static actually accomplish?
What would happen if we called val++ from inside method(). Is there any reasonable way for Java to interpret this?
What would happen if we called count++ from inside doubleVal()?  Is there any reasonable way for Java to interpret this?

Now, as for the situation you are in, it sounds like you've already devoted a lot of time to this.  I would not spend a great deal more time on static.  There is a lot in the exam, and static is not heavily tested.  I might do one more quick attempt to try to clarify this idea, but then move on.  There is, as you said, plenty else to do.


Are there any resources out there to continue developing my students' programming skills after Code Combat I am teaching several classes consisting of 12-15 year-olds the beginnings of programming by exposing them to Code Monkey and Code Combat. These resources successfully engage most of my students and follow a smooth progression such that most of my students are able to follow along mostly unaided. (There are significant differences in how fast different students go though the exercises, but that aside.)

My question is about similar follow-up resources: Are there any resources out there, for once my students have worked their way through Code Monkey and Code Combat, that will allow them to continue developing their programming skills, without the difficulty going up too much all at once (causing them to quit), but also without stagnating at the level of Code Combat?

To provide some context on what Code Monkey and Code Combat cover: some basic movement commands, basic looping, named variables, and that is pretty much it I think.

You could try the Bootstrap curriculum, the materials are free and can integrate with existing curriculum instead of being electives. A talk about the design of the program, and how to design highschool computer science curriculum in general is given here by one of the Co-directors of Bootstrap, Professor Shriram Krishnamurthi from Brown University.


How to stop being The Oracle When I did customer service for an application I was developing, I found that most of the time, if I did NOT answer the phone, the user would figure out their problem and learn more than if I did answer. Some people would just call up any time the slightest thing happened, if I kept answering.

With students, when I am in class and they are working on coding assignments, the same thing can happen: they will ask any old question that pops in to their head because I am sitting 5 feet away (usually trying to grade assignments or prepare to lecture). Sometimes the questions are quite elementary. Other times, it amounts to structuring a complex If-Else or something that they could do, but they have difficulty with. The only 'help' I can give is to explain how it should function. They learn that way, but then I become the Oracle.

I do often deflect questions or look at the problem they are having to know that it is something I have taught and then say I need them to work at it a bit more, but this seems to happen a lot. If I was not there, they would be forced to work it through themselves. Is there a way to encourage the students to be more independent, because I have not found it yet.

Rubber Duck Debugging.

A few years ago we bought a bunch of cheap rubber ducks. Students with questions have two options. They can either ask their neighbor or explain to the duck what they're trying to do. If the duck didn't help, then they can ask me.

I've moved to a different school since then and haven't bought any ducks. I really need to buy some ducks.


How do you teach when your students have wildly different backgrounds? I'm going to do a course for my entire University, this means students that are in the last year and also in the first year. What can I do so what I teach isn't too hard to understand for the first year students and also isn't too basic for the last year students?

What I'm teaching is a complete web app stack

git => html/css/javascript => react

For some students (last year) html is basic and easy, but in the first year, many haven't learn it yet.

Is there some strategy or things I can do to make it more balanced for all students?

I don't know what options are open to you, so I'll hope you have a free hand. I certainly did as I got farther along in my career, but a newcomer might think this is risky. In fact it is well proven:

I'd suggest that you base much of the grading on the work of groups rather than individuals and I would flip the classroom. This gives you the advantage of observing the groups in almost all of their activities. The "material" and "content" of the course is obtained through readings and video, not through lectures. What happens when the students are face to face is that they work in groups to produce something, perhaps ultimately a web site in such a course as you have.

But this might not work if you scale is huge.

I think you should also create the teams yourself and assure a variety of levels and types of experience in each team. A simple questionnaire for each student on the first day can help you decide how to divide up the teams. The teams should be small, to enable simple communication, but probably at least four per team.

In such a course you also need to have the students do "peer evaluations", perhaps periodically. If you manage this well you can also achieve a fairly high degree of the better, more experienced students aiding the others. But to do peer evaluations successfully, it has to feel safe. It should be entirely positive based. In a group of five, I would ask students "Who were the two most helpful members of your group? Why? What was their contribution?"

You can modify the above to suit your course, and you can also tell the students that being seen by team mates as helpful will give a grading bonus. Don't ask students to evaluate everyone, but just to give positive comments when appropriate.

But you also need to employ "self evaluation" in any such scheme. "What was your own chief contribution to the team's work?"

The goal is to get a spirit of cooperation going, rather than competition. This means, of course, that you need to make it possible for everyone to get full marks. Therefore "grading on the curve" will ruin it, since it is a fundamentally competitive zero-sum situation.

In team based work, I also required teams to present their work to the class at the end of the course. I also required each teammate to participate in some way in the presentation. This was a bit hard on introverts, but it was a skill that they need to develop in any case if they are to have a career. Even if the career is outside CS.

Note that Peer Assessment is a wider topic than what I suggest here. I don't necessarily suggest all of that, but do suggest that peers focus on positive aspects only. This makes it "safer" and, I think, more honest. I once had to upgrade a student who I thought was slacking based on the fact that his teammates (who I knew were working hard) praised his contributions.


How to introduce Scala to a team of Java developers without being boring? I work in a startup where each week, a member of the team does a short presentation (30-60 min) on a subject in front of the others. It is a very informal and relaxed session, but now it is my turn and as an intern, I feel concerned about being boring and failing to show my colleagues the interesting features of the subject I picked, which is the programming language Scala. They are all familiar with Java (on which Scala is based) but probably not with functional programming.

So, here is my question: How should I do my presentation to actually entertain them and have them learn some useful bits ?
For instance, which kind of "live" examples / exercises could be interesting to demonstrate the particularities of the language?

I'd start with something useful that takes yards of code in Java and only a few lines in Scala (assuming there are such things).

After two or three examples like this, you'll have hooked your audience. Move into a compare/contrast of language features. Talk about what's easier in Scala. For fairness, talk about what's easier in Java. Then move to how/whether you might adopt Scala in your workplace - or why it wouldn't be practical now but under what circumstances it might be.


In-class server access limits I want to set up a fully functional web server in the classroom. I will be using a separate computer provisioned with Apache, MySQL, Tomcat, PHP, Perl, etc. I want to have each student in the class able to have their own working directory. I also want to have a pair of sharing directories. One where they can access, without changing, lesson-based material, and one where they can upload content for others to access, and where collaborative projects can be built.  I intend that each student's personal directory will migrate with them as they progress through the courses, for those that do continue.

Situation:

Single classroom
Between 25 and 35 students in each period
Desktop computers available for each student
The students are not required to utilize the same computer each day (most, but not all, do so however)
All the desktops will have the same tools, including FTP client for accessing the "server"
Courses are at three different levels, but are all Web Development
The system will be used, independently, by 5 different class periods.
Not all students are guaranteed to have home Internet access
Personal laptops are allowed, but not required
The tools on the desktops are able to be installed on their personal laptops if desired (no proprietary software involved)
Students are allowed to use their own selected tools (editor, IDE, etc.) on their personal laptops

Assertions:

The school's administration has approved this project
The network admin has created a VLAN for the classroom
All security concerns have been, and will be, addressed by the IT department
The server aspects of the system will be configured, and maintained by me
The system will be kept properly updated, this includes Apache as well as the supporting software such as the DB, PHP, Ruby, etc.
Any and all licenses are such that everything proposed is "above-board"

How much access should I allow the students to files (theirs, the common directory, and lesson-based directory)? I.e.: should they be able to access them from outside the classroom and/or school's network? And, should they be allowed to create a public-facing web page/site as part of the server's function?

I'm thinking that full access from anywhere will allow them to work on projects outside of class without having to move files back and forth with thumb drives. That will also mean that I can give them larger assignments as homework rather than having their coding work only be labs. I'm also considering that the ability to have their own website will give them greater investment in the class, and greater desire to learn things to make their "Own" website better, and stand out more.

Again, IT claims they can handle the setup and security for any of the ideas I've presented them, so security and maintenance are not issues, just how it may affect their education.

I am also wondering if it's better to configure the server with the latest stable packages, or if I should make it closer to what most low-end shared hosting accounts have. The shared-hosting environment is what they most likely will encounter if they choose to do something personal on the Web now. Doing so, however, will restrict some of what I can demonstrate with newer packages.

Go latest - why not? Public facing - I'd say just make them all sign a terms of use agreement.

Great plan - at the moment I don't really get to do much web work due to the courses I teach - if I did, I would totally love this. Particularly if you can get a retired server rather than just a PC, I reckon kids would buy in to it bigstyle!


How can I set up Eclipse/eGit/GitHub in a way that is easy for students? My students struggle terribly with Eclipse, and with any form of version control. I want them to use Eclipse with Git, but I am struggling myself to find a way to set it up that would make sense to a student.

What I want to do is have them put  entire Eclipse projects (without the binaries) on GitHub. I want them to use the eGit plugin because if I ask them to use the command line, they will never do it. Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment. The other method would be to put the repository (and .git) under the Eclipse project. This, I think, would be less confusing to students, but when I try that, I get all kinds of nasty warning messages.

So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?

To me it sounds like your students lack an understanding of the fundamentals of IDEs and Git.

  if I ask them to use the command line, they will never do it.

If they don't know git init and git clone (origin) then I'm sorry, they do not know Git, they should learn this first (along with push, pull, commit, status, fetch).

  Researching this, the stock advice seems to be to set up the repository outside of the Eclipse project. That, however, has the effect of putting all the source code outside of the Eclipse workspace, which is confusing. Worse yet, I can't then import the project correctly into another Eclipse environment.

This is another problem in itself. The high level explanation is you only need package level codebase with only the src, the bin is generated by Eclipse. You still need to create a project in Eclipse and then import the package. Any further problems should be asked on StackOverflow.

  The other method would be to put the repository (and .git) under the Eclipse project.

NO! The .git is generated by git init. Do not copy any configuration, especially hidden files from project to project.

I think you are jumping the gun here. Eclipse and Git should be separate lessons. If they are confused by both then that just means they need to learn what each of them are, before combining them.

I suggest:
Teach Eclipse, how to create projects, what packages mean, how to import, etc.
Teach Git, init, clone, pull, commit, push, status, fetch using Terminal or CommandLine for Git. Depending on the age group you might want to teach them how to resolve conflicts, what decentralized means, branching, pull requests, etc.
Now teach them Eclipse Marketplace, download plugin and integrate Git with Eclipse.

  So does anyone have a setup for Eclipse and eGit that successfully puts the entire project into version control, and is not confusing for students? And that allows the project to correctly import into Eclipse?

As all my professors do it, you need to create the repository with the project for each student and have each student clone and import into Eclipse. I'm not an educator so I don't know if there is an existing setup available online. However, I do think this is actually a very trivial task if they understand Eclipse and Git.


What is a good introductory language for high school? I'm teaching introductory programming for high school. Back in the day, when I was starting out, DOS and Unix terminal prompt was normal UI, and console apps would spark kids interest.

Now, on the other hand, kids grow up on the web, and a console program would look quite uninspiring.

On the other hand, I'm not sure if JS (which is the web language) is a good introductory language. It's got a lot of gotchas which can confuse beginners, and I was thinking that a language like Python or Go would be a better introductory language.

On the other hand, they don't have much of a front-end, and I don't want to teach two languages at the same time.

What do people suggest?

If Advanced Placement CS is in their future, then Java is probably the best language choice as it is still used in APCS. There are also a lot of resources for Java development that also permit graphics based insight. The course probably wouldn't be about developing for the web, though.

But because of the APCS link there are a lot of resources intended for novice programmer development.

One resource (Java) that is very useful for such students, and has a lot of project ideas built in to it is Greenfoot, which uses a rectangular grid to place visual representations of objects and lets them move an interact according to the student program. There is also a dedicated teacher resource for it: Greenroom. It has additional greenfoot projects and a forum for discussion.

Otherwise, Python is a pretty good choice for beginners. It has less syntactic load. But the set of resources for novices is a bit more scattered.

But any programming that uses some visual metaphor is better for student understanding than just numeric programming. It needn't be web based, but should be graphical. Games are pretty good for this provided that they aren't just textual. Any simple board game can provide a nice way to visualize what a corresponding program needs to do.

But, one way to avoid the two language issue in web development is to have the students build only the back end or only the front end with you providing the other. It also defines a set goal that students can program toward. The part you build can be in a different language than that used by the students, of course.


Learning disabilities as a barrier - should I stop learning? I am not a teacher.  I'm an adult with learning disabilities.  I have autism and memory problems.  As a child, I was way behind and stuck in SLD, where the teachers had little interest in teaching, so I learned nothing.  Nor did I have an interest in learning, until I..  Well, had stolen a science book from a class room, 3 grades up, and I began doing the work out of it on my own for fun.

Now I'm an adult and have made nothing of my life but I've found a new obsession and that's to learn everything I can about computer science, but it's not that easy to teach myself.  I find it frustrating but I keep going.  My question is, is it even possible for someone like me (who can't even do math) to learn, remember and deploy what I learn?  Should I just give up? I would like to have a job in the field some day, but I feel I'm just not good enough to try any more.

Do it for the fun of it
You say that you have made nothing of your life; You say that you have an obsession with learning CS. If so then what does it matter what the outcome is. If you enjoy it then continue to learn.
It's not you
I used to have a learning disability, but then I got a new teacher.
You seem to blame your self. Autism is not a bad thing, is is a different thing. Just because you teachers did not know how to teach you, it does not mean that you are unteachable. You showed that, when you stole that science book. I did the same think with a maths book, when in year 6. I was expected to work my way through what seemed like an endless supply of maths books. One day I took the last book several grades above where I was working. I was motivated and completed the book, I then stole the teachers grading book and marked it my self (the teachers would not help). I had got close to 100%. It was at this point that I realised that my disability was the teachers. Shortly after this I changed school, and made a lot of progress.
Autism and programming
As a software engineer I worked with a lot of people. I have Dyslexia, some were normal, some were jerks, some had autism, etc. The people with autism and some others, were not good at working with the wider company, but were very good programmers. We protected them from people they did not know well, because we valued them. We could give them jobs that they could do better than the rest of us. Everyone has strengths, but they are not all the same. Don't judge yourself or others by what they can not do, but by what they can do.
What to learn
Most importantly learn what interests you.
You have a massive advantage, because you are not aiming toward exams, or work targets. These often cause people to take short-cuts across the swamp, and to get stuck. You can learn in a way that maximises learning.
“Someone like me”
If you believe you can, or if you believe you can't, then you are correct; Your belief in your ability has a very big affect on what you can do, so carry on with you positive thinking. And when you mess-up (because you will; we all do), then just try again. Success is the ability to continue in the face of failure.
Have a watch of this video
https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve?language=en


What is a good analogy to introduce databases and SQL? I think that it is vital to introduce each subject area with a few handy, even if limited, images or concepts that make the idea clear. Here is how I introduce SQL (in part):

  SQL takes a set of data and transforms it in to a new set: a two-dimensional result. Stop reading until you have memorized that, because it is the whole point. Every outcome of an SQL statement (with a few exceptions) is a new Table. That table might be printed on the screen and disappear, or it might be stored in to a new table, or it could be used to update an existing table, or it could be used as input to a program which could do… anything. But, it is a two-dimensional table, and nothing more.

I think that this is the very first concept that needs to lodge in their awareness if they are to make any progress at all. Perhaps it is incomplete, incorrect, too literal, doesn't use the right word (the correct word for Table is 'Relation') and so on. But we have to start somewhere.

I'll compare a database table to a table in Excel, because my students are more familiar with Excel. I'll compare SQL to a command line interface, because my students already know about command line interfaces. Are there better metaphors or analogies to teach SQL and relational database concepts?

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.


Programming languages specifically designed for beginners Is there a good beginner's programming language, specifically designed for learners, maybe even kids?
Something beginners can sink their teeth into and get results quickly. Results that are more than a "Hello world!" or a program that adds two integers. Something easy to use, but a thing that can guide them through the basics.

Phrogram (née KPL) was a good example, but it has sadly died (see pics at bottom; simple interface, simple codes, yet they look and feel like a modern programming environment and language - in small).

Maybe it is an existing mainstream programming language with a simplified IDE, maybe it is a full learner's solution.

Just a few ideas what to look for in a beginner's language

Object oriented (ComLogo is funny, but has nothing to do with today's actual programming)
Good IDE (intellisense and built-in help)
Simple IDE with preferably a "Run" button - they can learn about translation and interpreter later (Visual Studio is amazing, but pretty intimidating for a beginner.)
Should be visual (commad line will never be too appealing to kids)
Should be free of language oddities and paradoxes (this is where most actual programming languages fail IMO)
The list goes on; should encourage the use of indentation, should require variable declaration, should be memory safe...

Examples from Phrogram:

Scratch is a visual block-based drag-and-drop programming language designed specifically for learners, especially children. It's created by the Lifelong Kindergarten Group at the MIT Media Lab.

The language and IDE are pretty much completely connected. Here's how I see it checking off your bullet points:

Object oriented: It has sprites, but it's debatable whether it's truly object oriented. It can serve as an introduction to the concept though.
Good IDE: Yes. There's a help toolbar on the right side.
Simple IDE with run button: Yes.
Visual: It's completely visual and drag-and-drop. Typing is only needed for numbers and strings, essentially.
Free of language oddities and paradoxes: I'm not sure exactly what type of oddities and paradoxes you're thinking of, but Scratch tries to be helpful and avoid breaking your code whenever possible. The blocks themselves are pretty intuitive and self-explanatory.
Other:

Indentation: Since it's not text based, this is less important, but control structures (conditions and loops) do get their code indented.
Variable declaration: All variables must be defined before use.
Memory safe: Yes, it runs in Flash in the browser (next version plans to move to JS). You don't have any control over actual memory usage in your program.

Scratch was my first language, and I've been teaching it as a first language for the past several years. It's great for teaching the concepts without worrying about annoying little things like syntax.


How to embed TIC-80 into Computer science 101 course I'm planning to design an introductory course to CS and programming for kids of 8-12 grade and see that we have Scratch for catching an eye in the beginning and getting instant result on place.
But I need something about procedural programming as a replacement for Pascal, where kids could do something step by step without any abstractions. What I see is that I can potentially use either PICO-8 or TIC-80 fantasy consoles, but I don't see any materials or attempts to use Lua language for this goal. So the question is - why?
What are the drawbacks of teaching this way? (If we had non-dead Pascal with advanced graphical library like in DrRacket and good contemporary API - I'd rather have used this instead).
UPD: The question is inspired by the post of my colleague on Medium: https://medium.com/@astynax/%D0%BD%D0%B5-%D0%B2%D1%81%D1%91-%D1%82%D0%B0%D0%BA-%D0%BF%D0%BB%D0%BE%D1%85%D0%BE-%D0%B5%D1%81%D1%82%D1%8C-%D1%87%D0%B5%D0%BC%D1%83-%D1%83%D1%87%D0%B8%D1%82%D1%8C-30e4f50213a1 (Google translatable to english from Russian)

Being on this site since the beginning, I have many times now encountered this notion that for introductory courses, higher level languages mean that students will deal with more abstraction and lower-level languages mean that they will deal with less abstraction, but I believe that this is fundamentally incorrect.
I'm going to actually recommend a frame-shift that I hope you will find helpful, and along the way, I hope to also persuade you to a different way of thinking about introductory programming courses.
I myself learned on BASIC and Pascal, so I have no specific objections to these languages.  There is plenty of learning to be had in such languages!  But there was also plenty of abstraction. It's not as if the "Read fetch execute" cycle, memory management, operating system architecture, or secure program memory segmentation are somehow magically apparent to a Pascal beginner, nor is that an appropriate goal for a beginning programming course.  All of these languages (even C) are truly "high-level languages" full of metaphors and abstract ideas, and none of them will give a student any sense of what is going on under the good.
Don't believe me?  Consider how much is "explained" to a student in this Pascal code:
type
   color = ( red, black, blue, silver, beige);
   car_color = array of [color] of boolean;
var
   car_body: car_color;

Contrast that with this Java code for Greenfoot, which is a system made to teach beginners in Java, and spawns a Zombie at location (50, 50):
world.addObject(new Zombie(), 50, 50);

How much of what is going on "under the hood" will be understood in either example by a beginner?  How clear is the expected behavior from what we type?
The purpose of high-level languages is:

To abstract away what is happening inside of the computer.  People didn't want to learn new assembly languages, architectures, and capabilities for every new processor.  Abstracting away what computer do is #1 on this list because it is the most important, and it is what drove us away from assemblies and into high-level languages in the first place.

To make some kinds of tasks easier to accomplish.  The above code example is great.  The compiler makes and manages an array for you!  No multiplication to find the offset from the initial memory location on the stack needed!  And the fact that I can now, in that same Pascal program, write:

if car_color[blue] then
   writeln('blue paint has been applied' );

...is fantastic.  It's useful!  It makes the programmer's intentions clear!  But it tells me nothing about blue not existing in the run-time execution at all, since it was remapped by the compiler to a 4-byte integer, or how writeln sends information to the console.  The compiler allows me to work at the level of a metaphor, and handles the details all the way down.
I guess here's what I'm getting at: when you study any programming language, you are studying at the level of that programming language.  Importantly, all of the stuff below that level is 100% opaque, and this is by design.  It is in no way true that studying a non-OO imperative language will leave students feeling like everything makes sense, but studying an OO language will leave students feeling like everything is a mystery.
Both approaches uncover a tiny bit about one particular layer, and still leave basically everything as a mystery.  It will take your students many more years of study before they feel like they have a handle on what computers actually do.
This is not to advocate for OO specifically, but rather to suggest that you reframe your question like so: since no particular programming language choice is going to explain things at a higher or lower level than the particular metaphors employed by that specific language, which language choice will get my students a lot of mileage as they go forward, both in terms of what they are capable of in my course, and in terms of what explorations it opens up for them afterwards?
My recommendation for that question is probably Java, Python, or JS.  Since you're starting from the language Scratch, you might naturally go a game-building route to start, using PyGame in Python, Greenfoot in Java, or GDevelop in JS (Note: I have no experience with GDevelop, I just found it with a Google search).
Good luck with your course!  Hopefully it will be a very satisfying and enriching experience, both for you and for your students.


Understanding Introduction to Algorithms, 3rd Edition I'm taking a course on data structures and algorithms and it follows the book Introduction to Algorithms, 3rd Edition (ISBN-10: 9780262033848) by Charles E. Leiserson, Clifford Stein, Ronald Rivest, and Thomas H. Cormen. Judging by the way the first few weeks of class have gone, I will be teaching myself directly from the book with very little lecturing/instruction. Does anyone know of any resources, especially free, online courses that they could recommend to help me get through this class? I am struggling.

The key to learning this, or much of anything, is reinforcement and feedback. Reinforcement comes from doing exercises and solving problems in a course like this and the book has plenty of mid chapter and end chapter exercises and problems. You can do a lot of these. All of them may be asking too much, but you want to be able to answer any of them. Getting more explanation may help or not, but only if it helps you solve those problems.

Feedback, however, may be the bigger problem. Where you can properly seek it may or may not be a problem. If the rules in your place permit study together then you can work with one or two other students in a study group. Each of you solves some set of problems on your own. Then you meet and discuss your solutions. I'm not suggesting you collaborate on formal assignments as that may be treated as cheating (or not, depending on the prof), but all of the "other" exercises are, to me, fair game for collaboration. Doing them gives the reinforcement. Discussing them gives the feedback. Look for insights from each exercise that go beyond that exercise.

In universities such as yours, you often will have access to a TA. That person should also be able (and willing) to give you feedback on what you do. If they are wise and you seek hints from them, you will only get minimal hints, not solutions. Seek the insights, not just the solutions. Go to them for feedback, not hints, primarily. Likewise in a study group. And if your professor doesn't get angry when you spend too much time in their office, then spend a lot of time in their office.

Others may be able to supply online course resources, but I'll warn you that such things may make it harder if they divert you in any way from the main task: reinforcement and feedback.

Try to space out your study so that cramming for exams isn't necessary. It will be counterproductive for almost everyone and almost every situation.

Other hints:
Take notes on index cards. Carry those cards and review them frequently. Carry blank cards so you can make notes as you get insight or have questions that need to be answered later.

Sleep and get enough exercise. i.e. rest your mind and energize your body. The overworked mind is inefficient. The insufficiently oxygenated body is also inefficient.


Advising college students about whether to take classes pass/fail As a result of the coronavirus pandemic, many colleges and universities have implemented policies to allow students to take classes pass/fail this semester. Students will now be asking their advisors about the consequences of this decision. It seems like it would be good to have some consensus about whether or not graduate programs in CS, or jobs in CS, would hold it against CS majors if they took a CS course pass/fail this semester instead of for a grade. Many students are facing severe displacement (e.g. living in quarantine camps in their home countries, lacking reliable internet at home, needing to take on jobs to help their family pay bills after a layoff, etc). My gut instinct is that employers would probably prefer to see a "Pass" grade on a transcript rather than a grade that lowers a student's GPA. I also suspect graduate programs would understand "Pass" grades for this semester, even in core courses like operating systems. But I'm not sure, and it's a high stakes decision for students. I would love feedback from the community of CS professors.

Unfortunately, at the current time, a student would be making a decision with incomplete information. I'd be more interested in how graduate schools will treat such grades and I don't know of any who have stated a policy yet. I'm pretty certain that employers haven't really even thought of it yet.

I hope, of course, that they (grad schools and employers) will be reasonable. I also hope, of course, that advisors will be able to give good and accurate letters of recommendation for students no matter which way the students choose on this question.

But there is a vast amount of disruption even beyond the obvious. Expect that even good students will have trouble keeping up to their normal standards. It will require a lot of ongoing support. Some students are stuck in travel-hell. Some will lose family members. Some will have poor connections to their universities. Much, much more.

So, at this time, it is hard to recommend one choice over the other. What is sensible to do now, with available information, may prove sub-optimal when the policies fall in to place.

But you can lobby your own institutions for the quick creation and dissemination of reasonable policies. It is probably required that the whole academic establishment come together with principles. The current mix of policies may actually be adding to the chaos while trying to solve the issue individually.


Evaluating resources for teaching myself reinforcement learning While trying to teach myself the topic of reinforcement learning, I find many sites, books, people and other resources with information about that subject. (I am trying to learn the subject from those resources).

However, some resources contradict each other or conflict with one another. While sometimes it's easy to see what isn't correct (when there is a contradiction, there's often one version that's more accurate, for example), sometimes it's not so easy. Then there are times when there are simply different resources for the same topic in the field, and I cannot decide from which it might be better to learn reinforcement learning.

I'd like to be able to judge or evaluate which resources about reinforcement learning could be better to learn from.

I am aware that it's near impossible to say "this is the best one", but what I'm looking for is a method for choosing the resource from which I can learn the most. This means that in an introduction, resources which go into very fine details are not as good as ones that gives an overview of the subject.

In a way, I'm asking how can I build a curriculum for myself based entirely on resources that deal with reinforcement learning (books, sites, people etc.) to guide my learning of a subject of which I know very little? Judging one resource over another is one of the only things which are making the learning difficult.

This is relevant to reinforcement learning specifically because it's a quickly changing field. New practices/techniques and resources are being generated very rapidly.

I can see that the question itself is very long, but that's meant to keep it focused on what my problem really is: some resources are better than others when it comes to learning a new subject in a quickly evolving field...

If self-learning is a goal, you don't need to necessarily choose between resources at all.  I had to self-teach a tremendous amount of material this year, and to do so, I roughly borrowed the methodology from Barry Farber's incredible How To Learn Any Language.

The basic idea is to grab multiple (quality) resources of different kinds, and begin to work through all of them.  Do a little bit of each one every day, and make all of these activities as active as possible.  (For instance, create flashcards of concepts you want to review.  While reading physical books, don't be afraid to underline things you don't understand and revisit older underlines.)

Every content creator attempts to get at the material in a way that they feel emphasizes what is most important. This means that you end up learning multiple central conceits, and you develop a deep and capable understanding relatively quickly. If you find yourself getting stuck on one source, do your underlining, and move on to the next one.  The next day, you can revisit the first source with the new understandings that you have gained from the other resources, and thereby continue to progress.


Mini-Projects that can be covered in an 1 hour Haskell tutorial I am supposed to be holding a tutorial session in an Undergraduate Haskell Course, which is also supposed to be a first course in programming for a few of the students. Ideally, the tutorial should be interesting, interactive and inviting problem solving skills.

My audience is a group of Undergraduate students, a large number of which are mathematically oriented and a few graduate students, majoring in Computer Science. For the undergraduate students, it can be assumed that quite a few of them are new to programming or CS in general. And functional programming is new to almost everyone. This tutorial is part of a course they are all attending - the aim of which is to introduce programming.

I am wondering what sort of things I could cover in such a tutorial. Some ideas I had are these:

A sudoku solver
A Brain**** Interpretter
An Arithmetic Expression Parser and Interpretter
Discussing a data structure which the students have not seen before - like binomial heaps, or red black trees

What other things could I try? Functional Programming specific applications are especially welcome.

The ideas in your question are far too difficult, for a one hour introduction.
Yesterday I had a look at Haskell and learnt some. I have over 30 years programming experience (20 years professional). Have experience with functional programming. Yet it took me several hours, and did not get far enough to be able to do your suggestions.
Mathematics
You say that your students have a maths background.
Take advantage of this. Choose some math problems. That Haskell is ideally suited to solve. And explain why you are doing this.
Ensure that you have more than you think you will need, as some students will be much faster than you expect, but don't expect to use them all.
There are some good ideas here https://stackoverflow.com/a/15110828/537980 also some of the other answers, to the same question: sort, search, interpreter (this one may take too long), factorial.
Avoid bad examples
Don't do problems that are more difficult in a functional language than in a procedural one (Reversing a list, using procedural techniques, in $O(n)$, is easy. If by using functional they will probably get a $O(n^2)$ solution, and $O(n)$ is hard, then you are teaching a disadvantage on day one.)
Fibonacci is, I think $O(2^n)$, for simple recursive implementations.
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)

I did it in $O(n)$ once, that was the day I learnt a lot about caching. It was hard, it took me a whole day.


Abreviation of practical work assignment? I teach programming in french where we use the ambiguous names labo for laboratoire == laboratory or tp for travail pratique == practical work. In both way I can use the short notation labo or tp, but I would like to write my pratical works in english and I feel cumbersome to name each one practical-work-00...

I heard of lab which looks nice, but is it correct to use this term?

Is there a consensus or a short notation to refer to practical work assignments in computer science?

Yes, lab is frequently used as a term to denote a medium size assignment. Exercise would be used for a shorter one, and project for something more extensive.

But the terminology isn't standardized so you can use your own terms, as long as the reader understands them.

But I'll also note, that just as in programming it isn't the typing that makes writing hard, so, IMO, abbreviations have limited utility and are often counterproductive. Written work is normally, and appropriately, a bit more formal than conversational work. This is due to the fact that the audience is wider and you don't know as much about it. So clarity over brevity should probably be valued.


When should I scrap my projector for a blackboard? These days, we've got all this fancy, new-fangled technology. We've got live coding, we've got presentations, we've got remote desktop adapted for classroom use. There seems to be a tool for every teaching problem. But when should we ignore the KnowledgeInjector2000TM and instead use the good old blackboard?

More specifically, which concepts are easier to explain with a blackboard and how would you use a blackboard to explain them?

Shifting to the blackboard/whiteboard from the projector serves two main purposes:

Slows down the pace of instruction. I can type much faster than I can write on the whiteboard. However, this is not always a good thing. When I'm discussing something complex or want to ensure my instruction does not move too quickly, I shift to writing things out. This forces me to be more thoughtful with timing and often times has prevented me from giving students more information than was necessary for a particular lesson.
Shifts focus from code to concept. As I say in a lot of my answers, differentiation is key. Staring at code to understand a concept is not always going to make it sink in. By writing on the board, I often times can draw close attention to a concept (i.e. recursion or variables) outside of its context within a program. When introducing something new and/or something complex, this helps me ensure that students understand the thing before they code that thing. For example, with recursion, I draw out stack frames, naming each one with its function name and arguments and drawing arrows with values passed in and values returned. The magic of a few lines of code that calculates a factorial becomes a little less opaque when there's a visual abstraction to which students can connect the code. Additionally, introducing variable assignment to beginners, especially something like x = x + 1;, works well on the whiteboard where I can number the steps, translate it into "English" underneath, use different colors, etc.

Bonus: It's not always a game of either/or. Projecting code onto a whiteboard mixes the modalities: students can see "real code," but that same code can then be analyzed and annotated by hand.

For my own unique context in a classroom with whiteboard-top desks, I can have students write down what I write down when I use the whiteboard. It becomes a shared task since we are all doing the same thing and forces me outside of the "sage on the stage" paradigm for a minute. Instead of lecture and fast-typing, I can participate along with them in writing on a whiteboard. This has as much to do with engagement and classroom environment as it does with pedagogy.


Are there problem sets for trace table problems? If not, what are some good topics to cover? A trace table problem is code that you follow along by hand and fill out variable values at each line. For example.
0  msg = 'hello'
1  num = 5
2  num = num + 1
3  if num < 6:
4      msg = 'goodbye'
5  print(msg)

The table is filled out with variable values at each line number.
line | num | msg     |
0    |     | 'hello' |
1    | 5   | 'hello' |
2    | 6   | 'hello' |
3    | 6   | 'hello' |
4    |     |         |
5    | 6   | 'hello' |

This would be for a collection of beginner language problems, to provide practice and review understanding of programming language operations. These are the CS 101 style problems of what does this print, or what is x at the end of this. An initial topic list might be as follows.

variable declaration
function declaration
function calls
if / else if / else
for / while
arithmetic
scope
asynchronous

Are there any resources or existing collections for these types of problems? Specifically looking for Javascript but I can adapt other problems to the language.

I'm not aware of such resources, and I expect that there wouldn't be. These are great problems, but you (hopefully) only need to do a few of them until the concepts click into place.
I didn't know these were called trace table problems, but I have often provided them to struggling students in three different contexts:

Absolute beginners, where it helps students understand the ideas of assignment and execution order
Strugglers, where it helps students understand whatever has them lost, and
Students working on very low-level problems, such as assembly, or on processor design.  Here it is more of a basic survival tool. There are few, if any, meaningful variable names, and working your way through the values is a straightforward way of figuring out what is going on.

And this gets me to why I don't think you'll find a specific resource for problems like these: in all three of these scenarios, the actual prompt is the specific code we're studying.  Tracing the values is just a tool to understand the code that is in front of you.  The value-add (and the overarching purpose) comes from that code, not from the trace table per se.


Does it make sense to write tutorial when content of the tutorial can be already learned from internet without that tutorial? For example, does it makes sense to write tutorial called Best Intellij shortcuts. You can already find so many shortcuts online in many places. If the answer is "There is no need for new article since many of them already exist" then why there is tons of tutorials how @Autowired annotation works? If you google for "spring @Autowired" you will find a lot of materials about how that annotation works, some written in back in 2012. and some of them in 2019 and they are almost totally the same. Also, I am sure that even before all of those articles that information was available in spring documentation. I think that the value of that new tutorial would be to highlight the best ten annotations.

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

Most people who are learning jump between resources and look for good ones. I often tell people who are learning something that if they're stuck and nothing makes sense, to try a different resource. It is just as often the fault of the resource as the person. For this reason, it is to learner's advantage to have lots of different resources they can try out there. Some like videos. Some think bullet list articles are great. Others want to sit down in a course. The internet caters to all of those choices.
As admirable as your goal of teaching others is, this should be just as much for yourself - indeed, one of the best ways of learning is teaching. Explaining something solidifies that understanding in your own mind.
It is good to learn how to convey your ideas - how to write well. I guarantee you that if you keep writing articles like this, you'll look back at the first one years later and see how far your writing style has come.


How can I remain a programmer and move into currently "hot" areas? I'm a programmer, and I want to continue as such, but I want to explore new areas. I know the future is in the big data, and virtual reality (for example), but I don't know if they have less coding and more of other knowledge. To explain it:

In big data or machine learning, I need to know statistics, but will I use it more than python and/or R?
In Virtual Reality or Video Games I need to know Unity and there's a lot of 3D in it, so, will I do modeling in 3D more than programming on C++?

I want to explore other things of current interest that do not include web design but I can't see clearly what is required for each option.

What do I need to learn or do to work in currently interesting ("hot") areas, but remain primarily a programmer?

This depends a great deal on how you want to drive the ideas of the programs you write - and on who drives those ideas. Pretty much any application area of CS requires some deep knowledge of the domain, not just the techniques and mechanics of programming. Even game programming is pretty deep stuff these days. As you say, both VR and Machine Learning requires background far beyond programming, both in CS (algorithms and such) and in the application area and associated tools such as statistics or ray-tracing or whatever.

If you want to be self driven in the development you will just have to face the need to get that background. Online courses might help, or evening classes in a local university.

However, if you are willing to let others drive the direction of the project, then you can build stuff quite happily though the vision will be that of others. Agile software development is especially well suited to this, separating the specifiers and the developers quite comfortably. At a large company like IBM, there are separate departments for idea development and refinement and the developers who build those ideas into code. The "idea department" is full of graphic designers, business specialists, product testers, etc., while the development department is full of skilled programmers and database specialists. In an agile workplace these two groups of people work closely together over the life of a development project in a way that is flexible so that goals can be changed along the way.

It can be rewarding to do this, though the vision driving the project isn't your vision. The others are, then, responsible for having the deep domain knowledge that you don't have.

But if you want to do it all yourself, you need to develop that knowledge too. You can probably do it incrementally, but you still need to obtain it.

It might be true that you already have domain knowledge about some things. If you can also come up with problems that need solving in those domains you may have the basis for building things. At least for a while.

If there were an easy path through this, it would already very likely be well travelled. Not many of us have a brilliant idea that will open a completely new domain along with the skill to develop it. Both Steves were needed in the development of Apple.


Using microcontrollers in an Introductory course Are there any advantages to using small microcontrollers (such as an Arduino, etc.) with tactile, physical I/O (such as buttons, LEDs, robotic actuators, etc.)? For instance, does it help create more interest in learning computer programming, or widen the potential audience among kids and undergrads for going further in their CS education?

Microcontrollers can address two important aspects.

The first is bridging the gap between the code, and the real world. Particularly if you have sensors (accelerometer, buttons) and outputs (an LED array, sound, motors). Not just to address the robotics aspect (which can rapidly get complex), but some simple game concepts (patterns, reactions). Nothing which is any harder than doing the same on a Raspberry Pi with a GPIO extension, but potentially cheaper hardware (which is important if it is likely to get fried). Also, if you want a battery powered device, or a small data-logger, a microbit is more suitable than a Raspberry-Pi.

For introductory use, I think creating a simple tilt-sensitive animation is a very effective way of making 'coding' seem more real. Yes, the coding gets more complicated if you want to do more - but starting in a block editor or python avoids this.

The more tactile, less 'black box' approach to coding seems (according to research by the BBC) seems to provide more up-front interest to less technical students.

The second aspect is working in a resource-constrained environment. Admittedly this is more a advanced concept to teach, but the microcontroller is 'clearly' a different beast to a laptop or a phone. Having some restrictions sometimes help people to solve problems more easily than giving them the blank sheet of 'plus anything you can find a python library for'. A computer small enough to wear on a lanyard will shift the way students think about what is possible.


Teaching data structures with C++: should I go with smart instead of raw pointers? I teach an intro to programming course which covers mostly the basics (data types, control flows, functions, arrays, pointers, singly linked lists, circular linked lists, doubly linked lists, without any OOP concepts). The course is taught using C++ but the focus is not on C++ but on the core concepts (the language is just there for implementation, so we only cover the very basics of it).

So far we've been using raw pointers to build linked lists. But I was wondering if students would benefit from switching to smart pointers. I know there are many pros to smart pointers, but I also fear students (who are novice to programming) would "get used" to leaving the cleanup to the compiler, as they wouldn't need to worry about dangling pointers or memory leak problems.

I think the benefits of raw pointers are that students acquire good practices (same reason they don't learn about high-level structures like vectors or maps yet, until they go on the next course and start with OOP). Also I think raw pointers could be a more "standard" way to learn linked lists, since the course doesn't focus on C++ but on the programming fundamentals, and the more C++ specific it gets, the harder it might be to transfer these concepts to a different language.

So for now I've always believed it a good idea to stick to raw pointers, but I don't want to trust my (limited) knowledge on the matter and would like to hear other opinions :)

In my view, C++ isn't a toy. It is a professional language that should be approached in a professional way. With that in mind, the latest versions are a vast improvement in safety over the earlier versions.

Bjarne Stroustrup once said something like: In C you can shoot yourself in the foot. In C++ you can blow your leg off.

That said, use C++:17 or later and use smart pointers. There is no reason to teach students techniques that are considered obsolete. Find a good book that is compatible with that philosophy, not one that uses a "historical" approach. The past was left behind for a reason.

Alternatively, teach C if you want to teach lower level concepts or Java for higher ones.

I'll note that many of us had to take an historical approach to C++ since we started when it was only a preprocessor for C itself. It has come a long way since then and modern developments have made it safer.

An anecdote might be instructive. I once spent 24 hours finding an allocation bug in a C++ program. The correction required a single character change in the source. Not very productive. Smart pointers would have made such things much better. I now much prefer languages with good garbage collectors to having to solve the memory management problem again (and again) in every program.


How to learn web design if backround is on mathematics and data analysis? What would one suggest to learn web development? I was educated to mathematician and have done data-analysis. Now I was asked to do web pages, and I would like to practice that. However, it seems to be tricky to learn how to make sites to look good in both laptops and mobile browsers. Therefore, I would like to know good books, lecture notes, studying roadmap etc. to learn responsive web development by HTML and CSS. I like to learn those technologies first as the free host github sites supports those.

Just about everything you need can be found in one or another book. O'Reilly has a large selection of reputable work. (No affiliation) But a topical search online or at Amazon will get you what you need.

If you prefer video, a search at YouTube, say, will turn up lots of possibilities.

Prefer recent books and videos, however. Straight html is seldom used for serious work these days.


Is it possible to ensure division of labor on a group assignment? Let's say I've assigned my Intro to CS class their first group programming assignment. A common problem is that the most invested student in the group will end up doing the majority of the work. At grading time, there are techniques that can be used to determine how much work each individual did--I don't want to focus on that. Instead, I would like to hear if there are any ways to ensure that the group actually divides up tasks proportionately without planning their project for them.

Is this possible? If so, how? More importantly, is it possible to do this without external pressure? How can we give them the incentive and tools to really want to cooperate?

Assume that the class has been introduced to OOP and has completed a few assignments, but exposure to CS is minimal.

Bonus: Is it actually better for the students' education to ensure this or to leave them to their own devices?

Make each group member explicitly be 'responsible' for one aspect of the project.

Let's think about why group work is a useful tool in terms of teaching your students. I'd imagine one of the big reasons you would assign a group task is to prepare your students for a job, working with a team to build a product. In the workplace, you typically have a way of assigning individual roles and responsibilities; if you're building a website, you generally would have someone responsible for design, someone for the backend logic, etc.

You should do the same thing here. Specifically require that your students build a plan, with each member being given a role that they are individually responsible for, and before allowing them to proceed, make sure each role is relatively equal in scope. You wouldn't want Alice to have ten times the work of Bob in the plan—it won't give you the scope to analyse each bit of work individually.

Obviously, each piece of the project likely depends on another, so it's very difficult to isolate each person's contribution individually. That's why I'd suggest not weighting the group work too highly, because the difficulties of evaluating the outcome far outweigh the benefits of making the group work count for a high percentage of the grade.

Carnegie Mellon's Design & Teach a Course section has some useful tips:

  In addition to evaluating the work of the group as a whole, ask individual group members to demonstrate their learning via quizzes, independent write-ups, weekly journal entries, etc. Not only does this help you monitor student learning, it helps to prevent the “free-rider” phenomenon. Students are considerably less likely to leave all the work to more responsible classmates if they know their individual performance will affect their grade.

  To create individual accountability, some instructors combine a group project with an individual quiz on relevant material. Others base part of the total project grade on a group product (e.g., report, presentation, design, paper) and part on an individual submission.

You'll need to think about your aims. Do you want to test the group's ability to spot people not contributing as part of the teaching? If so, don't put in those safeguards, and see what happens. If you just want to test their CS knowledge, make sure that you can fairly evaluate individual contributions, as well as the overall result.


How do you make your CS lectures more interesting? My biggest challenge each semester is keeping students engaged in class. It's obvious that most of them would rather be somewhere else. I don't know if it's the students, my lecture, or both. I wish I had the resources to present a lecture this way. I believe that generating interest is just as important as the content itself, because this builds a passion for CS that will fuel future learning. 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.


Should the first Programming/Algorithms class be taught in pseudo-code? When I was studying, my professors had different approaches when teaching programming to beginners:

Choose a language with which the professor is comfortable and fulfills the course requirements but might not be so popular in the real world. I had this experience with Mathematica programming. We would spend lots of time dealing with this language and as a result less time dealing with the programming language per se.
Teach in a flavor of pseudo-code. This makes it "harder" to commit errors cause by compilers, interpreters and syntax in general and allows the students to focus in the problem. Naturally has the disadvantage that you can't run your code anywhere.

What do most professionals and students prefer when teaching/learning algorithms and basic programming?

No, it shouldn't.  It's an appealing idea, but when kids are just starting in programming, one of the few straws they have to grasp at is that it is, on some level, very concrete.  I type:

std::cout << "Hello World!";

... and out prints "Hello World!".  Without the ability to run and troubleshoot code, I'm afraid that everything will become abstract, and most students will simply flounder.

You can choose a language with easier syntax, such as Python, or a visual language like Scratch, but the kids really need something to actually run and manipulate if they are to make early progress.


Any auto grading site that supports all-testcases-in-one-file (and/or in github)? I use repl.it,  and one problem i note, is that each new test case has to be added by many gui-web clicks.
it is both slow and annoying, and makes it harder to :
1) send to other teacher to review the testcase
2) store the assignment in github ( for backup/ development/review)
3) see all tests cases at once
4) transfer info between sites ( if a better site is found, i want to transfer all the assignments data inc. testcases easily to the better site).

Saw in another SE-CS-educators thread, STEPIK  site and in some other thread VPL for Moodle was suggested.
How many have used VPL-Moodle for K12 ?   and STEPIK ?    (  grades 10-12)
Are there any other autograder sites, that support one-file-that-contains-all-test-cases  ?

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


Lesson Idea: Arrays, Pointers, and Syntactic Sugar One of the most challenging concepts to instill in new CS students is 0-indexing (indeed, the pedagogy of this fact probably merits its own discussion). Another difficult topic -- although a slightly more advanced one -- is pointers. (I'm thinking particularly of programming in C.) With this question I'm wondering if part of the difficulty is the syntactic sugar in C that allows the following to be equivalent:

// declare array of 5 ints on the stack
int num[5];

// use array notation to change first element
num[0] = 42;

// use pointer arithmetic to change first element
*(num + 0) = 42;

With array notation, we are explicit with 0-indexing, but the logic of it isn't apparent. Yet, with pointer arithmetic, it's more clear (I think...) why we use 0: the pointer stores the base address, so dereferencing the pointer brings us to that address which is where the array logically begins.

Comfort with this leads to the topic of memory management on the heap with something like this:

// declare array of 5 ints on the heap
int *num = malloc(sizeof(int) * 5);

// use pointer arithmetic to change first element
*num = 42;

I am toying with expanding my introduction on arrays next year to include this particular use of pointers. I recognize that it would involve taking maybe a single lesson on arrays and expanding to something closer to a week long to tie together all these ideas.

However, is it worth putting aside the syntactic sugar in order to understand more accurately the indexing of arrays? On the other hand, does the introduction of pointers and memory complicate the process so much so that confusion about arrays will increase rather than decrease? (I'm thinking of this is a "lesson idea feedback" discussion.)

This is a great explanation of why 0-indexing exists. As someone who barely knows what a pointer is, your explanation made perfect sense. If you wanted to dumb it down a little you could phrase it as:

  When you create an array, the variable you assign that array to is actually a pointer to the first element. Lets create an array num. When you want to modify the array, to get a pointer to the first element you want to add 0 to num, because num points to the first element. For the second element, you add 1 to num because num is a pointer to the first element and the second is one after the first. Then for the third element, you add 2 to `num, and so on, so that the first is adding 0, the second is adding 1, and the third is adding 2.

A useful resource is this website which explains how num[i] is syntactic sugar for pointer arithmetic (*(num+i)).

I think that this discussion will increase clarity and be very useful because it makes sense as a logical way to implement arrays and revels a cool thing about the language. I'm not sure that you have to talk about memory, but talking about pointers is certainly worthwhile for this example.