BACKGROUND: I am a CS lecturer (teaching C++) and I keep thinking how to incorporate coding challenges in teaching.
Many questions in this site are great; I have just used Do you want to code a snowman? as a warm-up homework assignment. The challenge of writing short programs fits my goal of encouraging my students to write short and succinct code. The problem is, when the code is made too short (e.g. by putting everything in a single line without spaces), it is not readable - which goes against another educational goal.
QUESTION: is there a way to design a challenge of the form "solve problem X using the shortest code possible, but the code must still be readable"?
I am not sure how to define "readable" in a consistent way; maybe "the code should pass a linter check"?