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
4 answers
823 views

Some real practical example to teach object-oriented concepts and programming (in python)

I have taught my high school students to write some simple python scripts, taking some ideas from "Automate the Boring Stuff with Python", e.g. changing file names in a folder to a specific ...
Qiulang 邱朗's user avatar
7 votes
6 answers
679 views

What are good, practical labs and activities for loops?

I am teaching some high school students, also the first time programmers, some basic programming concepts and applications. When introducing loop I find that using it to check prime number (and find ...
Qiulang 邱朗's user avatar
12 votes
7 answers
751 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 ...
Peter's user avatar
  • 9,102
45 votes
21 answers
5k 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 ...
Peter's user avatar
  • 9,102
44 votes
22 answers
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 ...
Peter's user avatar
  • 9,102
14 votes
5 answers
2k 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 ...
Peter's user avatar
  • 9,102
14 votes
11 answers
676 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 ...
thesecretmaster's user avatar
  • 4,795
9 votes
6 answers
954 views

Helping students adjust to using industrial-strength IDEs

Something I've often observed is that many students find it challenging to figure out how to use full-fledged IDEs such as Eclipse, Netbeans, Visual Studios, IntelliJ, and PyCharm. From what I can ...
Michael0x2a's user avatar
  • 4,005
8 votes
5 answers
955 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: ...
Peter's user avatar
  • 9,102
8 votes
11 answers
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 ...
jacksonwelsh's user avatar
5 votes
2 answers
474 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 ...
ItamarG3's user avatar
  • 6,297
1 vote
3 answers
173 views

Make it easier, and quicker to get to the start

When teaching I often have pupils struggle in the first few minutes. When they are setting the computer up, ready to start work. They often have to follow lengthy instructions, that I print on paper, ...
ctrl-alt-delor's user avatar
68 votes
21 answers
18k 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
  • 33.1k
52 votes
14 answers
10k views

Interesting Programming Exercises to Teach Inheritance?

I originally asked this over on Stack Overflow, but they suggested I look here instead: I'm currently teaching my students about the concept of inheritance (we're using Python 3) but am unable to ...
Patch's user avatar
  • 631
25 votes
10 answers
7k views

Non-native English speakers struggle to come up with decent variable names and function names

The students I teach at a middle school in Beijing normally have a limited vocabulary. They struggle to come up with decent variable names and function names. Most of the time they just name variables ...
Qiulang 邱朗's user avatar
17 votes
10 answers
7k 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, ...
kosciCZ's user avatar
  • 173
17 votes
8 answers
5k views

Demonstrating the possible dangers of SQL injection

Students building websites in a high-school computer science major (using HTML, javascript, ...
ItamarG3's user avatar
  • 6,297
15 votes
9 answers
1k 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 ...
Ryan Nutt's user avatar
  • 3,029
10 votes
4 answers
692 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 ...
Dave I's user avatar
  • 181
10 votes
2 answers
172 views

Teaching students how to construct regular expressions (and other "translation" style problems)

I'm currently helping teach a unit about languages as a part of a discrete math course -- we're currently focusing on regular expressions, NFAs, DFAs, CFGs, grammars, and the like. One of the skills ...
Michael0x2a's user avatar
  • 4,005
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 ...
Ben I.'s user avatar
  • 33.1k
8 votes
3 answers
400 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 ...
Ben I.'s user avatar
  • 33.1k
7 votes
5 answers
198 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 ...
Peter's user avatar
  • 9,102
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
  • 33.1k
6 votes
4 answers
567 views

Effective ways of teaching regex to students who know Java

My students are knowledgeable about Java but need to know something about Regular Expressions. Many students find them difficult and intimidating. The students don't need to know every detail, but do ...
ItamarG3's user avatar
  • 6,297
6 votes
4 answers
954 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 ...
i--'s user avatar
  • 831
5 votes
2 answers
264 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 ...
Ben I.'s user avatar
  • 33.1k
4 votes
1 answer
280 views

Enjoyable and\or fun way to explain cmake

As a pilot project (which was delayed by an incredible amount, seeing as it's starting 8 weeks after it was meant to), my school grouped together a few kids (high school, they know basic OOP and work ...
ItamarG3's user avatar
  • 6,297
4 votes
4 answers
3k 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 ...
ItamarG3's user avatar
  • 6,297
3 votes
4 answers
374 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 ...
ItamarG3's user avatar
  • 6,297
3 votes
3 answers
187 views

How to keep students heads from exploding from complex, interconnected topics

My students will soon be learning ADO.Net in C#, adding on to the Windows programming skills that they recently gained. Just a few pages from one chapter in the textbook introduce the set of layers ...
user3292's user avatar
2 votes
3 answers
172 views

Theory of Computing project topics

I am looking for project ideas in theory of computing that I can assign to my students in lieu of a final exam.
JKJ's user avatar
  • 121
2 votes
4 answers
181 views

Turtle examples for loops and variables, or even something else

I'm going to teach using the well known drawing turtle, with one developed by me to fit my students, so in case it can also be modified. It features drawing movement, non-drawing movement and pen ...
user9137's user avatar
  • 478
2 votes
4 answers
162 views

Teaching ideas for string algorithm?

When teaching algorithm (high school) I always go with some sorting & searching algorithms and believe that should be enough, or at least lay a good foundation for them. But I have come to realize ...
Qiulang 邱朗's user avatar
2 votes
3 answers
211 views

Boolean Logic: How to Explain + as OR?

In a previous question, I asked about the appropriate notation when teaching Boolean logic to students ages about 11–14. I selected the notation of engineering and computer science in part because I ...
Bob Brown's user avatar
  • 409