Archive for the ‘Programming’ Category

One of the reasons that I’ve been a bit quiet here lately is that I had some grand idea forming in my head that I would start a tradition of an annual report on my reboot process by going back and pulling up my initial objectives and examining progress on each one(*).  Well, not only did that stop me cold in my tracks, but I suspect that it would have been about as interesting to read as the phone book.  So I will spare you that.  You may thank me later .

In the process of killing off the annual report idea though, I did keep coming back to what I feel is the single biggest thing that I have learned over the last two years.  It may not sound particularly profound.  I think it may be like some of those Buddhist concepts where  the act of putting the idea into words robs the idea of its power.  But I’m going to try anyway.

The three word summary is in the title of this post:  Enjoy the Process.

And for some reason I feel compelled to break this down by introducing (or possibly recycling) a series of aphorisms.  This may end up being even more self-indulgent than my original idea of an annual report, but hopefully it will at least be a bit entertaining.

Don’t obsess over becoming an expert, enjoy the time spent on the journey.

This is mostly deeply rooted in the Growth vs. Fixed Mindset idea that came as part of my informal teacher training.  One of the most frustrating students I taught last year was convinced that he was a natural expert programmer and did a pretty darn good job in general.  But he kept hitting a wall in his experience and rather than treating that as an opportunity to learn he would just thrash away in frustration.  Some of my greatest triumphs were when I got him to plow through and figure out the solution himself.  I see too much of myself in that behavior, but now I have that very clear image of that student to pull on when I find myself hitting my head against a wall.  I hope I helped him half as much as he helped me.

Treasure feedback from any source as if it is a rare gift.

Because it is.  It is always harder to give feedback than not.  I have a deeply ingrained impulse to take constructive feedback as a negative commentary on my abilities and I believe it still shows on my face, even in very relaxed environments like a yoga studio.  And of course that treats the absolutely wrong feedback loop with people I am trying to learn from.  I think I’m doing better in the moment and hopefully that will continue to improve over time.   Habits aren’t hard to break (says the ex-smoker), you just have to keep trying.  And making sure that I express appreciation after the fact  to the people that teach me things is, I hope, an effective way of counteracting the in the moment reaction that still happens more often than I would like.

Things that are worth mastering are rarely things that can be mastered.

So one had better enjoy the learning process, because there is no end.  I set out to learn to speak Spanish and learned that I haven’t really ‘mastered’ English yet.  I set out to teach computer science to high school students and I’m pretty sure I ended up learning more from them than they did from me.  I could go on ad nauseum with this list, but I’ll spare you for now.

Be wary of spending too much time doing something that you don’t enjoy.

This is often an attempt to attain some grand future goal, like a title at work, a retirement fund or some kind of recognition.  I’ve achieved a bunch of these things, but if I regret anything (and I really try not to have regrets) it’s the hours spent doing things that I really hated to get to goals.  They really aren’t worth that price.  So I am going to try to make sure that whatever I do in the future the day to day work on balance is both fulfilling and enjoyable in and of itself.

Some part of everyday routine basis makes the world better place

This is the one that I struggle with the most.  Is the world a better place because I helped build better technology relatively early on in the PC revolution?  I like to think so, but it’s pretty impossible to prove.  Do some kids have a slightly better outlook on programming and technology because of the time I spent last year volunteering.  I think that’s a much clearer yes, but that was a much larger commitment than I can manage on a regular basis.  Hopefully I will manage to find on the clearly good + clearly sustainable list in the near future as a volunteer activity.  But the thing I am really trying to figure out is how to get my career Venn diagram to include an unambiguous “make the world a better place” component.

Overall, Enjoy the Process really is a pretty good summary of what I’ve learned so far.  With any luck that will include enjoying the process of writing and you’ll hear more from me in the coming months and years.

(*)The other reason is that I’ve diving into my start-up project which also involves some writing  and so I am (so far not very successfully)  trying to integrate the reboot writing into my ‘non-work’ time.

