Workshops on Cloud (Azure) About a month ago (before they took off for their vacation) some of my technology club members asked me if I could conduct some workshops on cloud. Being a lifelong Microsoft man, and something of an Azure expert, I told them that I could conduct series of short workshops (2 to 5 hours) for them and their friends. Now, they are back from their semester break, and I have to begin in 2 weeks.

This will appeal to a number of students as the cloud works with dot net, droid, web and iOS. I am expecting a decent audience (the workshop are has a capacity of 8, and I think it will fill up). These are folks who have never seen any cloud dashboard, AWS or Google or Azure. Further, these are folks who are interested, but have probably never even built a simple app and connected to a database. We are looking at a blank slate folks. Curious but currently without knowledge. So, here is what I am planning.

Overview about Cloud, specifically Azure
Why Azure (or in general, why cloud service versus say a database server)
Cloud Services (data services, web site services)
Virtual Machines (and then reconfiguring them to Active Directory, ADFS and FTP)
Using items from the marketplace to complete a project.
Pricing considerations between cloud providers (Azure, AWS, Google) and conventional solutions (like web hosting, blog hosting providers, VM providers, SQL db providers)

These are things I am planning. I believe many of you are not just educators but work in the industry (similar to what I do, train and work). So, let me know what else I can add/remove here. Also let me know if you have any thoughts about the topic itself. and, if Azure itself is not the right fit, perhaps something else.

If the topic itself is too broad, please leave a comment (before down voting if possible), and I will break up the question into many questions and link them up.

Here is a short list, of some ideas. You could not teach them all fully in a short time, some you may only introduce, discuss, compare:

What is cloud: Just one or more servers on the internet. The advantage is that you don't have to invest in hardware. Cloud is tech marketing speak for “Somebody else's computer”.
Cloud provider independence: Look at tools that allow easy migration to other cloud providers, such as docker-ce.
Cloud services vs my services on someone else's computer.
Gnu/Linux: This OS runs on 490 of the top 500 super computers, the other 10 run UNIX. It is also used by >60% of the web, and most of the internet infrastructure.
no-sql databases: such as couchdb, mongodb, et al.
no-cloud: The cloud sounds fluffy and distributed, but it is not. Look at fully distributed systems, such as ipfs. ipfs is a bit new, so future looking.
Configuration control: such as pupet, ansible, cf-engine. These can be used to deploy software, and keep servers consistent.
Focus on what service it provides to the user: A place to ask and answer questions vs a web site.


History of educational programming languages I wanted to analyze the history of educational programming languages and their evolution up to the present (and probably make the presentation out of it for middle schoolers). Can you recommend any supportive materials with deep historical retrospective analysis since 1960s (Logo Turtle, Squeak etc.)?

