ZZT was really fun when I was a budding programmer. It allowed me to understand simple concepts like spatial awareness of entities in arbitrary spaces, more complicated enemy AI (for my low standards at the time) and states in a more practical way.

Megazeux was the advanced, deluxe cousin of ZZT, worth checking out if you like the idea but want something with a bit more flair.