Venn diagrams are such fun tools.  I wrote a post a while back about the career planning Venn diagram that I ran across.

Career Options

And that is still what’s driving me.  Where to find that intersection between Enjoyment, Skill Set, and a Paycheck.

So let’s talk about another Venn diagram (I promise I’ll loop back around to careers in a moment).  Two of the things that I enjoy most are programming and dancing.  Can I make them intersect?  The default diagram appears to look like this.

Programming - Dance

But wait, dance is heavily influenced by music, there is a mathematical aspect to music (especially the way I think about it) and programming bears a striking resemblance to mathematics.  So here is my intersection model for programming and math.  Pretty, twisted, no?

Programming + Dance - Simple

In any case that leads to the core point of this post, which is that I’m taking a new turn in my reboot process and investing some significant amount of time into a project that really is an intersection between programming and dance.  I’m building a web site and suite of web (and possibly *phone apps) to help dancers find music.   Along with that I’m spinning up a new blog to help shape the ideas that go into the site.  So if music and dancing are things that interest you, please hop on over to my new blog.

And as promised, back to careers.  This lands me squarely on this version of the career diagram.


If the stars align I hope to bring the paycheck circle back into an overlapping state.


I am going to start my first content post of the “Reconcilable Differences” series that is only marginally fits and adds a whole new category to my original taxonomy. But it so top of mind right now that I can’t resist.

Yesterday I was working with a student one on one. I was trying to get him to realize that in order to change the direction of a counter variable’s movement within a loop he could add a direction or speed variable in place of the constant 1 that he was currently adding to the counter. And then change the variable. The problem was I didn’t want to use the word ‘variable’ because I felt like that would just give him the answer. We had done similar problems earlier in the week (and had explicitly used a variable for something not too dis-similar in our opening exercise that day).

So after I spent several minutes trying to get him to figure out that he needed a variable, he politely turned to me and said “I think you think you’re telling me something useful, but I just don’t understand.” Ouch. Then I asked him to read the hint that I had provided for that question on the worksheet – verbatim it was “Think about using a speed or direction variable that can be positive or negative depending on which direction your counter is counting.” He still didn’t get it. So that is the point when I had to realize that whether he hadn’t heard it or hadn’t remembered it, he certainly didn’t have access to the information about what a variable is and how it is used. Ouch, again.

In any case, the teaching lesson is probably that more repetition is a good thing. And that repeating what you just repeated is essential. Although I keep hoping for the magic bullet to get the kids engaged enough that they actually care to remember, which is frustrating to say the least.

But before I get too depressed, let’s think about the learning side of this. I think the reason that I think I missed it in my original taxonomy was that as a learner it’s hard to know what you didn’t hear. Or what you misunderstood. And as you are learning a new skill, if you do it without feedback from others it’s really easy to go down some crazy rabbit hole of wrong learning (but maybe this has some chance of resulting in creating something new).

One way to combat this that I have noticed most recently in yoga class is that there are other learners around you, so there is some immediate feedback. And although I try to keep focus on myself while I’m taking class, there is certainly a different kind of feedback loop in this kind of physical activity than when you have a class of students sitting at individual computers. For instance, I’m taking a new (to me) series of poses at a studio which was recently only teaching the standard Bikram 26 pose series. And I’ve caught myself any number of times moving through the sequence I know so well without hearing the teacher’s instructions to do something different. But having the feedback of the students around me do the ‘right’ poses helps me to quickly get back on track.

How can I apply that to the programming classroom? Maybe take another run at pair programming? Or have the students that are ‘getting it’ help those that aren’t?   And how do I apply this to my own learning?

And for my own learning I definitely need to figure out tighter feedback loops for many of the things I’m working on.

In any case, when I revisit my initial taxonomy (hopefully after getting a few more related posts under my belt) I suspect I’ll have to add a “Simple Student Error” below the “Simple Expert Error” category.

