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
3
votes
4answers
120 views

Physical analogy to introduce a Delegate in .Net programming

Delegates are strange beasts (think Pointers with aspirations) and I was planning to introduce them using a physical metaphor: a power strip. The power strip connects to an 'event' (wall socket) and ...
15
votes
3answers
530 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 ...
7
votes
1answer
223 views

Mini-Projects that can be covered in an 1 hour Haskell tutorial

I am supposed to be holding a tutorial session in an Undergraduate Haskell Course, which is also supposed to be a first course in programming for a few of the students. Ideally, the tutorial should be ...
32
votes
7answers
3k views

How to teach Stack Overflow more efficiently?

As evidenced by the numerous poorly asked questions by students on Stack Overflow, it is clear that many students have difficulty understanding how to ask questions there. Even as teachers, we often ...
6
votes
2answers
269 views

Good, Motivating Examples for Algorithmic Complexity

I was recently reading a really good article on this topic, and I realize that it could be a very good added value for students to understand better and appreciate (and eventually put in practice) all ...
4
votes
2answers
763 views

LINQ to SQL alternative C# Visual Studio 2017 MVC

I'm working as a teacher with college students, learning ASP.NET MVC with C#. One pedagogical problem I have in this environment is how to do CRUD (create, delete, update, select and inner join etc) ...
9
votes
5answers
821 views

How can I make database normalization more clear?

Database normalization is needlessly clouded by over-explanation. I reviewed a wide array of web articles and several textbooks before starting to teach it. After I became thoroughly familiar with the ...
6
votes
4answers
405 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 ...
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 ...
8
votes
5answers
717 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
3answers
251 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 ...
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 ...
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 ...
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 ...
6
votes
5answers
376 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 ...
4
votes
3answers
116 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 ...
10
votes
6answers
328 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 ...
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 ...
14
votes
11answers
610 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
2answers
283 views

Motivating examples for switch/case in Java

Students first see switch/case as a second syntax for if/...
9
votes
7answers
742 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
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 ...
5
votes
2answers
228 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
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
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 ...
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, ...
5
votes
2answers
265 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 ...
3
votes
4answers
260 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 ...
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: ...
15
votes
8answers
594 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 ...
6
votes
4answers
666 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 ...
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
2answers
180 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 ...
15
votes
9answers
852 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 ...
4
votes
1answer
298 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 ...
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 ...
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 ...
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 ...
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 ...