In the 1940s, the French writer Raymond Queneau wrote a jewel of a book called Exercises in Style, featuring 99 renditions of the exact same story, each written in a different style. The story being fairly trivial and always the same, the book highlights form, rather than content; it illustrates how the decisions we make in telling a story affect the perception of that story. Inspired by Queneau, I decided to embark on the project of writing the exact same computational task in as many styles as I have come across over the years.
Exercises in Programming Style (#EPSBook) features 33 renditions of a simple computational task -- counting the frequency of words in a given file. All renditions are written in Python. This book is a companion text for code that is publicly available in Github.
Software developers with many years of experience may enjoy revisiting familiar programming styles in the broad context of this book and learning about styles that may not be part of their normal repertoire. This book can be used as a textbook for advanced programming courses in Computer Science and Software Engineering programs. Additional teaching materials, such as lecture slides and implementations of each style in other languages, are also available.