“Exercises in Programming Style” shows different programming styles by solving the same problem in 33 different ways. The example problem used in all the examples is that of counting word occurrences in a text (term frequencies). The program reads all the words, normalizes them, removes short words (like the, a, in) and then prints out the 25 most common words in order. All the programs are written in Python, but each program is written in a different style. Examples of styles are: only passing arguments via the stack, stringing function calls together, object oriented, actors, aspects, using an SQL database, and Map Reduce. Each example is one or two pages of code, and is followed by a detailed explanation of how it works. This method of showing the styles works extremely well. First of all, the programs are short enough to completely understand, while still not being trivial. Second, you soon become so familiar via the problem solved (term frequencies) that you can easily concentrate on the differences between the styles. And finally, the descriptions of the styles are actual programs that can be run, instead of abstract hand-wavy descriptions, which I really appreciated. I really enjoyed reading this book, and I learnt a lot. I think it is quite unique among programming books. At the same time it is relatively unknown, which is a shame. It is a great book that deserves to be better known. I have written a longer review of it on my blog: https://henrikwarne.com/2018/03/13/exercises-in-programming-style/ … (plus d'informations)
Les membres de LibraryThing améliorent les auteurs en combinant les noms d'auteurs et les œuvres, en séparant les auteurs homonymes en identités distinctes, et bien plus encore.
Ce site utilise des cookies pour fournir nos services, optimiser les performances, pour les analyses, et (si vous n'êtes pas connecté) pour les publicités. En utilisant Librarything, vous reconnaissez avoir lu et compris nos conditions générales d'utilisation et de services. Votre utilisation du site et de ses services vaut acceptation de ces conditions et termes.
All the programs are written in Python, but each program is written in a different style. Examples of styles are: only passing arguments via the stack, stringing function calls together, object oriented, actors, aspects, using an SQL database, and Map Reduce.
Each example is one or two pages of code, and is followed by a detailed explanation of how it works. This method of showing the styles works extremely well. First of all, the programs are short enough to completely understand, while still not being trivial. Second, you soon become so familiar via the problem solved (term frequencies) that you can easily concentrate on the differences between the styles. And finally, the descriptions of the styles are actual programs that can be run, instead of abstract hand-wavy descriptions, which I really appreciated.
I really enjoyed reading this book, and I learnt a lot. I think it is quite unique among programming books. At the same time it is relatively unknown, which is a shame. It is a great book that deserves to be better known.
I have written a longer review of it on my blog: https://henrikwarne.com/2018/03/13/exercises-in-programming-style/
… (plus d'informations)