We describe an approach to teaching algorithmic thinking and programming and the first experiences that we made with it in practice. The idea is to present computational problems as a certain kind of game that the learner can play in order for them to develop a concrete idea of what constitutes an algorithm. The purpose of this is to emphasize that one can think of algorithms independently of a particular programming language. For the programming part a mini language called machine programs and a method to construct such programs from traces is described.