Programming exercises for learning a language

Programming exercises for learning a new language

To-do list

Features:

  • Add, edit, delete notes
  • List notes

Learn:

  • File I/O or database (sqlite) bindings
  • Input
  • Menu system/UI (if provided by language/UI toolkit)
  • Data output

Tetris clone

Features:

  • Usual tetris rules

  • Random number generation

  • Non-blocking input
  • Delay loops
  • Graphics (even Curses can do it)

DND/Pathfinder/WFRP combat simulator

Features:

Two characters with profiles fight. Roll initiative to see who attacks first. Roll below weapon skill to hit, damage is weapon damage (D6/D8) + strength - toughness. First character to 0 wounds is dead.

Can additionally use skills like dodge/parry.

Learn:

  • Random numbers
  • Flow control
  • Data structures/pointers

Simple webserver

Features:

  • Support for HTTP get from the filesystem

Learn:

  • basic TCP networking