20 February 2012

Inventing on Principle

I recently watched a video of a very interesting presentation given by Bret Victor at the Canadian University Software Engineering Conference. It was called Inventing on Principle.

It was interesting to me for many reasons. I'll mention two of them.

This blog is titled How to Write a Program, but I've never really said anything on the topic, apart from suggesting that unit tests are useful. I'll show some code, usually a small but complete program, and hope people can take something useful away from it. But watching the talk reminded me of something else I could share with you: I single step through my code in a debugger. I don't mean just when I'm tracking down a bug. I mean as a matter of course, after I've written a bit of code, I step through it to see if it behaves the way I expected it to. It's confirmation you wrote what you thought you wrote. Bret demonstrated a cool coding environment that gives you some of that feedback immediately, as you write the code, without recourse to a debugger.

On a totally different level, the talk was interesting to me because I have teenage sons who I occasionally attempt to advise. One of the (not particularly original) bits of advice I always believed to be important, humane and uncynical was that you should follow your heart: find something that matters to you intrinsically and then work hard in that field and make a contribution. (However, my children don't yet know what matters to them, apart from access to computer games and the internet - we are fortunate to live where food, shelter and security are a given.) I love seeing or hearing something that forces me to re-evaluate my basic long-held assumptions and Bret Victor's presentation was one of the most thought-provoking I can ever remember watching. I'm glad I saw it.

index of blog posts

No comments:

Post a Comment