Название: Programming for the Puzzled: Learn to Program While Solving Puzzles
Автор: Srini Devadas
Издательство: The MIT Press
Год: 2017
Страниц: 272
Формат: EPUB
Размер: 18 Mb
Язык: English
Learning programming with one of "the coolest applications around": algorithmic puzzles ranging from scheduling selfie time to verifying the six degrees of separation hypothesis.
This book builds a bridge between the recreational world of algorithmic puzzles (puzzles that can be solved by algorithms) and the pragmatic world of computer programming, teaching readers to program while solving puzzles. Few introductory students want to program for programming's sake. Puzzles are real-world applications that are attention grabbing, intriguing, and easy to describe.
Each lesson starts with the description of a puzzle. After a failed attempt or two at solving the puzzle, the reader arrives at an Aha! moment -- a search strategy, data structure, or mathematical fact -- and the solution presents itself. The solution to the puzzle becomes the specification of the code to be written. Readers will thus know what the code is supposed to do before seeing the code itself. This represents a pedagogical philosophy that decouples understanding the functionality of the code from understanding programming language syntax and semantics. Python syntax and semantics required to understand the code are explained as needed for each puzzle.