I think it's nowhere near as simple or binary as that... there's a whole individual(/group) psychology of useful gamification, it's not all dark patterns. I found this out before and during Covid when me and five people I know were trying to gamify our motivation for exercise/weight loss/daily steps/cardio/toning; then 2020 and Covid set fire to the entire field. Exercise/weight loss are obviously different to learning CS, but here's what I learned:
- some people like to set a private individual goal and measure their individual progess towards it, even(/especially) if outsiders can't see what it is ("X has 45% progress toward their weight-loss goal and 56% toward their cardio goal.")
- ...or just directly quote times for e.g. 1 mile run, 4 mile walk etc.
- some people love the social-media/blogging aspect of sharing within a defined group photos or daily diary of their activity. MyFitnessPal's social features
- some people like taking the drudgery or loneliness out of solo exercise, such as listening to audiobooks/podcasts, or apps like 'Zombies, Run!' or 'The Outbreak' which turn your walks into a survival adventure.
- some people like the leaderboard or group dynamic of smack-talk or one-upping their friends (e.g. Stridekick app, but it's $ beyond the free intro period, and it has terrible power consumption)
- some people like setting food/drink reward goals: walk/run/row/ski X miles to earn a beer/burger/donut/etc.
- apps like Strava are for hardcore athletes in a single sport, not suited to the general public, you can't say "This week I want to burn Y,000 calories" then achieve that that multimodally across walking, workout, fitness class, dance, running/cycling, swimming, carrying shopping home etc.
- some people really like a shared goal e.g. "this week our group will walk 25,000 steps"
- some people like the daily nag/reminder/motivator to (configurable) do their walk after lunch, evening workout etc. (smartphone/bracelet/watch knows when you've done them), or not break a streak
- some people like to motivate by donating (or wagering) for a good cause if they do/don't meet your goals/beat their partner
- I forget the name of the app that each week partnered you up with a different stranger and you had to try to beat them (Challenges/Strive/?)
- Fooducate is good for gaming nutrition and shopping, and has freemium add-ons for specific diet/exercise plans
- some people (esp. the smartwatch brigade) like measuring how exercise and diet affect/improve sleep quality
- and so on.