Attitudes on Programming for Kids: “They Need Blood Exploding Onto Their Faces Just to Keep Them From Yawning”

June 21st, 2010

I wrote a book titled “Invent Your Own Computer Games with Python” (free online under Creative Commons at http://inventwithpython.com) to teach kids (and adult beginners) how to write computer programs by making simple games. The book adopts a different teaching style from most programming books. Rather than tediously list out the programming concepts I instead present the source code to several games and introduce the concepts as I explain the code line by line. The programs themselves start off simple and text-based (“Guess the Number”, Tic Tac Toe, Hangman, etc.) and then progress in complexity.

Cover of

The decision to use text-based games was done on purpose. Text is easy to present in a book and to be understood by the reader. There are no 3D models, sprites, or textures to download. By typing in the text themselves instead of using pre-made models and artwork, the reader makes the program their own rather than the product of third party content.

But from people on the Internet (who are my main audience) the most common criticism is that a programming book for kids must have fancy graphics and animation or else the kids will get bored. I receive a fair share of emails where readers and parents disagree, but we have the idea, deserved or not, that all kids live in fast-paced, ADD world of blinking lights, fiery explosions, and flashing images that we hypocritically deride and yet cater to. And if you want to teach programming, you’re going to need sophisticated toolkits with animated models, particle effects, and huge sandbox worlds that are creatable at the click of a button. I call this the “blood exploding onto their faces just to keep them from yawning” mentality. Actually typing out code is seen as dull, tedious, and an effort kids are not willing to make.
(more…)

“Invent with Python” Available in Print on Amazon

May 10th, 2010

Invent Your Own Computer Games with Python, 2nd Edition, is now available in print on Amazon.com:

Buy “Invent Your Own Computer Games with Python” on Amazon.com

Of course, the book will still be available online, in full, for free under a Creative Commons license. If you like the book, but don’t/can’t buy the print version, go to Amazon and put in a review. The book is $25 (and qualifies for Amazon’s free shipping.)

I’m very excited about this. Thanks to all the readers and people who have emailed me. Thanks!

Alan Turing: Don’t Ask, Don’t Tell Poster

February 9th, 2010

Poster I made about British genius and World War II hero, Alan Turing. View poster.

Alan Turing: Don't Ask, Don't Tell Poster Thumbnail

The original source Photoshop file is available for download.

I’m releasing this poster and the source file under a Creative Commons “Attribution-Share Alike” 3.0 license, meaning you can copy it as much as you want, or make changes. (IANA graphic designer, and I spent more time on the wording and font choice than the visual look.)

UPDATE: Fixed those typos. “Heroes” and “further” always look like the wrong way to spell those words to me.

Just Let BASIC Die.

December 22nd, 2009

If you’d like to hear a boring but heart-warming story, ask a geek about how they learned programming. It’s like the opposite of trolling: you can instantly provoke tearfully-joyous nostalgia out of programmer strangers on the Internet by making this inquiry. Most of these stories will include some form of a programming language called BASIC, the Beginners All-purpose Symbolic Instruction Code created in the 1960’s at Dartmouth. The Atari generation has now grown up, and so have programming languages. But I think this nostalgia is responsible for us holding onto an out-dated language like a ratty security blanket.

In another post, I wrote about how Python is the new BASIC, as in it should take up the mantle of being the iconic first programming language for kids to learn. The rising sun of Python should be a long-awaited welcome for a new generation of coders. In the early 2000’s, there seemed to be (at least from my perspective) a noticeable gap in kid-accessible programming that was filled with JavaScript, TI-82 calculator programming, and Visual Basic. These were languages suited for the world of software engineers, but it was hardly ideal for the kid software hobbyist. (more…)

“Inserted Left Margin” Browser Bug in IE 6 and 7

November 25th, 2009

I found a weird IE 6 and IE 7 CSS bug a few weeks ago at work. I forget the exact way I found the solution (in other words, it was probably dumb luck), but I haven’t found it described anywhere else on the web. I call it the “inserted left margin” bug for lack of a better name.

This is a problem with IE 6 and IE 7, but not with IE 8 or Firefox.

The problem is that setting the width style for a tag to a non-auto value will create a left margin in that tag for (and only for) input tags. This “inserted left margin” will be equal in size to the sum of all the left margins in the containing tags. Reread those two sentences to get an idea of how obscure and weird this bug is. :)

For example, consider this HTML:

<div id=’A’ style=’margin-left: 20px; border: red solid 3px;’>
<div id=’B’ style=’margin-left: 30px; border: blue solid 3px;’>
<div style=’width: 200px;‘>
<input type=’button’ value=’Hello’/>
</div>
</div>
</div>

In Firefox, this will render normally:

However, in IE 6 or IE 7, a left margin will be inserted. The margin is 50 pixels wide (the sum of the left margins of the containing divs, 20 and 30 pixels):

(more…)

Next Page »

Powered by WordPress