Questions tagged [exercises]

Questions related to programming exercises that are meant to increase students' skills. Use this tag to ask questions about exercises related to a specific skill or skill-set.

Filter by
Sorted by
Tagged with
1 vote
0 answers
29 views

Coding exercises that test memory safety

I am looking for a coding exercise that could be assigned to students and will give them practice with writing memory-safe code. In particular, I am looking for some exercise that students would have ...
D.W.'s user avatar
  • 1,905
2 votes
0 answers
34 views

Good example for a live optimisation exercise

I'm trying to teach the basics of benchmarking and optimising .NET code. This is to other established engineers, not university students. I want to start off with a badly optimised algorithm and then ...
ScottishTapWater's user avatar
1 vote
3 answers
278 views

What computer scientists have advocated for freely publicizing detailed solutions, to every exercise?

Besides the 2 mathematicians quoted below and me, who else has touted free dissemination to students of detailed solutions, to EVERY exercise and problem (like in textbooks)? I uphold this ...
user131533's user avatar
2 votes
0 answers
59 views

What are some resources to practice javascript while learning it?

I’m looking for solved and unsolved assignments of JavaScript to practice. My goals are both, practice javascript to learn to program as well as practice javascript to be able to design MERN ...
zeeshanseikh's user avatar
10 votes
8 answers
6k views

Why do we practice printing patterns while coding?

Why do we practice printing patterns while coding? Patterns like: 1 1 2 1 2 3 1 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15, etc. Are these kinds of pattern questions ...
Schefflera Arboricola's user avatar
4 votes
3 answers
412 views

What sort of programming assignments do you give in an FP course?

I teach programming to a science/engineering students. Here is a typical sequence of assignments for a beginning programming class: Arithmetic and conditionals: does ...
Victor Eijkhout's user avatar
2 votes
1 answer
103 views

What are some good conditional branching excercise scenarios?

I want to get my students to exercise the conditional-branching mind-muscle. [edit: and I need it to be fun/playful] I will ask them to read pseudo-code, then represent as a branching sketch[^1]. And ...
Vladimir's user avatar
  • 123
4 votes
6 answers
395 views

Reference request for resource with difficult programming exercises

I am asking this question on behalf of my brother. He is taking his first programming class. So far he has just learned the basics (if-then statements, for loops, while loops, etc.) The class is using ...
Helix's user avatar
  • 143
3 votes
1 answer
106 views

How to use CSS diner to teach beginners in CSS

CSS diner is a game for learning CSS selectors. But it goes "into the woods" relatively quickly, focusing more on breath of selectors than on mastery of fundamentals Can it be productively ...
josinalvo's user avatar
  • 331
5 votes
1 answer
196 views

games for teaching html

I have had good results, and happy students, using CSS diner to teach CSS selectors (I will share more in another question). And one of my students asked me if there is a similar game for html. Is ...
josinalvo's user avatar
  • 331
5 votes
1 answer
160 views

Looking for good Master Theorem examples

I'm teaching an Algorithms class (junior/senior level), and we've just proved the validity of the Master Theorem. I'd like some good questions on it, both for homeworks and for exam questions. Problem ...
Adam Smith's user avatar
1 vote
1 answer
132 views

Which are common misconceptions about code execution? How to efficiently debug my student?

I may tutor a student who just started learning "school C", by which I mean that strange kind of C seen only on school books (and that in my opinion "cripples the mind", so to say, but I digress). I ...
user9137's user avatar
  • 424
1 vote
1 answer
51 views

How can I teach the students a package/module in a computer lab?

I will be teaching a course to college students in their 3rd year in college study. So far, they have taken only one programming course in MATLAB. We have a package, i.e., is a set of functions, ...
Mahshrp's user avatar
  • 11
3 votes
1 answer
167 views

Is it worth to learn to make a MD5-hash cracker?

I found a puzzling site where one puzzle was to find a string whose MD5-hash is given. Is such a puzzles good for learning? I mean, I believe that hash might be cracked by using enough computing ...
guest's user avatar
  • 33
0 votes
0 answers
55 views

Spring core exercices

I'm actually studying (free studying using online books) to pass the Pivotal Spring core certification and i need some exercices (online or pdf) to practice in order to master the framework as well, ...
Mssm's user avatar
  • 111
0 votes
1 answer
71 views

What makes a good explanation? [closed]

I'm thinking of studying, "What makes a good explanation?" in the context of introductory computer science problems. I'm wondering if there's any pre-existing dataset containing introductory ...
wwl's user avatar
  • 101
9 votes
8 answers
399 views

Exercise or example to reinforce idea of functions?

I have a group of students with a very shaky understanding of functions and their purpose (encapsulation, reuse, modularization). The assignments I give them require them to write simple functions ...
Louis B.'s user avatar
  • 296
5 votes
0 answers
150 views

Small to medium scale exercises about Haskell's higher abstractions

Short version: Where can I find highly varying, small or medium-sized exercises and examples on the use, identification and instance declaration of Haskell's abstractions such as applicatives, monads, ...
jhu's user avatar
  • 171
6 votes
6 answers
293 views

Should I Provide Answers To Exercises?

I'm preparing some exercises to introduce software developers who have no experience with Scheme to the language. Part of the exercises are simple things like: ...
Onorio Catenacci's user avatar
5 votes
5 answers
281 views

A meaningful exercise that requires using a destructor

I am teaching destructors in C++ and would like to give the students an interesting homework exercise that requires them to build a class with destructor. In previous years, the homework were ...
Erel Segal-Halevi's user avatar
6 votes
3 answers
173 views

Using questions from a code-competition website in homework and exams

There are various websites like codewars that present programming challenges in various languages and difficulty levels. I looked at some of their challenges and they seem to be more creative than me ...
Erel Segal-Halevi's user avatar
6 votes
1 answer
387 views

What are good class exercises on design patterns?

When I teach a programming course, I like to spend 10-20 minutes in each lesson on some programming exercises that the students do in class. This lets me see whether the students understand the ...
Erel Segal-Halevi's user avatar
4 votes
2 answers
209 views

Best Practices for introductory teaching

Literature states that there are particularly difficult issues with introducing programming, and that many of the issues are still not well understood. But some results indicate that these are some ...
user avatar
4 votes
4 answers
2k views

Lambda expressions exercises and practice

While lambda expressions in java 8 are really cool in action, the school curriculum offers no exercises in this. So essentially, students never actually learn how to use lambda expressions and the ...
ItamarG3's user avatar
  • 6,287
3 votes
2 answers
150 views

Genetic Algorithm enrichment lesson

As a special lesson, I would like to show students the very basic idea of genetic\evolutionary algorithms. I let them play a bit in a genetic algorithm online game, to get the idea. Then I teach them ...
ItamarG3's user avatar
  • 6,287
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,287
5 votes
2 answers
568 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 ...
vacip's user avatar
  • 1,398