Outils pour utilisateurs

Outils du site


issue105:critique_litteraire

Python Playground: Geeky projects for the curious programmer By Mahesh Venkitachalam November 2015, 352 pp. Publisher: No Starch Press ISBN: 978-1-59327-604-1 When I first got this book, I was very excited. When I opened the mailer, I was somewhat concerned by the cover… two robots with laptops on a teeter totter. The sub-title “Geeky projects for the curious programmer” helped a little bit, but my eyes kept going back to those robots, no matter how hard I tried to ignore them. Once I got into the book, however, my concerns were assuaged. Glancing at the table of contents, I was pleased by the project-based format. Part 1 deals with iTunes Playlists and Spirographs, neither of which really excited me. Part 2, however, caused my heart to start to beat faster. The three projects cover Conway's Game of Life, Generating Musical Overtones, and Flock simulations – all of which are of interest to me for various reasons. Continuing down, my eyes were drawn to “Part 5: Hardware Hacking”. My heart skipped a beat (which at my age isn't really a good thing) and I immediately jumped directly to the first page of the section. Sure enough, it was talking about using the Raspberry Pi and the Arduino. I was in heaven. I was smiling so hard that my face started to hurt.

Python Playground: Geeky projects for the curious programmer (Terrain de jeux Python : des projets de geek pour les programmeurs curieux) Écrit par Mahesh Venkitachalam Novembre 2015, 352 p. Éditeur : No Starch Press ISBN : 978-1-59327-604-1

Quand j'ai reçu ce livre, j'étais très excité. Mais, quand j'ai défait l'emballage, la couverture - deux robots avec un portable sur une balançoire à bascule - m'a inquiété quelque peu. Le sous-titre, « Geeky projects for the curious programmer » (des projets de geek pour les programmeurs curieux), était plus positif, mais mon regard retrouvait sans cesse les robots, malgré mes efforts pour les oublier.

Une fois entré dans le livre, cependant, mes doutes furent appaisés. Quand j'ai jeté un œil à la table des matières, le format - basé sur des projets - m'a plu. La première partie traite les listes de lecture iTunes et les Spirographes ; les deux me laissaient froid. Toutefois, à la vue de la deuxième partie, mon cœur s'est emballé. Les trois projets concernent le Game of Life de Conway [Ndt : pour une présentation du jeu de la vie, voir https://fr.wikipedia.org/wiki/Automate_cellulaire#Le_jeu_de_la_vie], Generating Musical Overtones (la génération des tonalités musicales montantes), et Flock simulations (des simulations de troupeaux ou de volées d'oiseaux) - qui m'intéressent pour diverses raisons. Ensuite, j'ai vu la partie 5, « Hardware Hacking » et mon cœur s'est carrément arrêté (ce qui, à mon âge, n'est pas conseillé). J'ai tout de suite cherché la première page de la section : Yesss, elle parlait de l'utilisation du Raspberry Pi avec l'Arduino. J'étais au septième ciel ; je souriais tellement fort que mon visage me faisait mal.

Reading through chapter 12 (Introduction to the Arduino) immediately showed that this author has a very good command of Python and his code is very tight. He explains his code in what I call “the breakout format”, which is where the code is presented as a block or snippet, then is explained step-by-step. No Starch uses a very nice template that allows the author to put graphical call-out numbers (numbers inside a small black circle) next to a line of code, and then the author simply references the number in the explanation section. This makes it very easy for the reader to quickly refer to a line of code that they need more explanation for. There are a total of 14 projects that include ASCII art, particle system simulation, as well as using OpenGL. The author also teaches how to use popular and important Python libraries like numpy, matplotlib, pygame and more.

Quand j'ai parcouru le chapitre 12 (Introduction à l'Arduino), j'ai tout de suite vu que cet auteur connaissait très bien le Python et que son code était extrêmement bien écrit. Il explique son code en utilisant ce que j'appelle « the breakout format », c'est-à-dire qu'il présente un bloc ou un fragment de code, puis il l'explique étape par étape. No Starch utilise un modèle très sympa qui permet à l'auteur de mettre un numéro de rappel (à l'intérieur d'un petit cercle noir) à côté d'une ligne de code, pour que l'auteur puisse y faire référence dans la section explicative. Ainsi, le lecteur peut se référer très facilement à une ligne de code pour laquelle il veut d'avantage d'explications.

Il y a un total de 14 projets, notamment sur l'art ASCII, la simulation d'un système de particules et l'utilisation d'OpenGL. L'auteur vous apprend également à utiliser des bibliothèques Python connues et importantes, comme numpy, matplotlib, pygame et plus encore.

The author states right from the beginning, that this book is not intended to be the reader's first book on Python and I completely agree. While each project has in-depth explanations of not only the code but also the background needed to understand the project, it is far above the level of a beginning programmer. If, however, the reader has some background in other high level languages and has a good grasp of Python syntax, then this is a great book to move beyond the normal command-line type programs. The projects presented are all real-world usable and very relevant to today. The bottom line is that this is a book that belongs in every Python programmer’s library. I have to give this book 5 out of 5 stars. No Starch has a great book on its hands.

Dès le début, l'auteur précise que ce livre n'est pas destiné à être le premier sur Python que le lecteur lit et je suis tout à fait d'accord. Bien que chaque projet soit pourvu d'explications détaillées du code, mais aussi du contexte du projet, qui est nécessaire à sa compréhension, le niveau est bien plus élevé que celui d'un programmeur débutant. Si, toutefois, le lecteur a des connaissances d'autres langages de haut niveau et comprend bien la syntaxe du Python, c'est un livre génial pour aller au-delà du type de programme normal en ligne de commande. Les projets présentés peuvent tous être utilisés dans la vraie vie et sont extrêmement pertinents aujourd'hui.

En résumé, c'est un livre qui doit figurer dans la bibliothèque de tout programmeur en Python. Je suis forcé de donner à ce livre la note parfaite de 5 étoiles sur 5. No Starch a dans les mains un livre formidable.

issue105/critique_litteraire.txt · Dernière modification : 2016/02/04 22:39 de d52fr