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…)

Book Review: “Out of Our Heads: Why You Are Not Your Brain, and Other Lessons from the Biology of Consciousness” by Alva Noe

November 11th, 2009

Interesting, but ultimately disappointing and unconvincing. (2 out of 5 stars)

Noe avoids mystical explanations and the supernatural. He doesn’t put forth souls or the vague appeals to quantum mechanics that are the hallmarks of new age quackery. And while he skates close, he doesn’t present consciousness as just merely a postmodern social construction. “Out of Our Heads” is grounded in this sense.

Consciousness, Noe states, is not a something that takes place in the brain like digestion takes place in the stomach. And it is more than just the sum of its parts, just as a performing dancer is more than just muscles. But as poetic as Noe gets, his arguments are full of discrepancies and far from compelling. His biggest mistake is that you can easily replace his use of the words “environment” or “body” with “the brain’s sensory input” and all his anecdotes and scientific appeals are just as valid and consistent. (more…)

Lessons Learned from Writing a Technical Book to Teach Programming

November 2nd, 2009

From 2008 to 2009, I wrote a book called “Invent Your Own Computer Games with Python” ( http://inventwithpython.com ) which guides young adults and complete beginners through learning how to program in the Python language. I’ve just completed the second edition of the book, which has been an exhausting amount of work. Looking back over it, I realized that it could have been a much less exhausting experience if I had made some simple preparations.

I’ve decided to write up this post on the lessons learned and the best practices for writing a technical book that aims to teach programming. This post will help me organize my thoughts so that I’m more prepared for my own future writing, but the practical tips can help others who aspire to write a book as well. (more…)

Second Edition of “Invent with Python” is available!

October 26th, 2009

It’s been a lot of work, but the second edition of “Invent Your Own Computer Games with Python” is now ready. The book’s new website is http://inventwithpython.com

“Invent with Python” is a free book that teaches kids (and adults) how to make computer games in the Python language. It’s aimed at people who have had no experience with programming before. The website also has some nifty features: online diff, a tracing tool, and (soon) video tutorials to accompany the book.

Thanks a lot to everyone who’s helped out!

Next Page »

Powered by WordPress