Outils pour utilisateurs

Outils du site


issue71:critique_litteraire

Ceci est une ancienne révision du document !


Table des matières

1

Publisher: No Starch Press Pages: 318 Ideal For: Anyone with an interest in programming, no previous knowledge necessary Writing a book on learning to program has got to be difficult. Most of us think we know what programming entails, right? You type in some goofy-looking code that tells your computer what to do and, voila, Skyrim! How hard can it be? Very, it turns out. Even the most basic concepts in programming (functions, for example), require careful explanations that nest comfortably within one another like coded Matryoshka dolls. Leave out one of the dolls and you have an incomplete arrangement and, likely, a non-working program. Now imagine scaling that complexity down so that a child or, say, yours truly can understand it. Now you’re talking orders of magnitude harder than simply teaching someone how to code. Not only do you have to explain non-intuitive concepts carefully, you also have to do it in an entertaining way. It’s like a pediatric dentist who dresses like a clown to keep her patient from running away in tears at the first sound of drilling.

Éditeur : No Starch Press Pages : 318 Pour : Quiconque s'intéresse à la programmation, aucune connaissance préalable requise

Écrire un livre pour apprendre à programmer doit certainement être ardu. La plupart des gens pensent qu'ils savent ce que c'est que de programmer, non ? Vous saisissez un peu de code bizarroïde qui indique à votre ordinateur ce qu'il va faire et, voilà, Skyrim ! Est-ce vraiment difficile ?

Il s'avère que oui. Même les concepts de programmation les plus fondamentaux (par exemple, les fonctions) nécessite des explications claires qui s’imbriquent l'une dans l'autre comme des poupées russes codées. Si vous oubliez une des poupées, vous aurez un ensemble incomplet et, sans doute, un programme qui ne fonctionne pas.

Imaginez maintenant réduisant cette complexité afin qu'un enfant ou, disons, moi-même puisse la comprendre. Et là, la difficulté s'accroît de plusieurs ordres de grandeur ; c'est nettement plus difficile qu'apprendre à quelqu'un simplement comment coder. Il faut non seulement expliquer des concepts non-intuitifs avec soin, mais il faut aussi le faire de façon divertissant. Comme une dentiste pédiatrique qui se déguise en clown pour que le patient ne s'enfuie pas en pleurant dès qu'il entend la fraise tourner.

2

Cavity prone kids have Dr. Funny Tooth, and kids interested in programming have No Starch Press. Python for Kids basically dresses up the complexities of programming in a fun package, and tries to keep things light, while still working toward a functional program. I am clearly the right demographic for this book. I’m not a kid, but I pretty much eat like a teenager, so it’s almost the same thing. Plus, I have no working knowledge of programming, barely any knowledge about computers, and only a passing familiarity with the English language. If Python for Kids can teach me to program, it’s quite possible it was written by a wizard. The first thing I learned from this book was that Python was named after Monty Python, the English comedy troupe. If that’s all I’d learned then the book would be worth its cover price, because I LOVE Monty Python. But the learning continued, mostly because the book is well-written, engaging, and full of simple words for simple people like me. Installing Python for use with the book seems like it would be very straightforward. I say seems because Python came pre-installed in desktop Ubuntu. Woohoo, I’m a programmer already!

Les gosses dont les dents sont susceptibles aux caries ont le docteur Dent amusant et les gosses qui sont intéressés par la programmation ont No Starch Press. Essentiellement, Python for Kids déguise les complexités de la programmation dans un emballage amusant et essaie de rester léger tout en continuant à travailler vers leur objectif : un programme fonctionnel.

Il est clair que je suis une bonne cible pour ce livre. Je ne suis pas un gosse, mais je mange grosso modo comme un adolescent, ce qui est à peu près la même chose. En outre, je n'ai pas de connaissances pratiques de la programmation, guère de connaissances sur les ordinateurs et quelques vagues notions de la langue anglaise. Si Python for Kids réussit à m'apprendre à programmer, alors c'est tout à fait possible que l'auteur soit un sorcier.

La première chose que j'ai apprise de ce livre était que le Python doit son nom aux Monty Python, l'ensemble comique anglais. Si c'était tout ce que j'avais appris alors le livre vaudrait déjà son prix, car j'AIME les Monty Python. Mais l'apprentissage continua, surtout parce que le livre est bien écrit, palpitant et plein de mots simples pour des gens simples comme moi.