I'd suggest you reconsider. To understand e.g. why Pascal is a nice teaching language you need to have a decent background in programming languages, some notion of teaching programming (the misconceptions by learners are often way, way different than you'd guess in your wildest nightmare), and hopefully some experience teaching.
Languages specifically designed for teaching are a wildly varied  bunch, most never won any sort of wider traction. Or if they did, they soon outgrew the "to teach programming" range. Take a peek at BASIC and its recent incarnations (don't look like BASIC at all); languages like Pascal (designed to be easy to implement and teach); Logo and even (to some extent) Scheme are part of the flock.


What can the instructor do to overcome the Authenticity Bias in students? A recent Blog post by Eugene Wallingford raises the issue that students often perform according to their perception of their abilities rather than their actual abilities. If a student performs better than their "natural abilities" suggest then all is well, of course. However some students do less well than  they might simply because they think they aren't "smart enough" to do better.
It is a well-known phenomenon, at least in the US, that some students do poorly in math because they have the belief that "I can't do math." Often enough, however it is just lack of exposure or poor teaching that got them to that belief. It might even be a single bad experience. The same is likely true in other technical subjects. For that matter, it may be true in most subjects, but it may also be that the problem is more likely to be overlooked in, say, History.
The author of this believes that success comes from interest and hard work not natural ability, but that may not satisfy many students. In fact, saying "you just need to work harder" may increase their frustration, rather than their confidence.
Of course a self-perceived lack of ability can easily lead to a lack of interest.
The question, then, is:
What can the instructor do to overcome feelings in the students that being a CS Superstar simply isn't in their future, and so help them not settle for less than they might achieve?
Some ideas might be interesting ways to speak to them, but hopefully many of you have seen this and have creative ways (exercises, teams, ..., anything) that can get a student to live beyond their self-perceived limitations.

Authenticity Bias is a common phenomenon in recently promoted professionals who have new responsibilities. It is the sense of being a fraud in their new position. "This isn't me, I'm playing a role." Often the role demands behavior different from what they are comfortable with. Many, however, have found that not accepting the new role is a path to failure. Falling back on old habits, "the real me" simply fails in the new role.
On the other hand, playing the new role consciously for a while can lead to a "new me", overcoming the Authenticity Bias.

Share their own struggles. Period. The instructor can start dispelling the myth by sharing his/her own story (replete with self-doubt, struggle, and frustration most likely) about studying computer science.

In Harvard's CS50 course, the professor shares his experience of not starting as a CS major and of essentially taking CS50 himself pass/fail. That's in the first lecture and communicates an important message about his journey not being one of simply innate talent. In another MOOC I've referenced before (Programming Languages from UW), the professor points out that he didn't write a line of code before college. As a student in each course through edX and Coursera, respectively, these small windows into the journeys of the professors has boosted my own confidence that one does not to be fluent in assembly at age 10 (exaggeration) to be a skilled programmer/computer scientist.

I share with students my own long and winding road that led me to CS. I share with them what I continue to study in my free time. I display old, poorly-written code. I recall one instance from teaching last year when I was trying to communicate to students how important it is to read program specifications and language documentation extremely carefully. From a homework assignment for Programming Languages, Part A, I kept figuratively banging my head against the desk because I was sure my logic and code were right, but I wasn't passing the checker. The problem: I was misunderstanding how a library function was working. Once I re-read the documentation and realized my error, the fix was trivial. Moments like this happen to everyone at every level of ability. Everyone struggles with something at some point.

Students need to see that the person teaching them is fallible, and that his/her knowledge has been gained through a lot of "blood, sweat, and tears," not because he/she wrote C code at age 5 (exaggeration again!) and never had a problem learning anything thereafter.

I also find some of the stories from freeCodeCamp inspiring. Their forum and Medium blog are filled with examples of individuals making career changes, working hard for an extended period of time, and achieving some level of "success."

The bottom line: find stories to share that show students there are more people feeling what they feel than they might first imagine. Prove to them that computer science rewards hard work, discipline, and focus. In my mind, that starts with the person in the front of the room sharing his/her journey.


Becoming a master from a newbie at Computer Science and Electronics I want to learn about Computers and Electronics and presently don't hold any kind of degree in the same. My urge to learn is entirely driven by my interest and curiosity for these subjects. I will be teaching my self at my own pace using materials available online.

But being a newbie to all this, and as these fields are very broad, I find it difficult to find where to start. I would like to do everything systematically and not just randomly picking up stuff, because all it does is to create loopholes and confusions. I would like to gain some insight regarding the same from your past experiences at learning.

So my only question is, from where should I start my learning process i.e. a kind of topic list which I must follow? For instance, what do university programs teach, in what order, and why do they prioritize the way they do?

I am glad to see your question, because 40 years ago, I was a child who was extremely interested in electronics, radio and computers, and the resources seemed much more limited then.

I would say, because the field is so broad, it does not matter where you start. Pick something that interests you and go as far as you can with it. My first interest was in building an amplifier to use with a microphone so I could make loud noises (your personal goal does not have to make sense to anyone else) so I read books about transistor amplifiers in hopes of finding a simple design.

My suggeztions are:

Find an Amateur Radio group and participate
build some simple kits
write some simple programs
use the relevant Stack Exchange sites
choose some specific goals or projects
"Nevah, nevah, nevah give up!" (Winston Churchill)

Don't worry if you don't get to your specific goals - I never built that amplifier - you will learn so much on the way, and become a specialist in something. I eventually became an expert in small transmitting loop antennas, C and data communications. Qapla'!


Logo course scaffolding Good afternoon, colleagues!
We're planning a year-long intro course to computer science for middle schoolers and going to use Logo as a main language but also looking for alternatives available to 5-6th graders. I'm looking for learning materials we can start to work from. Can you recommend anything that has a week-by-week plan with homeworks and in-class assignments to see if we're able to fit in limits we have?
Thank you!

Scratch comes with a large document of day-by-day lessons along with labs.  As a side benefit, due to the exploratory nature of Scratch, creating new assignments is fairly simple.  "Create a movie about ____" or "create a small game that involves bouncing" or "create a game that responds to sounds as the controls".
Actually, that blank is great.  You can tell the students to create a "movie" or a game about any topic the kids are studying elsewhere in the curriculum, and allow them to make use of all of the techniques they've learned and explore other parts of the program.
To my thinking, it's also advantageous to use scratch concurrently with logo, since using two systems will introduce the key computer science concepts twice within two giant, open, exploratory worlds.  This increases the chances that the kids will see the parallels and really begin to absorb the computer science concepts.


Online courses to form or improve a CS resume? I am looking to start a career in CS (programming, software developing and eventually artificial intelligence) but don't have the economic means to attend university.

I am currently working on Harvard's CS50 online course (my first programming experience, too) and was wondering what other online courses are available to help me build a resume and help compensate for my lack of degree.
-- Is this a good way to start learning programming?
-- What are the pros and cons of self learning compared to learning in an established university program?

You've got a lot of really broad questions here, so it's going to be a little difficult to unpack them all. Consider only posting one specific question per post. Also note that the answer really depends on you more than anything, so a lot of this is hard for us to answer. But I'll offer my two cents:

  what other online courses are available to help me build a resume and help compensate for my lack of degree. -- Is this a good way to start learning programming?

This is three different questions:

What online courses are available?

There are a ton of online courses, and which one you'd take depends on exactly what you want to be doing. Programming is a huge topic: there's web development, server-side development, database management, robotics, machine learning, system programming, etc.

First figure out what you want to do. Then start searching for tutorials and online classes.

How can I build a resume to compensate for a lack of a degree?

List the projects you've worked on. Create an online portfolio showcasing the stuff you've actually done. Don't tell me what you know. Show me the projects you've completed that demonstrate what you know.

Keep in mind that this won't happen overnight. You won't get to this point just by reading one book or breezing through one online tutorial. You have to spend some time working on a project.

Are online courses a good way to learn programming?

Like I mentioned above, whether they're a good way for you to learn programming is more up to you than it is us. We can't tell you what's best for you.

I will say that the only way to learn how to program is by programming, working through the process of taking a big problem and breaking it down into smaller steps. Whether you get that practice from tutorials, or from an online course, or from a university, is up to you. The important part is putting in the work.

  What are the pros and cons of self learning compared to learning in an established university program?

I think you probably already know these. A university program gives you access to teachers and peers, and provides a structured environment. Self-learning allows you to learn at your own pace, and it's much cheaper but harder to "prove" what you know.


What professional development events or conferences are out there for CS educators? I'm trying to find a professional development event for myself as a relatively new CS educator. I'm interested in something that showcases innovative ways to teach and engage students in the subject -- any recommendations?

In particular, conferences for high school educators, and those that showcase new technology/tools for CS educators would be brilliant. I am based in the USA and am happy to travel to events.

In UK England, there are CAS Computing At Schools events. They are regional events. They are focused on primary and secondary schools.

They are usually inspiring, but can be a bit simplistic if you have done programming for a job. The events I have been to I have ether chosen the groups that are teaching focused (as opposed to technical focused). Or in smaller events steered it towards teaching techniques. Each event has been multi-threaded (choose your thread), or small and adaptable.

You can sign-up to their e-mail mailing list, to be informed of events in your area.


Show students the consequences of their design decisions In my experience, university students spend years writing throw away code. They develop assignments, get them auto-marked, then move on.

On the other hand, professional developers are plagued by the long term consequences of their work and those before them. These subtle flaws only emerge over time.

How could a semester long programming course put students through a more realistic development cycle?

I'm not so sure what you're talking about is a great idea.

Students should be writing a lot of throwaway code, especially at the beginning of their education. They should be learning, writing code to test what they learned, and then moving on to the next thing.

Part of being a student is writing code that, 6 months from now, will look like garabge to them. "Why would I have done it this way?" This is a completely normal thing that everybody feels, and it's a sign that they're learning and improving as developers. But it also means that students shouldn't spend a lot of time polishing their code. Instead, move on to the next thing.

The rest of it comes with experience. Don't worry about "design" so much, and just focus on writing code that works. Forcing students to work with code they wrote weeks or months ago is just punishing them for learning and improving.


Big-endian, Little-endian I have explained big and little endian from time to time in my teaching career, but it is quite dry, and asking my students which direction each one goes three months later has revealed to me that my lesson doesn't make which "end" goes with which part of memory really stick for my students.

I would like to explain endian-ness so that it is fun, memorable, and makes clear why the two systems exist, but I haven't found a good way yet. It's a small concept, so it can be a short demonstration, but I still want to make it effective.

Does anyone have any classroom tricks up their sleeves for this one?

The way it was explained to me -- how this distinction without a difference came about -- is quite simple. If we are storing text in a file, it is quite natural (for users of ASCII, which has one byte per character) to place the characters one after another, starting with the first one at position zero. If more is added to the file, it easily goes on the end. This agrees with the convention of writing left to right, say on a board (white, green, brown, black, or otherwise.).

The wrinkle in the rug is that numbers are often larger than one byte (gosh darn it) and so we have two choices for how to write them in to a file, send in a stream, transmit data by radio from one Hawaiian island to another (the founding of the internet) and so on:

send the most significant byte first
send the least significant byte first

Huh. Now there is a stumper for you. Which should we do? It is natural when the digits of a base-10 number are written in a text file, like "12,345", to send the first byte, well, first, eh? But someone decided that numbers should send the least significant bit first and then forward from there to the most significant bit. This makes total sense if you are writing out, say, the bits of a data stream (image file, encrypted data, etc) and so then it would be just like the ASCII text case, except bit-wise, and the bits should ascend as we write them on a board... uh, left to right. Yeah.

Bits, bytes, schmytes... What does it really matter? Well, just like how we ended up with cars going on the left in some parts of the world and otherwise right, just like how we have 220 V AC in parts of the world and 110 V split phase in other parts, just like how some languages are written in letter-scripts and others are written using ideograms, it makes no difference whatsoever, unless moving from one system to the other. The real question is:

  "why can't we all just get along?"

Or in other words: why do standards emerge only after two or more groups have already made a big investment in different schemes? That is the subject of a larger course.


The impact of switching to Java 10 Java 9 and 10 were both released recently -- Java 9 was released on Sep. 21st, 2017 and Java 10 was released on Mar. 21st 2018. These two releases contain some very big changes: Java becomes modular and has REPL, various APIs have been improved, and Java now supports type inference. However, the changes are, partly, meant to allow backwards compatibility.

Currently my school teaches using Java 8 (but for it's worth, it might have been Java 6). I am considering switching to using the latest version of Java in the curriculum, but I'm not sure how useful it would be for the students, in comparison to the current curriculum.

The school teachers are very open to updating the curriculum, so it's simply a question about benefits students might gain if we were to upgrade the curriculum to use the latest version of Java.

So, what significant benefits would the students gain if they were taught Java 10 (and also the effect of a Java 10 centered curriculum)?

General overview on updating to Java:

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

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

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

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

General overview on updating to Java 9 and 10:

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

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

Language changes and major new features:

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

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

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

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

Minor new features and quality-of-life improvements:

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

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

Other changes:

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

Details: Changes in Java 9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Details: Changes in Java 10

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

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

Some changes worth talking about:

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

var foo = new MyLongObjectType();

This is treated as being exactly equivalent to doing:

MyLongObjectType foo = new MyLongObjectType();

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

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

var foo = new ArrayList<>();

...is treated equivalently to doing:

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

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

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

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

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

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

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

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

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

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


Curriculum choice for AP Computer Science Principles I will be student teaching an AP Computer Science Principles class next year and have run into an issue. All of the high schools around us are using the Code.org curriculum but from talking to students who took the class 2016-2017, they remarked that code.org was very poorly setup and very remedial. These were students with background in CS and they seemed bored of block programming and so-called 'spoon feeding' but I am stuck deciding to stick with Code.org and try to figure out a way to make it more interesting for the more advanced students, or to use an alternative like https://ap.cs50.net/ a class that is more difficult by review but seemingly more rewarding.

TL;DR - Should code.org be used for APCSP and should I personally make it more difficult for the more experienced students, or should I use a more difficult curriculum and give more help to new students?

TL;DR Teach CS50 AP.

I taught AP CSP this past year, and I cannot speak highly enough for the curriculum that CS50 has written for this course. I'll try to enumerate its strengths as objectively as possible:

It actually feels like a legitimate AP course in the sense that it is a college course (the most popular one at Harvard and I believe the most popular MOOC as well) adapted for high school. The connection to Harvard adds great legitimacy to the curriculum and engages students.
The curriculum scaffolds nicely for beginners or students with a little background (especially Python). The language progression from Scratch to C to Python helps students build a foundation in computational thinking and progress towards more advanced programming constructs, culminating in building engaging web apps.
The resources available are unparalleled. CS50 has every lecture on video from every past iteration of the course. There are video shorts for every important concept along with additional study pages. Plus, there are communities here on SE and on Reddit.
It is about more than programming. CS50's three pillars are "accessibility, rigor, and culture." It brings all students to the table, challenges them, and also creates a classroom environment that stress community over competition. Events like CS50 Puzzle Day set it apart from any other class out there, AP or not.
The teacher support is incredible. I'm a part of a community online of other CS50 AP teachers, and it was invaluable throughout this past year. They constantly reach out and cultivate connections among teachers of the course.
The course stress student growth. As they say on their syllabus, "what ultimately matters in this course is not so much where you end up relative to your classmates but where you, in Week 11, end up relative to yourself in Week 0." This stress on a growth mindset approach is perfect for beginners.
Students are more than prepared for the AP Exam.

I could keep going on and on, but this is sufficient for now. I believe strongly in CS50 and CS50 AP. The edX course CS50 quite literally changed my life. As one of their shirts says, I am "CS50 Proud."


Lab ideas for set theory The title of the question actually says almost everything there is to say.  I cannot think of any programming labs whatsoever that would naturally flow from set theory.

My students will be coding in Scheme (Racket), and will be pretty new at it when we approach this topic.  Are there any ways to translate the concepts of set theory into a reasonable lab?

We are covering:

Basic definitions
Venn Diagrams
Union
Cardinality
Cartesian Products
Power Sets
Bijection (as proof of cardinality)
Infinite sets $\aleph_0$ and $\aleph_1$
Drawing a diagonal line to prove $|\mathbb{R}| \neq |\mathbb{N}|$
Russell's Paradox

This answer will be general, rather than specific to your proposed curriculum. Since you note in a comment that it is set theory that you want to stress over Racket programming, I'll suggest the following.

First, it is difficult to advance students on two orthogonal axes simultaneously without confusing at least some of them. Therefore you want to put the stress on set theory and its beauty and limitations over the programming aspect. If you were using a language that they already knew well, I'd make a slightly different suggestion.

But first, give them a good, traditional, view of set theory and how it relates in general to modes of thought. Any good book, even if it doesn't mention programming at all, could  be used, even Naive Set Theory by Halmos. Use programming primarily to illustrate things in a simple way so that the functional programming doesn't take up too much of their thought space - just enough to get the flavor of, for example deep recursive programming.

The programming exercises can be quite simple, but I would choose them in such a way that they also serve as an introduction to complexity theory and the problem of growth. Something simple with Cartesian product and many dimensions can illustrate the growth. It is also possible to write functional programs for things that seem simple but have terrible run-time. For example, a naive version of reversing a list can easily be quadratic if care isn't taken.

I don't know what libraries Racket offers for support of sets, but it might be useful to talk about the development of such a library - building a tool box of simple set operations.

But, in the main, use the programming as a way to reinforce the theory, not so much as an end in itself. Set theory is rich enough and with enough applications to math and CS that you don't really need to do much more.

If you really want to teach FP in Racket, then a different set of exercises that help the functional thought process develop would probably be better than trying to force it into one realm.


methods early in Java - before objects Does it make sense to introduce methods even before objects? What we are attempting to do is to get students out of the "everything in main()" mode as soon as possible.

Suppose one starts out with a simple program to compute the roots of a quadratic equation. One can imagine the main() method (very early in the course) looking something like:

   Scanner src = new Scanner(System.in);
   System.out.print("Enter coefficient a");
   double a = src.nextDouble();
   // similar pairs of lines for b and c
   double rad = Math.sqrt(b*b - 4*a*c);
   System.out.println("1st solution is" + (-b + rad)/(2*a));
   // print second root

Now we want to introduce methods to demonstrate decomposition into methods invoked from main()t each of which does some parts of the work. One can imagine method signatures like:

    double getCoefficient(String prompt, Scanner src) {...}
    double computeRad(double a, double b, double c) { }
    void   printRoot(String label, double a, double b, double rad) {
            // called twice, once with rad, once with -rad }

If we want to call these methods from main() the methods must be declared static. Alternatively one can create an instance of the class and invoke the (non-static) methods via the instance. But, we really haven't discussed objects yet (or at least objects the student writes). Our group is split between the static vs non-static approach. The other split involves passing both objects and primitives to methods as this can get into the discussion of pass-by-reference. However, the latter discussion can be brought up later when revisiting methods in future work.

If we go the static route, then later we must point out that many/most methods are non static. If we go the new X() route, one ends up talking about constructors, even if we use a default constructor.

Where and how do you introduce method in your first programming course? Is the proposed structure too advanced? How might you alter it?

Thanks

UPDATE 1:

I mostly agree with Objects early, but I wanted to do methods even before
conditionals. I have students
use Objects before creating their own classes. Thus the many small methods. Yes, it is encapsulated in a class, but I don't need to deal with constructors yet.
My style of programming was dramatically changed when I took MIT's SICP at HP in the
1980's.

To flush out my ideas I created the following:
QuadEqn.
The assignment consists of several parts. Part A is designed to be completed
before conditionals are introduced. Parts B, C, and D come later, perhaps as
lab short exercises rather that full blown assignments. I have run this by our
undergrad TA's but would like to solicit additional feedback as well.

Again, thanks

UPDATE 2:

Thanks for all the valuable feedback! I have not decided on using a methods first approach, but am simply trying it out to see how it would come together.

The two general approaches to teaching OO that I've seen are "objects first" and "objects last".  Objects first takes the notion that, since we are teaching OO, we should start with instances, APIs, method calls, and inheritance.  (See Greenfoot as an excellent start to an objects-first curriculum if you are interested in exploring this approach.)  Eventually, you start to delve further into the nitty-gritty of the language, adding in arrays, loops, mods, etc, etc, etc.

Objects last follows the historical developments more directly, teaching imperative programming without OO first in order to highlight some of the thought process that went into developing OOP in the first place.

If you are taking an objects-last approach to your course (and it sounds like you are), then methods naturally fall before objects, and need to be included.  Methods were an important development for both code clarity and code reuse.  Though it's true that everything will need to be static at first, you can either leave this in as a temporary magical incantation, or make note of it as something exciting that will come later, and that about two-thirds of the way through the course, you will flip everything on its head, and those static markers will largely go away.


Explaining why styling should not be done directly in HTML I recently noticed that <marquee> has been deprecated from html according to this site. From this answer on Stack Overflow, the marquee replacement is made from CSS. The explanation given to the change is that html is about document structure, and that layout and animation and styling etc. should be done from CSS.

This got me thinking:

Would explicitly teaching the difference between setting the style attribute of an html tag, and doing it through CSS useful for increasing the students' understanding of the joining of CSS and HTML?

To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.

By "explicitly teaching" what I mean is actually devoting a lesson with the title of "Styling through .CSS", or something similar.

Some context, if it is needed:

The students learn basic web designing: HTML, JavaScript (very basic), JSP and SQL. They learn these for 1 year and at the end of the year they should have a website (for which they receive grades). I am wondering if a lesson entirely about CSS might eventually lead to better looking websites.

I like the idea of producing a few style sheets, and having the pupils apply them to their HTML. They can then see the power of having separate style sheets.

Start with a style sheet that you made. Use the new grid layout, have some college styling. But at first get them only creating the html.

They can then start editing the style sheets. They will see that the power of one small change can change every heading, or every paragraph.

I have also in the past, written a HTML file that had a set of buttons at the bottom. These buttons would trigger a different CSS file to be loaded. It was some very simple JavaScript.

To answer should they be kept separate

Keeping style and content separate, is recommended by W3 and many others. It implements separation of concerns and single responsibility. Both very important patterns in software design.

Even better: keep layout, style, structure, and content separate.

One css for layout, another for style, then a template for structure (I use moustache), pull the content from a database, to create json, and programmatically combine it with the template (use a template library). [this section is now about my teaching, but what I do for my websites.]

To answer should you devote a lesson to separate CSS files.

Yes. If it is important to keep these separate, which it is, then you should teach pupils to keep them separate. Save time by not teaching them to mix it in with the HTML (This will save time twice, as you won't have to un-teach it).

I have only done this with one or two people (not a class).


Array or vector? Two dimensional array or matrix? I'm from Brazil and I'm involved with programming language teaching for, at least, ten years. I have a background in computer science and my colleagues tend to use the term vector to describe an array in programming languages like C or Java. I particularly HATE this use of the therm vector, since vectors and matrices are mathematical entities that can be added, multiplied and so on, while arrays and multidimensional arrays can't. I know that there are languages that these constructs exists, like MATLAB, but they don't exists natively in the most used general purpose programming languages. In Java there is an data structure called Vector, that is, in fact, a synchronized list that can't be added, for exaxmple. C++ also has a vector data structure/container in STL that is a list too and is not a mathematical vector.

I always explain this for my students, that some people call arrays as vectors and multidimensional arrays as matrices and that this is kinda wrong. I tell them that an array can be used to represent a vector, but that it is not a vector! The same for matrices.

I would like to know what do you think about it! Do you think that is correct or not to call arrays as vectors? If so, why? Is this "missconception" common in your country?

EDIT

I'm sorry if I sounded pedantic. My confusion was introduced by one of my professors during my undergraduate course. He was a mathematician/physicist working with computer science. Maybe this was the reason. I will correct it now, thank you!

First, see this question on being pedantic. Second, consider the fact that you are teaching Computer Science and not Mathematics. The former is not a subset of the latter. There is some overlap, of course.

Next, I see no issue with being precise about terminology when students might be studying both fields. If you want to clearly distinguish between vector and array, I think that is fine, though you may possibly just be stressing the wrong thing.

Vectors in mathematics are used to understand things. (That is the core of pure math, after all). Arrays, call them what you will, in CS are used to build things that are useful.

But lots of things vary between math and CS. Addition of integers means one thing in math. The fact that it normally means modulo addition (with a fairly large modulus) is seldom stressed initially and is irrelevant for many (not all) purposes. Likewise real values mean quite different things in math and in CS. If you spend too much time on the details of the differences you may not have time for what are, fundamentally, more important issues in novices learning CS.

But, the reason that Matrix isn't a fundamental type in a language like Java is that it isn't needed often enough in the work of professionals to make it part of the infrastructure. You can, of course, build a Matrix class and provide the mathematical operations that might be wanted for some applications, just as Mathematica has done.

But, mathematics is like CS language structure in a lot of ways. In math the Peano axioms are, for example, enough to define the structure of the natural numbers. Other things can be defined and built on top of that structure. Likewise in Java, a Vector of Objects is a (somewhat) simple bit of infrastructure that can be used as the basis of more complicated and useful things. So, in both, one has a simple basis that can be extended for the purpose at hand.

I'll note also, that few general purpose programming languages have anything like a matrix as a primitive. Normally a two dimensional structure is more like an array of arrays (vector of vectors) and so in the second dimension the index limits can vary. But OO languages can, of course, control that and have "true" matrices, though a "row" and a "column" in such a structure are quite different in the implementation. But, again, in mathematics the row and the column are ideas, and in CS they are implementations (built things).

Well... I suppose that any Turing Complete language is "general purpose" in some sense.


Reducing bias, from lesson that improves, as taught to a number of classes I have been giving my class help-sheets, recently. This have lead them to me more independent. They are also filling in a S.N.O.T form, this is a form where they tick off tasks, to show if they did it by there Self, with a Neighbour, with the help of an Other, or the Teacher. I have been using these sheets, to give feedback and improve the help-sheets (If to many ask for teacher help, then improve the help-sheet).
A consequence of this is that the help-sheets improve over the week ( I teach this lesson 11 times a week). This results in lesson latter in the week being better than at the start.
The problem
The improvement over each week, creates a bias. The students that have the lesson at the end of the week receive a much better lesson than those at the beginning.
After a few weeks this will settle-down, as I will learn what I am doing wrong, and produce better work-sheets from the start. However there will always be some improvements, and thus some bias.
How can a reduce/remove this bias?

tl;dr: My best guess is that your process is fine and you aren't inducing preventable bias (unless the students are in competition with each other)

It may be that you cannot. It may be that your analysis is incorrect. It may be that a solution would be worse than the status quo. It may be that you need not make changes.

One solution would simply be to not improve this week's lesson but use the knowledge about the class to improve next week's lesson or worksheet and hold it fixed until the week following that one. Suboptimal, surely, but "fair" by some definition of "fair.

Your assumption that your sheets improve as you go is only your assumption. It may not, in fact, be accurate. Each of your groups is different and will interpret things in different ways. It may be that your improvement is a distraction or impediment to the next group (see below). It is hard to know until you interact with that group. Every student is different and all are different from you.

If you have thousands of students you can do a statistical analysis, of course, to determine if there is an bias effect.

You don't say whether your students are in some way in competition with each other (a generally poor practice). If they are, you need to worry about "bias", but if they are not then you just need to do the best thing you can for each student.

However, if you really suspect that bias is an issue and that some students are being advantaged and others disadvantaged by your scheme then you need to change, or at least adapt, it. You may need to set some time aside at the start of a lecture to get each group on the "same page" about the current state of things as you understand it. A few minutes of "warm up" at the start of the class can be helpful in any case. I often opened a lecture asking for questions that might have arisen, but you can also use it to make corrections/apologies/give encouragement/add emphasis...

A technical solution, of course, would be to provide some communication channel to all the students so that all can see any updated materials in a timely manner. You could even provide the lecture materials prior to the week's start and warn that they may be updated as the week progresses. Students could then, for example, print them out before class and use them to help follow the lecture. If you have a way to highlight changes to the base document, all the better.

I once taught the same course to three groups in back-to-back periods of about an hour each. I would take questions and use the questions from each group to improve the lecture for the following group so that the same questions needn't be asked. However, I learned (eventually) that the following group might not have the same questions and might have seen the concept clearly already, so I was proactively answering a question that needn't be asked or answered. This accumulated into the third section of course and I found it hard (impossible) to complete the lecture in the third section. Let each group be itself, but if you make a mistake, fix it of course. If you say something dumb early on, you don't need to repeat it to avoid "bias."

A follow up:

While I believe that you need to work to teach every student in every interaction (i.e. each class period for this discussion) it is probably beyond our ability to give each student precisely what he or she needs most at that time. If I am Socrates, teaching one student at a time, or if I'm an Oxford Don, teaching 5 student tutorials, I can probably do that, but with twenty to two-hundred students in front of me all I can hope to do is to make sure that each student can learn something that will advance their learning. Even that is a difficult task with mass education, but it can be achieved. Some students will learn more, because they are primed to do so, and some less, due to factors of their own making or otherwise. Teaching everyone precisely the same thing is not an achievable goal unless the everyones are just robots. Help every student advance. Don't favor anyone arbitrarily.


Looking for puzzle/game programmes, so students can write solvers I was playing some logic puzzles, and was thinking that they would be good for students to program solvers, that can be plugged in to the game logic.

Some of the quantities to make them useful, in order of importance, would be.

Free Software (Open Source): So that we have the freedom to use them how we want, to make changes, and to share our changes with others.
Separation between UI and logic: So that we can replace the interface (UI), with a code.
Model View Controller: to that we can have both the UI and the code solver, and a change in one will be reflected in the other.

Something that has good automated testing should pass point 2 (probably).

To clarify:
I want programs(implementations) of puzzles where a human user is currently the solver, but that might be amenable to replacing that with an automated or AI solver instead.

I am not thinking of real AI (i.e. strategy), but puzzle games such a sudoko, net-route, towers, black-box, magnets, (see https://chris.boyle.name/projects/android-puzzles ).

The concepts I am teaching is just programming. The makes are to add motivation. There may be other benefits, I am sure that it could help with logical thinking, but the main reason is just motivation / engagement.

There is a fairly well known game called, alternatively, Hare and Hounds or the French Military Game. It is a two person game in which one player controls one piece (the Crook/Spy) and the other controls three pieces (the Police). The object is for the Police to "trap" the Spy. The board is a directed graph with limitations on movement.

There is a well known solution for automating the Spy so that it plays optimally, though naively at first, learning from subsequent plays. I believe there is a known "win" for the Spy if it plays correctly.

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

The thing that makes it interesting as a program is that the game is simple enough that a complete play (all positions of all players) can be captured in a very compact way, making it feasible to retain the complete history of plays.

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


How to teach competitive programming? Competitive programming is mainly about problem-solving skills. Students are given a problem and they have to write a short program to solve it. The students are given a problem for which they have to solve within the stipulated time. Efficiency or maintainability or portability of the code is not graded; however, the is a fixed amount of time given for each program to run.

Here is an example problem: https://www.codechef.com/LTIME49/problems/SHDWCMP

This kind of programming does not require a thorough knowledge of the language (for example, in C++, you'd never need to use classes or templates or anything as such) but it requires the student to be able to find ways to convert a word problem into a coding problem.

How do you go about training a student for competitive programming?
Teaching the language is not very hard but how do you improve someone's problem-solving ability?

Learning and teaching competitive programming depends a lot on what level the students already have. The first step is getting to know basic features of a programming language, preferably C, C++ or Pascal, since some contests require to use one of these. Out of these, C++ is used most.

These basic features include at least: variables, strings, input and output, if and else, while, for, basic manipulation of arrays. In fact, this is usually enough to (theoretically) be able to solve every problem. Of course, built-in sorting functions and things like inteprenting characters as numbers are useful as well. As you say, this is mostly just knowing, and less insight.

Improve someone's problem-solving ability is in the beginning mainly practising, for the problems you don't really need any textbook algorithm or other, more complicated techniques. Besides explaining solutions to problems that the student can't solve but already tried sufficiently hard, there is not very much to teach. The "tried sufficiently hard" is important: you learn this problem-solving ability the best when doing this.

After that, on a higher level (e.g. National Final Round, or even the IOI), the students need some standard textbook algorithms (e.g. Dijkstra's algorithm) and other techniques, and you can teach this. You can find all the topics you might want to teach in the IOI syllabus.


Is it easy for professors to get academic versions of software from IBM? I'm developing a big data algorithms course, and would love to teach students how to use IBM's InfoSphere streams platform, which I once used years ago. Does anyone have experience reaching out to companies like IBM to request a version for academic purposes? First I'd need a version for me to play with and develop course materials, then maybe one for students (perhaps at a discounted price) to learn during the course. I've poked around IBM's website, but can't find any clear "contact us" email address. Hoping someone here can suggest a way forward. Thanks!

This is a question to ask on the SIGCSE mailing list. A member there was primarily an educator and now works as a sort of liaison to the SIGCSE community. She will probably respond to such a question.

I suspect that they still have grants available that, with some work on your part, might solve your needs. You might need to write up a research proposal, of course. Easy? Maybe no. Possible? Maybe yes.


What's a good initial lesson for teaching arduino? I'm currently planning a new class at my school on prototyping with arduino (which could later morph into more pcb design). I'm stuck on my first hands on lesson. I want the students to see the capabilities of the arduino, but not do anything too complex because I'd hate to fry anything on day 1.

I considered the standard "blink an LED" hello world program, but that wouldn't take up an entire class period. I have an hour and a half, and all the students are using computers that have the IDE set up so I don't need to leave time for setup.

So, what would be a good first lesson? I haven't chosen a board yet, so please specify which board and why you've chosen that one. Wiring diagrams are welcome!

My preferred lesson, using any board that has servo headers (and you can do it even without these), is to show them how to make a servo turn (I have a wheel attached to it ahead of time).

The program is fairly easy to follow for students, and there is a look of shock when it starts moving. I then tell them that they need to attach the servo along with another one to a box, and make a robot that drives forward, and they will need to add three lines of code to their program.

The challenge of adding the three lines is just different enough from what they have, that they will struggle, but similar enough that they can figure it out.

I then introduce the delay command and tell them they need to program their robot to drive around a big box.

This takes about an hour and a half if I prebuild the robots and it is just programming. If they are building them, add at least another 30 min.

The nice thing is that this acts as a great starting lesson to lead into others. Later you can give challenges that require sensors and introduce conditionals. Serial Communication can be used to make them remote control (works better if you have a board with blue tooth communication).

Depending on your budget there are some arduino robot kits starting around $80 that I think are a good value.


How can we determine which students are a good fit for an educational program? tl;dr: How should I be thinking about assessing technical experience for admission into an educational program?

At my day job, I help run a program that invites undergraduate students to get "real world" experience working on a technical project with a team, under the mentorship of a professional software engineer. The program is currently 10 weeks long and involves working remotely on a team of 3 on a Java servlets-based web app.

So far, the program has been invite-only, but we're planning to open it up to the public. We're still thinking about ways to do that (might be fodder for a separate question), but in any case we're going to be in a situation where we have more candidates than we can accept.

The program is designed to support students with a relatively high experience level. They need to be comfortable coding in Java (including OOP, basic data structures, and tracing through an existing codebase), they need to pick up basic HTML and JavaScript, and they need to quickly grok client-server communications (e.g. get and post requests). Not to mention git, GitHub, Maven, workspace setup, team communication, etc.

We're not expecting any of our students to already be experts in any of the above. But they do need to be pretty comfortable asking questions, debugging, reading through documentation, and tracing through code. This is a virtual program where we don't get a lot of 1:1 coaching time with the students, so they need to be pretty self-motivated.

My question is: How can I determine which candidates will be a good fit for this program?

We've experimented with students assessing themselves as part of the application (e.g. on a scale of 1-5, how familiar with OOP are you?), but IMVHO this ends up not being a good indicator of actual experience level. We've thought about sending out some sort of assignment that they submit as part of their application, but to really test for everything we want, the assignment would be just as complicated as the real codebase we give them. Plus, what we're really trying to test for is a willingness to ask questions, time management, and enthusiasm more than pure technical experience.

With all of that in mind, the whole point of the program is to welcome students into computer science and encourage them to pursue a software engineering career, so in a perfect world, the assessment would come across as friendly and not too intimidating.

Sorry, this ended up being longer than I intended. I know this is a very broad question, but I'm looking for a general framework for how to think through this. I'd also be curious to learn more about how other groups are handling this.

I appreciate any insights into how I should be thinking about this problem.

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

Pre-setup

To begin with, I'm going to presume that there is some form or pre-screening, and/or qualification process. I.e.: having taken such & such course(s), being actively enrolled in some, possibly specific, institution, passed through an interview, etc. The process below most likely would be quite unwieldy with a couple hundred applicants, but should be reasonable with a few dozen. Especially if administered in batches.

In addition, as the program involves working remotely, I would expect that there is some form of real-time communication channel that will be utilized in the day-to-day working setup. I do not mean the telephone either. I could be as simple as using some form of I/M (AOL, Yahoo!, Messenger, etc.) or it could be an in-house developed and employed enterprise solution. Issues and comments on GitHub are good, but not sufficient when dealing with a mentor-ship program. Ideally, the solution (using different tools if necessary) needs to include a "private" channel between the mentor and mentee, and a "team" channel. A third channel for all the mentors and mentees to network, outside of the project development would also be beneficial.

Old tools, which I would recommend migrating from if in use, are Skype and TeamSpeak, though either would be better than nothing (provided you want to pay for TeamSpeak anyway). Two current tools I would suggest investigating are Keybase and Discord. Both are available for install on Windows, macOS, Linux, iPhone, and Android, as well as being usable form within a web browser. Both are also free, though Discord does have enhanced content available for a membership fee. Discord has voice channel capabilities, while Keybase does not. Keybase offers end-to-end encryption and has the ability to share, under encryption, files as well as having the ability to integrate with git and create an encrypted repository outside of GitHub. As a user of both, Keybase would be my choice for a professional development environment.

Assessment setup

I would suggest having the assessment as a collection of small projects. Adapted to the project and environment they will be working on, of course. Each assessment can target one or two skills rather than having a full-scale project to assess everything at once.

Projects could include:

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

In some of the assessments you can intentionally include ambiguous information, incomplete data, or other conditions which can only be handled by asking you (hence the need for real-time communication). Provided you've made it clear that questions are not only allowed, but encouraged and expected, they should be able to contact you with the questions. This also allows for checking how they deal with time management, if at some point you are "unavailable" and they don't get an answer. Do they plow ahead, developing based on a guess? Do they stop, waiting for an answer? Or, do they "table" that problem and work on another one?

If the work environment will include TDD or Agile, then the assessment should have the elements of that in some of the problems. As the work involves working as part of a team of 3, it would also be ideal if you could have the first few assessments deal with their own work, then have an assessment, or more, where three of the candidates, who may not even know each other, work on one project together. You could also have two candidates, and the third is a "ringer" who already works for the company.

As remote workers you will have no control over what resources they employ, including looking up how to write Java on Google. My opinion is that knowing how to find the answer is more important than knowing the answer. With those two points in mind, you could explain that "Google is your friend" or include links to the resources, including style guides, which most closely match your current standards, and encourage them to use those links in developing the "answers" to their assignments. This allows you to include ever harder issues, or more advanced concepts, and not only assess their knowledge, but their ability to expand that knowledge.

GitHub

You can also incorporate git and GitHub into the assessments, as early as the first one if you wish, by having them create their own GitHub account, provide an archive of the starting code if needed, and have each assessment be its own repository in their account. You can then use the issues and comments there to give feedback, even forking their repository, creating a new branch and making a pull request in their repository. One thing I would suggest not doing on GitHub is having a repository, or collection of repositories, from which the assessments, and code, are distributed. You could create a collection of separate accounts for yourself which are used with exactly one candidate at a time, and "reset" between as needed. With one account and all the repositories used in it, all the candidates would be able to see all the assessments, including ones they have not been assigned yet, and all the work of other, or prior, candidates.


Teaching zip and range in Python 3 I do mathematical biology curriculum development and design and sometimes teach the associated computer labs. The students are very much beginners. Recently, I have had to start working with a Python 3-based system rather than a Python 2.7-based one. Some of the changes in Python 3 have made basic functions much more abstract. I can't have students just type in zip([1,2,3], [4,5,6]) to see what it does. (I had them do list(zip([1,2,3], [4,5,6])), but that's really changing the output of zip into something else.) And range no longer outputs a list -- instead, it outputs something that counts, but again, is quite abstract. How would you explain these things to total beginners?

I don't think the concepts behind generators, sequences and iterators are too difficult to grasp if you're clear on what exactly they are.

The 'old' range(n) function of Python 2 just produces a list of numbers:

[0, 1, 2, 3, ... , n - 1]

You ask it to give you a list of numbers from $0$ to $n - 1$, and it gives you a list.

The new range(n) doesn't do that. Instead, it makes an object that knows the start, end and step that you asked for... but it doesn't give you a list! This object will, however, give you the next element of the sequence if you ask for it.

Running list(range(n)) specifically asks for the list of all the integers, but in the vast majority of cases, you don't need the list, so there's no point making it and storing the whole thing in memory.

Imagine you wanted to print the numbers 1 to 1000. Python 2's range() would generate every number up front, before you can begin iterating. Clearly, this is very wasteful and pointless; it's much easier to work out each number at the end of the iteration, and doesn't require nearly as much memory.

However, I suppose that the merits of the feature aren't really relevant or important to absolute beginners; it's better that they gain some understanding of how to use the feature before understanding the merits behind it. Instead, consider explaining like this:

Iterables (such as range and zip) only do work when specifically asked (they're lazy — if your students have had any exposure to functional programming, that might be familiar)
Generally, being lazy makes things faster, because you don't do unnecessary work (e.g. in case you quit the loop early).
If you specifically need the whole list, you can ask for it with list(iterable) — but this is usually not as common as just iterating through with for.

If your students know Python 2's xrange, they'll find range simple to understand.


What is the best way to teach JavaScript functions to middle schoolers? I am teaching middle school kids (aged 11-13) some basic JavaScript and want to get some "professional" opinions.

I am introducing JavaScript with a simple function with a variable, a prompt, if/else, and a couple of alerts. This function (14 lines total) then repeats a series of times (say 10 times) changing the prompt and the conditional in the if/else for a total of say 140 lines. Otherwise the function remains the same. In the lesson, we will be using trinket.io to run the code in browser, and I am able to give them a partially complete piece of code to work from.

I know best programming is to not repeat when you can use additional variables and arguments passed through functions. I am doing that programming with a more advanced class.

My question is this: If just introducing JavaScript and wanting to teach syntax of these basic features, is it better to have students do the repeating (that works but is not programmatically the best way to program) or is it better to teach them the "correct" way where the program is simplified but includes more code understanding than we are ready to introduce?

Here is the code (I repeated it once to show the differences).

function askQuestion1()
{
  var answer = prompt ("What body system contains the heart, blood, arteries, and veins?") .toLowerCase();
   if (answer==="circulatory") {
    alert ("Correct!");
     score += 100;
     alert ("Your total score is now " +score);
  }
  else {
    alert ("Sorry, incorrect.");
     score -= 100;
     alert ("Your total score is now " +score);
  }
}
function askQuestion2()
{
  var answer = prompt ("What body system contains the brain, spinal cord, and nerves?") .toLowerCase();
 if (answer==="nervous") {
   alert ("Correct!");
    score += 200;
    alert ("Your total score is now " +score);
  }
  else {
    alert ("Sorry, incorrect.");
    score -= 200;
    alert ("Your total score is now " +score);
  }
}

I apologize in advance, but I'm going to be a bit hard on you.

First, your goal of keeping it simple is a good one that I applaud. You are right, IMO, not to bring in advanced features too early.

However, this is not the sort of code I would show to a beginner. Ever. It is the kind of code that, if submitted by an early teen would be fine, but not the sort of code that a teacher should show, lest it be emulated. If this were submitted by a college first year student, as part of some project, it would be severely downgraded.

I think students should only ever be shown code, from instructors, that they would be proud to emulate. But I think the lessons taught in this code need to be unlearned before the student can gain a proper understanding of how to program. I would use some completely different example, even if I was only interested in syntax, which I don't think you should be. You can also teach deeper lessons, just by example, by choosing what code you present to students.

Let me list a bunch of criticisms of the code, that are easily corrected, but using a different framework possibly.

First, the function names aren't descriptive in any way of what the function does. Also, they aren't functions in the classic sense since they return nothing, but that is just an issue with how javascript is built. They are procedures (actually commands since they don't have arguments either). But "intention revealing names" are a really good idea so everyone should use them, and novices should see them. So, askCirculatoryQuestion is preferable to askQuestion1.

Next, the formatting is a bit sloppy. A minor issue, but, if you are only a bit sloppy it won't be easy to teach them not to be.

Next, your var should probably be a const. There is no intention to change it. (Note: I'm not a javascript wizard, so I hope this is possible in this context.)

Next, you use an identity comparison, so, in the first function neither "the circulatory" nor "circulatory system" would be accepted. This is a human factors issue and may be the main objection to the example overall. An example without such an issue could probably be easily devised. But code that frustrates uses is not what you should show beginning students. But parsing user input is a genuinely difficult problem, of course.

Next, you make assignment here to a global variable, which is a tool that shouldn't be in the beginner's toolbox. It is an advanced incantation suitable only for trained wizards. Such practice makes larger programs much harder to understand and debug. Even wizards use this "spell" sparingly.

Finally, blasting alerts from a function is likely to mislead them when you try to teach real functions (that return values). Too many students have a very hard time with the notion of "return", and think that blasting out the answer is the correct way to write a function. You are laying a trap here that can cause issues later. (Confession: I once had that misconception. It made it difficult to understand program flow.)

Overall, my suggestion is to show students only the sort of code you'd like to see from them, not just now, but in the future. Yes, keep it simple and yes, keep it motivating, but make it poetry.

The code you will get from them is probably going to be worse than the code you give to them. So, always show them something they can emulate and that any teacher would be proud to see from a student. Make it easy for them to build good habits from the start.

But note that your concerns are not the same as mine. I agree that it is too early at the start to stress things like the "say it once" principle and such. And an exercise in which you have them write the analog of your second function after giving them the first wouldn't be a bad idea. It reinforces some skills, which is a good thing.

Again, sorry to be so hard on you.

But lest I be entirely negative, let me also give an idea for something similar that works on more levels than syntax. I'll stick with functions and if-else as the primary lesson.

Show the students a function maxOfTwo, that returns the maximum of two arguments. The function doesn't "alert" but, instead returns the value. Then write a driver to test it and have the students execute that a few times. Note that the function needs no local values.

After that, work out with the students a maxOfThree, that has three arguments. Do this one two ways. First with nested if statements and again by employing maxOfTwo instead. Don't give this as an assignment, but work out the logic with them and then write the (poetic) code. You may want to introduce a local value, so it is a bit more sophisticated on two levels (locals and nesting). But using maxOfTwo twice is a truly beautiful solution that shows the power of abstraction and reduces complexity.

Then, you can assign medianOfThree to them to work on. I suggest that it might be worthwhile to have them work out the logic of it in small groups and then come up with the code. They can either write out the code individually (probably a good thing) or in their group. Then critique the code as I have done here.

And don't lose track of the point that writing functions is more about abstraction than anything else. It makes programs easier to understand. The only code hidden by the maxOfTwo function is a single if-else statement. But calling the function (assuming it has a good name) makes the intent of the program immediately clear at that point, where the expanded if statement does not. This, I think, is much more important than the ability to call the function from more than one place and know that the effect is the same. Note that obfuscated code still runs correctly, but it is the understanding that separates the programmer from the machine. So, always use intention revealing names.


What are some good examples of using a stack data structure? I'm looking for examples to give my students when lecturing about stacks, for use-cases of the stack in programming and life.

So far I've been thinking of a pole of rings (when you can insert or remove rings from the top).

My students are high school students I'm teaching next year for their matriculation exam. They have only some basic knowledge in procedural programming and the tip of the iceberg in Object-Oriented stuff.

Any ideas for more analogies or examples?

I once had to implement a limited undo function (undo changes to the current field, or addition/deletion of records).

The lists of undo deltas (one for field changes and one for records) were stored as stacks.


Breaking down the operations when auto-casting gets complex So, take a Java statement like this one, given some int n:

if ((n+"").length() == (((n+1)+"").length())) {

Or perhaps this one, given some double, temperature, and some method that returns a boolean, unHatched():

while (temperature < 100 && unHatched())

In both of these cases, multiple auto-casts are made during the evaluation of the statement, and in both cases, the final determination is a boolean that is passed into some sort of control structure.

In my work with gifted students, the most that I have ever had to do to help someone understand statements like these is to do a simple trace.  We write the statement down, mark each item by its type, and then cross off areas of the statement (and write down the new types) as we walk through the evaluation.  This method has worked pretty consistently with my students at my day-job.

However, lately I have begun tutoring an adult student who is having a great deal of trouble, and I have been struggling to break apart statements like the above examples in ways that he can parse and keep straight.

He is at the right point, curricularly-speaking, to be examining them, but I am really struggling to help him trace and understand such statements.  (Ironically enough, because he can guess and modify a statement repeatedly, he can actually write statements like these with a fair amount of success, though when he is finished, he no longer fully understands them.)

For various reasons, learning a small concept usually takes him 3-5 weeks.  This timescale is fine, it is simply the speed at which he operates.  However, this adds a constraint for me: approaches that I take to the material must lend themselves to a fair amount of repetition with only very minor variations, or they won't be effective.

I am really having trouble finding a good approach here.  How can I give him the tools to break down statements with complex data type transformations?

I suspect that you handle such situations by informally building the parse tree of the expression in your mind. Maybe not all at once, but a bit at a time, perhaps. I'm not a cognition expert, of course, but it might help him if you teach him to do it explicitly on paper. He needs a table of operator precedence, of course and needs to be able to deal with parentheses, but otherwise it is just a mechanical process. Put the lowest precedence operator at the root of a tree and then work on the operands. The interior nodes are operators and the leaves are operands.

Can't promise it will work, but it would be my next step. With time, he may learn to rely less on the paper. Or, he might learn how to build a tool to do it automatically. That might be nice to have.


Is there any value in teaching pseudo code? Before becoming a teacher, I believed that pseudo code was a relic from the past (see also my question on goto and flowcharts):

When all you have is assembler language, Fortran, and Cobol, and no one has invented a compiler for a structured languages, then you need to write pseudo code. That is write in a high-level language, and compile it by hand. Now we can write it in a high-level language and get the machine to compile it, so is there a need for pseudo code?

Note I have now changed my view, somewhat, on pseudo code, but not on flowcharts and goto see my answer below. Please add your own answer, if you have I different perspective.

Yes, definitely. There is a need, while developing an algorithm, for a language (or diagramming technique) that is less precise and requires less detail than a formal programming language. This is to let the developer expand his/her thoughts from an overall view to one that is more and more refined. This is true even for high-level languages, though the language itself may be useful for that given a test-first design methodology and good tools.

A pseudo-code is also useful for presenting algorithms in a language neutral way so that implementers may build to suit a need in the language of their choice.

I note, especially, that The Science of Programming by David Gries uses such a pseudo code throughout. The code is defined in the book and fairly precise, though leaves out many details needed for implementation. It is the same language, in fact, that Edsger Dijkstra used in his papers. I used several variations on it as the basis of a compiler course for many years. The Gries book should be on the bookshelf (and in the mind) of every serious computer scientist, and most programmers.

Programming involves several tasks at different levels of abstraction. A good pseudocode lets a programmer focus first on the overall, high level, concepts, without having to change focus, or get distracted by, the lower level details needed for implementation. Even if you use "misspelled java" as your pseudocode you have gained this separation of concerns as long as your development environment doesn't complain too visibly or loudly as you go.

Teaching this separation of concerns to students, via some formal or informal pseudocode, is a way to get them to develop algorithms from the outside-in rather from the top-down (i.e. top of page to bottom of page). That is to say, from the general to the specific, rather from the first statement to the last. Some students seem to want to work in that way initially. The sooner they develop better habits, the sooner they can progress.


How should students be encouraged to reflect and improve after summative assessment? Computer Science lends itself to a variety of different assessment methods - from the more practical assignment based programming problems, to the more formal final exams that cover the theoretical content. More formative assessments give students and educators the ability to improve learning and teaching whilst it is ongoing, but there is usually some concept of a "high-stakes" summative exam in most courses. I'm sure we can all agree that portions of one module (e.g. on data structures) will be exceptionally useful in later modules, and so it makes sense to do as much as possible to help students master these concepts.

Often (from my own experience as a student), the "feedback" from the summative exam is a simple number or grade, which isn't broken down by assessment component. Further, there is usually no way to see the exam script or any form of mark scheme or question breakdown, which makes it difficult to improve in the general context of the university degree. The summative exam does nothing other than provide a coarse measure of the candidate's performance during the exam.

Is this sort of status quo widespread throughout undergraduate level CS, and what can be done to give students the opportunity to learn from and reflect on these sort of assessments? Should a more formative approach be taken for the majority of each module?

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

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

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

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

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

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


Learning about the Blockchain Since this is a very hot topic, I would love to offer an elective in Blockchain technology next year (and possibly in cryptocurrencies as well).  I know that my students are already very enthusiastic about the topic, so it would be a well-attended course.

However, I know basically nothing about this topic right now, and what I've found has been quite confusing.  It seems very hard to find an entry point, particularly since I ultimately want enough technical and mathematical background to create a meaningful course.

Can anyone recommend a way to approach this material?  Essentially, this would be a curriculum of self-learning.  What are the topics to tackle, and in what order can they be learned without having to do a straight "drop into the deep end"?

Additionally, recommendations for good resources that work through the topic in an organized are always appreciated, as they are very useful in the creation of an ultimate curriculum.  I prefer written (or audio) materials to videos, but I am open to anything that works through the material in a comprehensible way.

Try this as a trivialised example in order to help people get their head around some of the ideas. It's not strictly accurate, but I think it will help with understanding the concept.

Start with a short message (in text) and round up to a multiple of 16 bytes, padding with spaces.
Replace the final space with a non-space character
Take the m5sum of the result, and look only at the last digit. If this is '1', you're done and have finished the block.
If you're not done, go back to step 2, and modify your non-space trailing padding.
After finishing a block, you can append a new message, pad again, and repeat the process of modifying the whole message to achieve the target hash.

In practice, the hash function is expensive to calculate (and will have far fewer collisions meaning many iterations will be required to search for a suitable padding section).

Although a single block could be modified, once the modified block has been wrapped into a subsequent block, a couple of times, the compute cost of re-writing an older message grows significantly.

What this generates is a publicly readable message, which can't be re-written in the future (and everyone can verify the accuracy or an old message).