The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [lesson-ideas]

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.

Filter by
Sorted by
Tagged with
4
votes
3answers
115 views

Lesson ideas for introducing macros in C

Thanks to working with Racket recently, I've been spending a lot of time learning about and implementing non-trivial macros. In the process, I have been thinking about ways to apply this skill to my ...
7
votes
3answers
181 views

Evaluating resources for teaching myself reinforcement learning

While trying to teach myself the topic of reinforcement learning, I find many sites, books, people and other resources with information about that subject. (I am trying to learn the subject from those ...
10
votes
4answers
657 views

What would be reasonable to include in an Introduction to AI class for a 7th-8th grade after school program?

The class meets just 8 times for 2.5 hours weekly, aimed at 7-8th graders with very basic programming skills. Possibilities off the top of my head: computer learning (neural nets and/or genetic ...
6
votes
5answers
366 views

Explaining how the Internet and the World Wide Web work

I have been having trouble finding a good resource (ideally a video) or analogy that helps me to explain how the Internet and the World Wide Web work. It does not need to be too in-depth. Only enough ...
14
votes
10answers
3k views

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

I'm currently teaching Python, to three 12-year-olds. They have no experience at all, and my task is to introduce them to programming concepts, and to Python. I'm fairly experienced in programming, ...
16
votes
8answers
4k views

Demonstrating the possible dangers of SQL injection

Students building websites in a high-school computer science major (using HTML, javascript, ...
4
votes
2answers
245 views

Curriculum Design for a Unit on Alan Turing and His Impact on CS

At the end of the year, there is a gap between the AP Exam for AP Computer Science A and the last class meeting. Since students don't have to take a final after the AP Exam, there's not a lot of ...
5
votes
2answers
103 views

Priority Queue practice vs examples

After teaching Priority Queues, I want to give the students some notion of what it looks like when they are used in code. I have two approaches and I am unsure about which would serve my goal better: ...
3
votes
4answers
258 views

Transition from Java to Python

I am preparing to teach students python, in addition to java. Usually, I test a proof of concept (POC) of my teaching with a handful of students, so as to know if my lesson plans are good (I teach ...
8
votes
11answers
2k views

How to stress the importance of testing code?

I've run into the issue in the past that students don't test their code, and get into a huge mess when they can't find out what's not working. How can I prove to them (before something like this ...
39
votes
20answers
9k views

How to teach the value of the command line in high school?

Part of what I love about the particular adaptation I use for AP CS Principles — CS50 AP — is that my curriculum teaches students basic Linux shell commands in the Cloud9 IDE. Students learn things ...
4
votes
1answer
289 views

Interview lesson on “Computational Thinking”

I have been asked to teach a single half hour lesson at a new school for an interview. The topic I was given was "something on computational thinking." The students are 13 years old. For the first ...
5
votes
2answers
260 views

Introducing the MVC pattern along with JavaFX

This year I am planning to shift from teaching Swing for graphics, to teaching JavaFX. As JavaFX ideally uses the MVC design pattern, I thought it would help students understand how to use JavaFX if ...
4
votes
2answers
276 views

Motivating examples for switch/case in Java

Students first see switch/case as a second syntax for if/...
9
votes
10answers
1k views

What is a good analogy for pass by value vs by reference?

In general, there are two ways arguments can be passed to a function. Functions can either be passed a reference to an object, or the value of that object. This is something that my students often ...
3
votes
2answers
177 views

Teaching with just a single Makey Makey and Sphero

Last summer I was excited to get my hands on a Makey Makey. I played around with it for a couple days, but it ended up just gathering dust for most of the year. The same goes for a Sphero SPRK. They ...
6
votes
4answers
650 views

How to teach which loop should be used

In most languages, there are many different types of loops. The most common ones seem to be for loop, while loops, and do while loops. What is the best way to illustrate the differences between the ...
26
votes
13answers
3k views

How to respond when students ask “is recursion good practice”?

Context: CS1-style, intro programming class, using an interpreted language (Python). I will get a hand raised asking "Why are we learning recursion? Is it good programming practice?" My response is ...
7
votes
5answers
172 views

Instructional Methods for In-class Code Demos

When demoing code in class, I have tried at least three different methods of instruction: Write code live and have students type along Write code live and have students follow my logic while only I ...
9
votes
7answers
733 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 ...
14
votes
11answers
609 views

How can I show the value of best practices?

As someone who likes to advocate for best practices like correct use of VCS, indentation, sufficient commenting, and testing, I try and integrate them when I teach. But for all of these things, my ...
4
votes
4answers
2k views

Basic OOP practice exercises for inheritance and polymorphism

After teaching inheritance and implementation (implements vs extends in Java) and overriding methods and basic OOP (classes and ...
5
votes
1answer
132 views

Significant algorithm from CS for DrRacket that emphasize cons, car, and cdr

When my students move up to junior year, they make a series of transitions: from programming to theoretical computer science, and from imperative to functional programming. We use DrRacket, and one ...
5
votes
3answers
247 views

Excel macro recorder exercises

On advanced Excel courses I teach attendees how to use the macro recorder. I also start VBA beginner trainings with the recorder and analysing the recorded code. I find the macro recorder a good entry ...
15
votes
9answers
848 views

Computers are down; what's in your bag of tricks for teaching CS when they can't get on a computer?

I'm guessing everyone here, high school teachers at least, have spent at least one period in the past year working with a class when you either don't have working computers or a working internet ...
10
votes
5answers
1k views

Effectiveness of Parsons Problems

I first heard of Parsons Problems thanks to CS Teaching Tips. They define these problems as follows: "Parsons problems are problems where students build programs from ordering small chunks of ...
8
votes
5answers
710 views

Simple Pointer Examples in C

Thanks to feedback in this thread, I'm beginning to plan how to integrate a basic introduction to pointers into my unit on arrays. Here's a sample program I just wrote up: ...
4
votes
1answer
136 views

Are userscripts a good teaching tool?

What is a User Script? Useful tasks like improving layout, fixing bugs, automating common tasks and adding new functions can all be done by userscripts. More complicated userscripts can create ...
5
votes
2answers
227 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 ...
10
votes
6answers
327 views

Encourage students to be independent

As is often the case, there is usually more than one way to approach a problem or task. Currently, my students use what they were taught in the lessons (which is expected). When they stumble upon a ...
33
votes
13answers
3k views

Real life examples of 0-indexing

It can be perplexing for students to begin counting at 0 when they enter a CS class. I made it a point over and over to talk about "Day 0" and "Week 0" in the opening days and weeks just to build ...
10
votes
5answers
469 views

Lesson Idea: Arrays, Pointers, and Syntactic Sugar

One of the most challenging concepts to instill in new CS students is 0-indexing (indeed, the pedagogy of this fact probably merits its own discussion). Another difficult topic -- although a slightly ...
4
votes
2answers
58 views

Presenting Mapping Reducibility (for P vs NP)

So, I am preparing to teach about P and NP for the first time. I know that I need to teach about Mapping Reducibility (aka One-to-One Reducibility). Can anyone recommend a set of algorithms that are ...
11
votes
8answers
429 views

Explaining basic html structure

I am trying to think of a lesson plan about html, and I am looking for a good way to explain the concept of the structure of an html file. I was wondering whether ...
15
votes
3answers
517 views

What are effective approaches for teaching dynamic programming?

Dynamic programming is a subject that's notoriously difficult to learn and to teach. It's one thing to educate oneself, say by reading the appropriate chapters in Kleinberg & Tardos or CLRS, and ...
15
votes
8answers
593 views

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

When I try and teach web development to absolute beginners, I seem to always get a question about the roles of HTML/CSS/JS and about how the browser renders the HTML. It seems to me that the confusion ...
8
votes
3answers
285 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 ...