2011-10-22

Coffee and Python

Last week I started giving Ewelina ad-hoc Python programming lessons.

This is as much for my own enjoyment as her benefit... after all, we
have no idea whether she will even like programming, so it's all one big
experiment really. She enjoys logic though and remembers her basic algebra,
which is an excellent foundation. I've always enjoy opportunities to teach
people about the things I like, I find it's a very interesting mental
exercise to try and explain abstract concepts which have long ago become
obvious to me.

It's a fun topic, because I think abstraction really is at the heart of all
programming - finding the appropriate level of abstraction can be the main
difference between good and bad code and I think it's one of the things the
field of computer science hasn't even come close to measuring or quantifying
yet.

But all programmers know how confusing (or downright tedious) it can be to
work with overly abstract systems (FactoryFactoryFactory, anyone?) - and how
frustrating it is when a program is artificially constrained (insufficiently
abstract) and only does one or two specific things when it's methods are
obviously more widely applicable (imagine a text editor that only knew how
to edit files named textfile.txt).

I think abstraction is a big part of what makes programming more of an art
than a science.

Not having any real teaching experience, I have no idea if if that was an
appropriate subject for a 3rd lesson...

But I enjoyed it, and when we stopped Ewelina had written a working program
with 3 functions, exploring arguments, variables, loops and logic abstraction.
She had also found and fixed 3 syntax errors and 1 logic bug.

These pages reflect the views and opinions of Bjarni R. Einarsson,
not his employers, friends or family.In fact, they may not even
reflect Bjarni's views, as he has been known to change his mind or
even make shit up.