Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 27

Questions with this tag relate to planning lessons for a specific purpose, such as teaching some coding paradigm or skill. Planning lessons in Computer Science depends on the context and level of the students. If it is a lesson which introduces a new topic, the tag [introductory-lesson] may also be appropriate.

99 votes
Accepted

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

Buffy's lovely answer shows well how two variables can refer to the same thing, but since we are in early cognitive development and working with Scratch, in which you can't pass parameters, and can't …
Ben I.'s user avatar
  • 34.3k
67 votes
21 answers
19k views

What are good examples that actually motivate the study of recursion?

One of the traps of imperative-first is how difficult it becomes to help students make sense of recursion when they finally encounter it. And if those kids are fairly competent iterative programmers, …
Ben I.'s user avatar
  • 34.3k
49 votes

Real life examples of 0-indexing

You can get at this concept very intuitively in strings before you ever get to arrays. Take a string like "hello world" and ask them a subtle-sounding point: does the string begin here: "*hello world …
Ben I.'s user avatar
  • 34.3k
26 votes

What are good examples that actually motivate the study of recursion?

One good example is to make permutations of all of the letters in a word of arbitrary length. It's quite tricky to do iteratively, since you essentially have to recreate the program stack to get it d …
Ben I.'s user avatar
  • 34.3k
11 votes

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

I also have this problem frequently. I use the example of Microsoft Word, and I would say something like this: "Word allows you to give a document the appearance that you'd like. You can bold, you …
Ben I.'s user avatar
  • 34.3k
11 votes
Accepted

Good, Motivating Examples for Algorithmic Complexity

I attack this problem with three "visits" over the course of two years with my students At our first brush with Complexity, I don't spend a ton of time motivating the study of it. I introduce the n …
Ben I.'s user avatar
  • 34.3k
9 votes
7 answers
1k views

Teaching loop invariant choice

This is in line with a prior question I asked about teaching induction, but this is specific to the loop invariant step. I have not had great success helping my students see how to choose a loop inva …
Ben I.'s user avatar
  • 34.3k
8 votes
3 answers
405 views

Teaching Induction to Prove the Correctness of Algorithms

This is a subject that I have had a lot of trouble clarifying for students. I can explain the components well enough, but I have trouble getting kids to connect the big picture of the proof to the sm …
Ben I.'s user avatar
  • 34.3k
7 votes

Demonstrating the possible dangers of SQL injection

I would allow them to create initial websites without any mention of security at first. I would also have created your own web site (using exactly the same techniques and technologies) in advance. (D …
Ben I.'s user avatar
  • 34.3k
7 votes
8 answers
2k views

Active learning for boolean algebra

I've been thinking about active learning, and I am inspired by Heather's answer to my earlier boolean algebra curriculum review. This may also be a good question for math teachers who have experience …
Ben I.'s user avatar
  • 34.3k
6 votes

Is stressing too much on formalism acceptable?

Moving from formal to informal is almost always a mistake. Let me see if I can show you why. When you consider how you think about sets within your own mind, I am reasonably certain that you rarely …
Ben I.'s user avatar
  • 34.3k
6 votes

Simple Pointer Examples in C

What you have there is an excellent start, and is completely appropriate. I would go next into a puzzle to try to get them hooked. I would type the following code in front of them on your projector, …
Ben I.'s user avatar
  • 34.3k
6 votes
1 answer
199 views

Lab ideas for information theory

This question is somewhat related to a prior question that I asked about an Information Theory lab. I received a lot of great feedback there, but I have not gotten past the idea yet that the lab that …
Ben I.'s user avatar
  • 34.3k
5 votes
2 answers
266 views

Introducing A* Search Algorithm

I created a group lab where one student makes a random maze generator, one student makes a corresponding maze solver, and the last student calls the methods created by both students and creates an ani …
Ben I.'s user avatar
  • 34.3k
5 votes

How to stress the importance of testing code?

The first problem my students always have with this is that they don't even understand how to test their code. They've run the program, and it works. So... it must work. I have two approaches to thi …
Ben I.'s user avatar
  • 34.3k

15 30 50 per page