A game that lets players play with software development is an excellent method of teaching programming concepts and concepts in coding, such as loops and conditional statement. Games that allow this include Zachtronics Shenzhen I/O which puts players in the shoes of disaffected engineers working for a drab chip company and must design computer chips by hand. They are given increasingly complex circuits to design, beginning with the making lights flash according to a certain pattern.
The interface in the game is very similar to tools for developers found in browsers and also teaches scripting. Another great example is Screeps which combines JavaScript coding with massively multiplayer online games to build self-sustaining colonies. Both games are excellent in teaching fundamental concepts and slowly introducing new players.