I’m a bit worried that I think too much in terms of dichotomies, dilemmas, quandaries and paradoxes (especially because I could only spell one of those words without the help of the spell checker).  But this one hit me over the head from a couple of different directions in yoga class this morning, so what the heck.

First the rant version:  I got to class this morning and put my mat in the back of the room and headed to the locker room to change.  When I got back, a young lady had put her mat directly in front of mine.  Very nicely lined up, she probably spent some real time making sure she directly centered it.  Now this was in a fairly small class, so it wasn’t that big a deal to shift left a bit.  But this particular studio has markings on the floor so that in a full class you know how to set up your mats to get three rows nicely staggered so that everyone can see themselves in the mirror.  So was she just so focused on getting to a relatively early morning class that when she got there she didn’t think to be polite about where she landed?  I’d like to give her the benefit of the doubt, but I’m not sure.  Then there were the three people that walked into a totally silent room and snapped their mats open when clear and crisp  “bang” sounds.  One of these days that’s going to startle me enough that I’m going to pee my pants.   Then they’ll be sorry.  You betcha!  Or the guy that stuck his towel on the only open shower stall as I walked into the room and then proceeded to spend several minutes gathering his accoutrements to actually take a shower.  Are these people all just oblivious, so focused on what they are doing that they don’t realize that they’re being incredibly rude?  Or are they totally aware and don’t care?  The flip side of this is that I like to feel that I’m a reasonably polite person, but I know I can focus to the sacrifice of all else even when I’m not trying, so I wonder how many blog posts are out there ranting about the incredibly rude things I’ve done?  Possibly even just the incredibly rude things I’ve done this morning?

Anyway, now that that is off my chest.  Call it the rudeness corollary to the Focus/Awareness Quandary.  Let’s get to the meat of the issue, which is what got kicked off in my yoga background process by the first couple of incidents.

This class was a Hatha class that the studio is calling their “Fire” series.  It’s small variation on Bikram using a few additional poses from the Gosh 84 posture series and mixes up some ordering.  The point is that it is very close to a series that I’ve been doing for years, but was only the second time I had done this sequence and a few of the postures therein.   So I had to listen to the instructor more carefully than I usually do and keep an eye on those around me for queues and examples for where things were different.  The net result was the least focused class I’ve had in a long time.  But at the same time, I caught a couple of queues for poses that I have done for years that I had somehow missed.  Which tells me that even in one of the more focused activities in my life, broadening my awareness sometimes is probably a good thing.

The real question though is how to know how to mix that up most effectively.  It is certainly useful in Yoga (as in programming) to be able to focus so tightly that the rest of the universe disappears.  But how long should you do that for?   My back is telling me (in the programming case) that perhaps that time is shorter now than when I was a teenager.  Maybe I need to invent a programming egg where I can just close myself in and spew code.  Anyone know where I can get one of those?  I’d prefer the model where I can just think the code too, no typing required …

One of my favorite yoga teachers opened class the other day with an exercise that I had never seen done before although I think it’s more common in ‘softer’ yoga practices.  She asked everyone to turn to a neighbor and share a way that they use their yoga practice outside of class.  Well, since I’m an off the charts introvert (I am going to get around to writing that post one of these days), I managed to pause just long enough that as I turned to each of the people around me, they had already engaged with someone on their other side.  So no big deal, I sat and enjoyed a few minutes of meditation.

But near the end of the sharing time the teacher looked up from her conversation and commented on how relaxed I looked sitting by myself in the middle of the chatty room.  And of course she then put me on the spot to share with the entire class.  An introvert’s nightmare.  But I sucked it up and took the opportunity to very briefly share that I was volunteering to teach High School students Computer Science and since Yoga was one of the skills that was newest to me, I frequently took things I learned in Yoga to help me teach in that entirely different environment.

