I have been using freeCodeCamp to learn web development and I think adding a study streak feature similar to Duolingo would greatly motivate learners to code every day.
My suggestion:
Show a streak counter on the user profile
Send a daily reminder notification to maintain the streak
Award badges for milestone streaks (7 days, 30 days, 100 days)
This would encourage consistency which is the most important factor in learning to code.
I dunno, that feature is for getting addicted mainly and you are right, consistency is important, but learners have to learn to have pauses too, even a few weeks when needed to prevent burnout and such streak feature punishes the user for missing even a whole day and also rushes the user to fast-solve complex tasks, like doing an exam in one hour, just because needed for the streak and/or doesn´t have much more time for that day to code; ending up doing a messy job or just let some kind of AI handle it.
I want to mention I really miss the starter “tips” chapter from the curriculum, where Quincy shared a lot of learning tips and methods to be a good learner.
I can´t even find the video he made for some reason, but as a theory I think it should exist in the very beginning where it was in the first beta versions of the curriculum.
Overall: I think if somebody really want to learn something, they have to put the work in it mainly and changing their lifestyle to adapt to it and programs should remain just tools on the way. Streak feature does the job for creating will to learn, while it should be generated automatically from the inside.
Forcing the self to do something every day they doesn´t really want is very unhealthy for the psyche.