L'installation de Python pour pouvoir l'utiliser avec le livre paraît être très simple. Je dis « paraît » car Python est pré-installé dans Ubuntu pour les ordinateurs de bureau. Ouah, je sais déjà programmer !

3

For non-Ubuntu platforms, the book offers clear installation instructions along with screen caps. Another point for No Starch: the screen caps in each chapter typically looked exactly like what I was seeing on my screen. It’s a small thing, but I always hate it when you have to take a moment to make sure you didn’t do something wrong because your picture doesn’t match up with what’s in the book.

I also had to install the latest version of Idle (which allows you to run Python programs) and that took about 3 seconds. What is taking so long?! Kidding.

After installing Idle and running through the first few chapters, I had my first “Hello World” moment finished in under 5 minutes. Not bad, especially when you consider the attention span of the average kid, which is on par with the attention span of the average door knob. Source: I’m the father of two kids.

As I progressed through the book, I learned about calls, functions, strings, lists and loops. Each time a concept was introduced, I was given a small snippet of code to enter, and an explanation of how it worked. The only time something didn’t work as expected was when I had entered the code incorrectly. Since the code was short and simple, it was an easy matter of looking through it to identify the problem.

4

At this point, allow me to rant on an issue all programming books have in common. Why the $#%! aren’t these books spiral bound so that I can read them comfortably while, you know, TYPING ON A KEYBOARD?!

/rant

Within an hour of opening the book, I was drawing squares using the turtle module (which, since it leaves a trail, is really more accurately referred to as a snail or a hobo - presumably those are different modules we learn about later).

Each chapter builds on the previous, and puzzles at the end of each chapter test your knowledge. I have to say, these were not simple recreations of what had been done already but were, themselves, extensions of existing concepts. I actually got a little clammy-handed working through them, feeling like a high-school student taking a pop quiz. Thankfully, all the answers are available at http://nostarch.com/pythonforkids

One of the neat things about reading beginner programming books is that you start to see the evolution of games. As I read through the creation of classes and objects, and learned about functions asking for the user to input information (age, number, direction, action, etc), I felt like I was peeking behind the curtain of the earliest text-based dungeon-crawling games I played as a kid. Modern kids, with their Facetube and their YouBooks and their X-Wiis, probably won’t have that sense of nostalgia, but maybe their parents will.

5

By the end of the book, I had a cute little ball-and-paddle game up and running and a rudimentary understanding of the concepts used in its creation. While I’m not likely to get called up by Rockstar Games to work on Grand Theft Auto VI: Life in Sing-Sing, I do feel comfortable recommending the book to interested kids, or picking up some more beginner programming books for myself. There’s nothing quite like seeing the simple lines of code create something on the screen and knowing how and why it happened. I only have a few complaints about the book and none of them would keep me from recommending it (although they might be helpful in managing expectations for potential readers).

First, of the games you get to program yourself, the first one, a ball-and-paddle game, doesn’t make an appearance until page 190. While all the concepts leading up to the creation of the game are explained clearly, and make up the bulk of what you’re learning, I felt the game came a little late. An easy fix for anyone interested in getting the book who thinks this might be an issue: simply download the final version of the ball-and-paddle game (available free at the publisher’s website), run it, and then take a look at the code. It will seem like gibberish at first, but, as you go through the book, you’ll start to see how certain modules and functions could be used to create the game.

6

Second, while the book says it’s for kids, it is important to explain to young readers what the book can and cannot do. When I showed the book to my seven year old, he got very excited and came up with a laundry list of things he wanted to see in the game I was apparently going to program for him, none of which I could accommodate (with the exception of naming the game Kitchen Confidential: The Ginsu Offensive - yeah, my kid is weird). If the target reader has a deep interest in programming, and understands that the final result will be rudimentary by comparison to even the simplest iPad app she might be familiar with, age shouldn’t be an issue. Otherwise, younger kids with unreasonable expectations and/or short attention spans are not likely to make it all the way through the book without boredom or frustration.

As a side note, whenever someone is ready to pay me to write a beginner programming book using the Diary of a Wimpy Kid model (basically bathroom humor and silly cartoons), get in touch. I have some perfect fart jokes analogies for explaining inherited classes.

Until my spiral bound New York Times Bestseller comes out, Python for Kids is a perfect substitute!

issue71/critique_litteraire.1371568467.txt.gz · Dernière modification : 2013/06/18 17:14 de auntiee