And this is why I find Yoga so much fun.  The response wasn’t a blank stare or a nervous laugh (either of which would be completely reasonable and somewhat expected when I allow myself to geek out in public), it was “Oh yeah, I use a programming example to help teach yoga sometimes.”  And went on to describe how she talks about how computer code reduces down to a series of zeroes and ones, each of which has meaning.  Which means that if one of those bits gets flipped for whatever reason your program may do something entirely different than what you expected.   And doing yoga is kind of like this kind of program – every instruction you send to your body is important at the most exacting level – crossing wires or flipping one bit can make your program crash or do something different than you wanted.  I particularly take this to heart in things like Chataranga (Yoga Pushups) where a very healthy exercise can quickly degrade into a shoulder injuring anti-exercise.

In any case, you should all be proud of me.  I  did not respond by breaking down the argument on the spot and trying to open a discussion about how this analogy may or may not be applicable and where it might break down.  I answered with something that I hope came out as a slightly more engaged version of “Thank You” and we went on with the class.

But since you’re here, let’s break this down a little bit.  Especially because I just reviewed binary numbers with my class and we’re going to do a check on error detection soon.  With my old Apple II which had no parity bit for its memory and had a dense enough instruction set that flipping a bit in an instruction almost certainly did something valid but different than intended I think the analogy is pretty accurate.  Especially because it wasn’t uncommon to have an occasion to program directly in machine code.  In the current world almost no-one including the deepest level system programmers write machine code directly (and yes, I know quite a few such creatures, was one myself not too long ago).  Further, with a modern computer almost all memory is error checked in some way or another so a single ‘bad bit’ will either be automatically corrected or something will error out rather than continuing to execute the error.

And now I am thinking about exceptions like Black Hat Hackers that probably do write machine code directly and certainly look for places where changing a single bit will make a program behave differently than intended.  But of course I could get myself stuck in an infinite loop here so I will stop and allow you to get back to something more important.  Like going to a good yoga class of participating in your favorite form of healthy exercise.

Or take a moment to add your thoughts on why programming and yoga (or your favorite form of exercise) are related. I bet my yoga teacher and I don’t have a corner on that market…

I’ve been attempting to acquire a number of new skills and been around people learning new skills for various reasons in the last year or so and it has lead me to formulate what I think of as “The Beginner’s Dilemma.”  The general idea is that as one starts to develop some facility in a new skill, one over assesses one’s competence, sometimes by a significant amount.  At some level this is probably a good thing – if you accurately assessed your ability at the very beginning you’d probably give up.  Or at least I would.  On the other hand, if you over assess too much at something like driving a motorcycle or flying a plane, you might earn yourself a Darwin Award post haste.

As usual, the most important variation on this is in my continued attempt to teach high school students to program, but let me share a couple of short anecdotes from other parts of life first.

My most long-standing version of The Beginner’s Dilemma is ballroom dancing.  When I first started to learn to dance I thought I was god’s own gift to dancing almost immediately.  Nearly twenty years later  (with lots of hours of lessons, practice and competitions) I’m just happy that I can get out on a dance floor without stepping on my partner’s toes while leading something that is recognizably the dance that I am attempting.  Now part of that is because I’m not a natural dancer, but the part about overestimating my ability early on is completely true and not because I got worse from practice!  When taking beginning group lessons today, I see the younger version of me all over the place accompanied by various levels of chutzpah, so I’m not the only one that goes through this phase.

Another blatant variation on this is the effect of new yoga students in Bikram Yoga classes where all levels take the same class.  The last two times I’ve taken classes I ended up near a young man who obviously thought he had the whole thing figured out (different dude each time).  Each of them took a place front and center in the class, which is a good indication that they are ready to show the world what they can do.  On the first day, the young man made it through the whole class, but never held a pose for more than a moment – I actually really enjoy this variation because it helps me work on my focus, especially in balancing poses, there is nothing like someone continually falling over in front of you to practice focus while balancing.  On the second day the dude held all of the standing poses, but completely overextended everything – then he lay down and literally slept through the floor series!  Anyway, I wish them both the best and hope that they make it past The Beginner’s Dilemma hump without hurting themselves.

