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
10
votes
5answers
475 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 ...
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
6answers
426 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 ...
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 ...
14
votes
11answers
611 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 ...
8
votes
5answers
719 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: ...
5
votes
2answers
270 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 ...
51
votes
13answers
8k 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 ...
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 ...
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, ...
15
votes
9answers
858 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
2answers
138 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 ...
7
votes
8answers
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 ...
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, ...
10
votes
4answers
658 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 ...
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 ...
6
votes
4answers
677 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 ...
3
votes
4answers
263 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 ...
9
votes
7answers
746 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 ...
8
votes
3answers
286 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 ...
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 ...
6
votes
4answers
408 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 ...
5
votes
2answers
231 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 ...
4
votes
1answer
235 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 ...
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 ...
3
votes
3answers
172 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 ...
2
votes
3answers
168 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 ...