What Makes a Good Programming Assignment?
Published:
A programming assignment can look simple on paper. Write a program that does something. Test it. Submit it.
But a good assignment needs more thought than that.
For me, the first question is always the learning goal. What should the student understand after finishing the task? If the goal is loops, the problem should naturally need loops. If the goal is recursion, recursion should not feel like something added only because the teacher asked for it.
Sometimes assignments become too large. They include file handling, menus, user interfaces, databases, and many other details. Students spend most of their time fighting things that are not related to the main topic.
More work does not always mean more learning.
I also like problems with a small story. A queue is easier to enter when we imagine people waiting at a service desk. A stack becomes more natural when we connect it with undo operations or browser history. The story does not need to be long. It only needs to give the problem a shape.
The first few minutes matter too. A confusing assignment can create fear before the coding begins. A clear example helps. Show the input. Show the output. Explain the main rule. Then let the student move.
At the same time, the assignment should not explain every step. There must be room for thinking. Which data structure should be used? Which function should be separate? What happens with an empty input? These decisions are where the student begins to own the solution.
AI changes this area as well. Standard coding tasks can now be solved very quickly with a prompt. I do not think the answer is to pretend AI does not exist. Instead, assignments can ask for explanations, comparisons, debugging, changes, or reasons behind decisions.
One of my favorite moments is when a student adds something that was not required. A better menu. An extra feature. A strange test case.
For a short time, the assignment stops being homework and becomes their project.
That is difficult to force, but it is always nice when it happens.