But this brings me back to the core point which is teaching youngsters to program.  I had a real advantage in the early eighties in that no-one around me new how to program.  So I could ride the overestimation wave long enough to actually get good before anyone came along to assess my work.  And fortunately it’s pretty difficult to hurt either one’s self or one’s Apple II by programming.  Especially when one is young enough to sneer at things like lower back issues and lack of exercise.

But the kids in my class are expected to “know how to program” by the end of the year.  So when one of them spends days tweaking simple functions to draw a  Batman figure rather than spending the time on getting Batman to move and scale (which was the point of the assignment), I’m obligated to grade him down for that.  Right?  And burst a bit of his beginner’s overestimation bubble.  Or possibly a bit more than a bit.  I’ve got to say, that is one of the hardest parts of this volunteer gig.  Of course the kid next to him did something similar with being obsessed with the graphics design aspect of the assignment, but took my advice and spent time at home getting the actual programming stuff.  So I’m not going to beat myself up too much.

So how do you keep a student riding the wave of beginner’s overestimation in his own ability while still getting him to learn the things you want to teach him?

And how do I acquire a new skill myself now that I’ve overanalyzed this issue to the point where I doubt I’ll ever be able to ride a beginner’s overestimation wave myself?  At least I’m not in danger of trying to learn to drive a motorcycle. So there’s that.

First off.  Yes, I admit it.  There has been some Big Bang Theory in my life recently, leading to an overly cute blog title.  But who really needs an excuse to go a bit geeky on a blog post title.  Certainly not myself.

Anyway, stripped down to the basics, this is a concept that I’ve been playing with since living with my first off campus roommate in college (which was much longer ago that I want to think about).  Neither of us were complete neat freaks.  Actually by my current standards we were probably both somewhat slovenly.  But our relative neatness (or messiness) was pretty close to the same.  Hence a reasonably decent roommate relationship.  However, I had just a bit more tolerance for the height of the stack of dirty dishes in the sink than he did.  So he almost always ended up doing the dishes and it drove him a bit batty. I swear if he could have just brought himself to leave the dishes just a little a bit longer I would have been bothered enough that I would have done the dishes.

Since that time I’ve been on the other side of that equation many times and it drives me batty, too.  Okay, only a couple of times have I been on the other side of the equation with respect to dirty dishes.  But the general hypothesis applies to many other things in life.

For instance, I’m a planner.  So when working with others it’s almost always the case that I want to have a schedule set before anyone else.  Which means that I end up driving the schedule and often doing extra work to keep everyone on track.  Which isn’t always appreciated, can you imagine? And you can see the people on the other side of that saying “Mellow out dude, if you just hold your horses for a (few minutes, few hours, few days) we’ll get to it our own selves!”

How early does a lesson have to be planned for it to feel comfortable?  How much buffer do you need in a schedule to ship a piece of software on time?  How many minutes past a scheduled meeting time do you have to be to ‘be late?’  How far or how long do you have to stray off the topic of a meeting for it to be counterproductive? 

Or back closer to the core hypothesis –  How many shoes scattered in the mudroom make it messy? If its one less that the anyone who shares the mudroom you may never end up pickup up shoes.

What’s your favorite corollary to the DDCM hypothesis?

I was sweating away in yoga the other day doing a pretty good job of turning my brain off when a thought popped into my head so forcefully that I fell over – I was in Dandayamana-Dhanurasana (standing bow pose) at the time.

I continue to try to achieve the full standing meditation effect because I feel like it helps to keep me sane to do that.  But thoughts keep interfering.  Most of the time they are fairly orderly somewhat conscious lines, like composing a blog post.  While I’m not sure I am thrilled with the compromise (sanity is reputed to be pretty important, after all), it’s certainly productive time when I do that.

So on this particular day, the thought that just popped into my head was a solution to a problem that I had given up on solving.   One of the things we’re using to teach computer science is a book/website called CSUnplugged which is a great set of lessons aimed at late elementary school and up to teach basic computer science concepts without using a computer.  This is how we took our class through things like binary numbers, image representation, and text compression.

But we’ve got a somewhat unruly class of ninth and tenth graders (okay, that was redundant, wasn’t it).  So we have been building slide decks and adding some interactive material both of which are aimed a little closer to our target demographic.   But it takes a long time to do this kind of auxiliary material even when the core lesson is already built.  So I had given up on additional exercises since I couldn’t come up with anything good.

Then came along standing bow pose in a 105 degree room.  And into my head pops the idea to expand on the idea of removing vowels from sentences to a full on interactive experience.  Part of the original lesson had a sentence “Cn y rd ths?”   But since I had just been listening to some lectures that covered the history of  abjads (writing systems without vowels) and had a lot of fun composing some sample sentences without vowels for one of my slides, it occurred to me as I was standing on one leg that the kids would probably have some fun doing something related to that.  And like any revelatory experience I didn’t think this all through – the idea and a full picture of the mini-game of translating/compressing and retranslating decompressing two different phrases – one common one and one from lewis carroll just popped into my head and (almost) knocked me over.

Which leaves me with two questions.  First, for the yogis out there –  is this kind of experience part of what I should look for in meditation rather than the purely relaxing/restorative aspects?    And second for the teacher out there, is it worth falling over in the middle of yoga class to come up with a good classroom exercise?

P.S. My favorite “fine line” expression remains – “There is a fine line between genius and insanity.” May I always stay on the right side of that line (or was that the left side)?

Let me open with a quick slightly off topic note.  I received a back channel compliment about my last post from my favorite teacher that was a bit unexpected.  She took it as a success story.  Which I guess it is, but that wasn’t really the way I had intended it.  While trying the “teaching thing” as a volunteer has a lot of drawbacks that I won’t enumerate here, it has the major advantage of ample resources and domain knowledge.  We had three volunteers working the classroom all of whom had planned, implement and shipped software recently.  So we could use something of a brute force solution to get the kids through an overly ambitious final project.  I can’t even begin to imagine how a classroom teacher with six or seven classes would recover from a similar goof.

But on the subject of success, here is one that I am particularly proud of in a slightly twisted  way.

I have what can most charitably called a dry wit.  Bone dry, like the middle of the desert in the heat of summer.  So much so that most of the time people that don’t know me very well tend to just stare at me blankly when I try to be funny.  Well, that’s when I don’t stoop to pre-teen level potty humor (but that’s another story).

I really try to curb my humor in the classroom.  I’m sure neither the blank stares nor any level appreciation if the kids actually get what I mean will help them learn to program.  Besides, I need to be able to register the blank stares as not understanding a technical point rather than conflating that reaction with incomprehension of humor.

So when we had our feature design exercise,  I walked by our most difficult team of students and overheard them talking about what they got for Christmas.  This was a pair where one of the kids had answered “I don’t care” for all three game ideas before the holidays and the other one seems almost incapable of keeping his eyes on the screen for more than about thirty seconds at a time.

Anyway, I stopped and asked them if their game was about presents.  Voice dripping sarcasm.  I felt really bad as the words were coming out of my mouth, it was definitely not a kind statement.  But then one of them said “yes.”  And I said “cool, let’s talk about how that works.”  And they really got into designing a questions answer game were the reward (score) was counted in presents.  It’s probably the most enthusiastic I’d seem them all semester.  And they did it.  It wasn’t’ the most complicated game in the class, but with some help from us they got a complete trivia game up and running with a presents theme woven in.

So either the student thought he had me fooled with his response to my original question or didn’t get the sarcasm at all (which I find very hard to believe – I’m pretty sure most of the students in my class think they invented sarcasm).  But in any case, there was another stumble that turned into success.  And I’m willing to accept credit or that one 🙂

Now time to learn python…