Planning Spontaneity

Whenever I teach an intensive mode class, as I’ve just finished doing, I have to face the fact that I just don’t have the same level of ‘slack’ time between classes that I’m used to. In a traditional model of 2-3 lectures a week, I usually get a break of up to 5 or so days between each teaching activity to make changes based on student feedback, to rehearse and to plan. When you’re teaching 3 hours on Friday, 6 hours on Saturday and 7 hours on Sunday, and adding a good hour of extra time per session on for student questions, you have no slack.

I like to able to take the class in a wide range of directions, where student questions and comments allow the exploration of the knowledge in a way that recognises how the students appear to be engaging with it. I still get all of the same content across (and it’s in the notes and probably podcasts as well) but we may meander a fair bit on our path through it. I learned, very early on, that being able to be spontaneous like this and still cover everyone was not something that I could achieve without planning.

The New Caledonian Crow can spontaneously solve problems without planning. I’m guessing that this doesn’t include teaching Computer Networks to humans.

If I don’t ask students any questions, or they don’t ask me any, then I can predict how the lecture will roll out. I can also predict that most students will end up asleep and that they will learn very little. Not a good solution. I like to be able to try different things, other activities, focus on issues of direct concern to the students but, given that I have almost no reaction time in a tight teaching mode like this, how can I do it? Here are five things that I’ve found are useful. There are more but these are my top five and I hope that they’re helpful – there’s nothing really earth-shattering here but there’s a tweak here and there.

  1. Get any early indications you can of what students are interested in. Use this to identify areas that might get explored more.

    Have you set an assignment on ‘subject X’? Students will be interested in subject X. Has something been in the news? Is there something on the student’s mind? In the previous post, I used a question board to find out what each student was really curious about. A quick scan of that every now and then gave me an idea of what the students would talk about, ask questions about and care about. It also allowed me to do some quick looking up to confirm areas that weren’t on the traditional course that could add more interest.

  2. Review the course and know what can be dropped. Plan not to but have it as a safety valve.

    Ok, this is Teaching 101, but it’s essential in an intensive course. Once it’s over, you’ve missed the chance to add new content and you only have 2.5 days to get it across. I know which areas I can reduce depth on if we’ve gone deep elsewhere but, sometimes, I’m in a section where nothing can be dropped. Therefore I use that knowledge to say “I can’t drop anything” so I have to use a different strategy like…

  3. Have a really good idea of how long everything will take. Be prepared to hold to time if you have to.

    If you run 10 minutes over in a traditional lecture, the next lecturer will grumble, the students will grumble, but the end of the day resets the problem. Do that in intensive mode and you lose an hour for every six lectures. On the course I just did, you’d lose nearly three lectures (worst case). Yes, yes, we’re all rehearsing our content and re-reading it before we present, but intensive mode students have different demands, and may keep asking you questions because they know this is one of their few chances to talk to you face-to-face, which brings me to…

  4. Understand your students.

    My intensive students have full-time jobs when they’re not in my classroom. They’re so dedicated to their studies that they work 5 days, spend Friday night with me, work Saturday morning, and then spend Saturday and Sunday afternoon with me. What does this mean? It means that I can’t just run over on Friday night because I feel like it. I need to respect the demands on their time. Some of them might be late because of public transport or work running over and things like that – because we’re all jamming stuff in. I don’t condone students not caring about things but I do try to understand my students and respect the amount of effort they’re putting in. What else does this mean? I have to be very interesting and very clear in my explanations on Sunday, preferably with lots of interactive activities of one form or another, because everyone is really, really tired by then.

  5. Understand yourself.

    The whole reason I plan really carefully for these activities is that, by Sunday, I’m pretty tired myself. University courses do not usually run at this pace and this is not my usual approach. I’m rounding out a 10 day week at a pace that’s faster than usual. While I will still be quite happily able to teach, interact and work with my students, there’s no way that I’m going to be very creative. If I want to support interesting activities on Sunday, I need to plan them early and identify their feasibility on Friday and Saturday. However, I plan with the assumption that it will go ahead.

This Sunday I ran a collaborative activity that I had planned earlier, foreshadowed to the students and used as a driver for thinking about certain parts of the course. It ran, and ran well, but there’s no way that I could have carried it out ‘off the cuff’ and everything good that happened on Sunday had been planned at least a few days in advance, with some of it planned weeks before.

I love being spontaneous in the classroom but it has taken me years to realise that the best opportunities for the kind of spontaneity that builds useful knowledge are almost always very carefully planned.

 


Wall of Questions – Simple Student Involvement

Teaching an intensive mode class can be challenging. Talking to anyone for 6 hours in a row (however you try and break it up) requires you to try and maintain engagement with student, but the student has to want to become and stay engaged! We’re humans so we’re always more interested in things when it is relevant to our interests – the question now becomes “How can I make students care about what I’m teaching because it is relevant to them?”

I’ve learned a lot from looking at the great work coming out of CS Unplugged, so I decided to take a low-tech approach to getting the students involved in the knowledge construction in the course.

On the Friday night of teaching, I gave my students a simple homework question: “What is your big question about networking?” This could be technical, social or crystal-ball gazing. The next morning, I handed out some large sticky notes in a variety of garish colours and asked them to write their questions on the notes and stick them on the board. This is what it looked like this morning (after about 6 hours of teaching).

The Big Network Question Board

The blue, orange and pink rectangles are questions. The ones on the left are yet to be answered. The ones on the right have been answered. (The green post-its are 2D bit parity as an audience participation magic trick.)

I’ve been answering these questions as fill-ins, where I have gaps, but a lot of them address issues that I was planning to cover anyway. The range is, however, far wider than I would have thought of but it’s given me a chance to address the applications and implications of networking, to directly answer questions that are of interest to the students.

Here are some (not verbatim) examples: What happened to the versions of the Internet Protocol that aren’t 4 or 6? What would happen if we had a human colony on Mars in terms of network implications? Was the IPv4 allocation ‘fair’ in terms of all countries? Could you run WiFi in the underground train network and, if so, what is the impact of the speed of the train? Will increased WiFi coverage give us cancer?

Every student has a question on the board and, now, every student is (at least to a slight degree) involved in the course. A lot of the questions that are left are security questions, and I’ll answer them as part of my security lectures this afternoon.

If you like this, and want to try it, then I am not claiming any originality for this but I can offer some suggestions:

  1. Give the students a little time to think about the question. It’s a good homework assignment.
  2. Get them to fill out the notes in class. As they finish their notes and pop them up to the board, it appears to encourage other people to finish their own notes to get them up. The notes are also shorter because the students want to get it done quickly.
  3. Once the notes are up, quickly review them to see how you can use them and where they fit into your teaching.
  4. When you can, group the notes by theme based on what you are teaching. I left them unordered for a while and I kept having to exhaustively search them, which is irritating.
  5. Be bold and prominent – the board is an eye-catcher and it clearly says “We have questions!” It’s also dynamic because I can easily rearrange it, move it or regroup the notes.

I’m still thinking about what to do with the notes next. I am planning to keep them but am unsure as to whether I want to ‘capture’ answers to this as I may have a knock-on effect for the next offering of this course.

What pleased me was the students who recognised their own question, because their faces lit up as I spoke to their concern. For a relatively low effort investment, that’s a great reward.

Could I have used an electronic forum? Yes, but then the focus isn’t in the classroom. The board, and your question, are in the classroom. You can go up and look at anyone else’s to see if it’s interesting. Rather than taking the application focus out of the classroom, we’re bringing in the realities and the answers as I go through the teaching.

Is there a risk that they’ll ask something I don’t know? No more than usual, and now I can sneak off and look it up before I answer, because it’s on the board. Being an honest man, I would of course have to say “I had to look this up” but I did warn them that this might happen. If a student can ask a question that has me scratching my head but I can develop an answer, I think that’s a very valuable example and it’s probably a nice moment for the student too.

I’ll certainly be doing this again!

 


369 (+2)

( +2 )

The post before my previous post was my 369th post. I only saw because I’m in manual posting mode at the moment and it’s funny how my brain immediately started to pull the number apart. It’s the first three powers of 3, of course, 3, 6, 9, but it’s also 123 x 3 (and I almost always notice 1,2,3). It’s divisible by 9 (because the digits add up to 9), which means it’s also divisible by 3 (which give us 123 as I said earlier). So it’s non-prime (no surprises there). Some people will trigger on the 36x part because of the 365/366 number of days in the year.

That’s pretty much where I stop on this, and no doubt there will be much more in the comments from more mathematical folk than I, but numbers almost always pop out at me. Like some people (certainly not all) in the fields of Science Technology Engineering and Mathematics, numbers and facts fascinate me. However, I know many fine Computer Scientists who do not notice these things at all – and this is one of those great examples where the stereotypes fall down. Our discipline, like all the others, has mathematical people, some of whom are also artists, musicians, poets, jugglers, juggalos, but it also has people who are not as mathematical. This is one of the problems when we try to establish who might be good at what we do or who might enjoy it. We try to come up with a simple identification scheme that we can apply – the risk being, of course, that if we get it wrong we risk excluding more people than we include.

So many students tell me that they can’t do computing/programming because they’re no good at maths. Point 1, you’re probably better at maths than you think, but Point 2, you don’t have to be good at maths to program unless you’re doing some serious formal and proof work, algorithmic efficiencies or mathematical scientific programming. You can get by on a reasonable understanding of the basics, and yes, I do mean algebra here but very, very low level,  and focus as you need to. Yes, certain things will make more sense if your mind is trained in a certain way, but this comes with training and practice.

It’s too easy to put people in a box when they like or remember numbers, and forget that half the population (at one stage) could bellow out 8675309 if they were singing along to the radio. Or recite their own phone number from the house they lived in when they were 10, for that matter. We’re all good for about 7 digit numbers, and a few of these slots, although the introduction of smart phones has reduced the number of numbers we have to remember.

So in this 369(+2)th post, let me speak to everyone out there who ever thought that the door to programming was closed because they couldn’t get through math, or really didn’t enjoy it. Programming is all about solving problems, only some of which are mathematical. Do you like solving problems? Did you successfully dress yourself today?

Did you, at any stage in the past month, run across an unfamiliar door handle and find yourself able to open it, based on applying previous principles, to the extent that you successfully traversed the door? Congratulations, human, you have the requisite skills to solve problems. Programming can give you a set of tools to apply that skill to bigger problems, for your own enjoyment or to the benefit of more people.


A Troubling Reflection: The Fall of Jonah Lehrer

Jonah Lehrer was, until recently, a wildly successful writer, blogger and lecturer, who wrote about many things involving neuroscience. However, as it transpires, a lot of what he published in books and blogs and other locations was shoddy science, insight-driven pattern fitting, unattributed or outright stolen. You can read about it here at the NYMag website.

This made me think about my own blog and whether I’m meeting the standards that I would like to. (Except in terms of ending sentences with prepositions.)  I’m very honest about not presenting anything here as being the double-blind passed rock-solid research reports of an expert, although there’s a big chunk of the empirical and some of my research interests do creep in. I’m also committed to citing the original authors, giving credit where credit is due and quoting correctly. If you want to see what my actual research looks like, you can find my papers on the Internet, having gone through peer review and then public presentation. This is where I think, share my thoughts and work on that elusive animal, community.

But is what I write here actually good science or do I spend too much time going “A-ha!” and then searching for supporters, or is my insight reflecting the amount of reading that I’m doing? I do read a lot of papers and references, I have to as I’m reading into a new area, but I look at Jonah’s critics and I wonder how much of what I write here is adding to the works that I discuss, or clarifying issues in a valid and reproducible way? What is anyone, including me, learning from this?

I’m neither looking for, or wanting, supporting comment or reassurance here, so I’m happy for the comments to stay tumbleweeds. This is a rhetorical question to allow me to link you to a sad tale of a young man overreaching himself, to his great and probably lasting detriment, and then to think about how I can use this to improve what I write here.

It is very easy to look at feedback in terms of “number of students who stayed in lecture” or “positive comments from the 10% of students who bothered to hand in their evaluations”, but the former could be an accident of cold weather, late class and bus timetables, while the latter is most likely a statistical anomaly. Feedback is the thing that you can use to help you improve and it doesn’t really matter where that comes from. The feedback that someone else gets, the places that are identified as where they are lacking, is also something that I can learn from. I don’t have formal teachers anymore. I have mentors, guides, students, peers, friends, partners and … the rest of the world.

I’m not sure how much good science I’ve been putting in here but I am aware that I am falling into what I shall refer to as the Pratchett/Vetinari Newspaper Conundrum a little too often. From my recollection, in “The Truth” by Terry Pratchett, the tyrant of Ankh-Morkpork (Lord Vetinari) notes how convenient it is that the paper always contains enough news to fill the pages. The implication being that the truth is being cut to fit the cloth, not the other way around. I am required to fill one post a day, somewhere between 500-1000 words, and I always seem to find a convenient research issue, story, anecdote or review to hold that space.

What would I do if I actually had nothing to say? Do I write a short piece on the trigger subjects of the gutter press, as they would, or do I publish nothing? I suspect that there have been times when my ‘insight’ posts have been fluff, with little substance, although I would hope that they are still enjoyable to read.

Let me, therefore, commit to maintaining the science/enjoyment separation and making it very clear when and where I am being rigorous and when I am not. And let me also commit to something that may have helped Jonah Lehrer. If I actually find one day that I have nothing to say, then I will try my hardest to say nothing. And I hope that, on that day, you’ll understand why.


Road to Intensive Teaching: Post 1

I’m back on the road for intensive teaching mode again and, as always, the challenge lies in delivering 16 hours of content in a way that will stick and that will allow the students to develop and apply their understanding of the core knowledge. Make no mistake, these are keen students who have committed to being here, but it’s both warm and humid where I am and, after a long weekend of working, we’re all going to be a bit punch-drunk by Sunday.

That’s why there is going to be a heap of collaborative working, questioning, voting, discussion. That’s why there are going to be collaborative discussions of connecting machines and security. Computer Networking is a strange beast at the best of times because it’s often presented as a set of competing models and protocols, with very few actual axioms beyond “never early adopt anything because of a vendor promise” and “the only way to merge two standards is by developing another standard. Now you have three standards.”

There is a lot of serious Computer Science lurking in networking. Algorithmic efficiency is regularly considered in things like routing convergence and the nature of distributed routing protocols. Proofs of correctness abound (or at least are known about) in a variety of protocols that , every day, keep the Internet humming despite all of the dumb things that humans do. It’s good that it keeps going because the Internet is important. You, as a connected being, are probably smarter than you, disconnected. A great reach for your connectivity is almost always a good thing. (Nyancat and hate groups notwithstanding. Libraries have always contained strange and unpleasant things.)

“If I have seen further, it is by standing on the shoulders of giants” (Newton, quoting Bernard of Chartres) – the Internet brings the giants to you at a speed and a range that dwarfs anything we have achieved previously in terms of knowledge sharing. It’s not just about the connections, of course, because we are also interested in how we connect, to whom we connect and who can read what we’re sharing.

There’s a vast amount of effort going into making the networks more secure and, before you think “Great, encrypted cat pictures”, let me reassure you that every single thing that comes out of your computer could, right now, be secretly and invisibly rerouted to a malicious third party and you would never, ever know unless you were keeping a really close eye (including historical records) on your connection latency. I have colleagues who are striving to make sure that we have security protocols that will make it harder for any country to accidentally divert all of the world’s traffic through itself. That will stop one typing error on a line somewhere from bringing down the US network.

“The network” is amazing. It’s empowering. It is changing the way that people think and live, mostly for the better in my opinion. It is harder to ignore the rest of the world or the people who are not like you, when you can see them, talk to them and hear their stories all day, every day. The Internet is a small but exploding universe of the products of people and, increasingly, the products of the products of people.

This is one of the representations of what the Internet looks like, graphically.

Computer Networking is really, really important for us in the 21st Century. Regrettably, the basics can be a bit dull, which is why I’m looking to restructure this course to look at interesting problems, which drives the need for comprehensive solutions. In the classroom, we talk about protocols and can experiment with them, but even when we have full labs to practise this, we don’t see the cosmos above, we see the reality below.

Maybe a green light will come on!

Nobody is interested in the compaction issues of mud until they need to build a bridge or a road. That’s actually very sensible because we can’t know everything – even Sherlock Holmes had his blind spots because he had to focus on what he considered to be important. If I give the students good reasons, a grand framing, a grand challenge if you will, then all of the clicking, prodding, thinking and protocol examination suddenly has a purpose. If I get it really right, then I’ll have difficulty getting them out of the classroom on Sunday afternoon.

Fingers crossed!

(Who am I kidding? My fingers have an in-built crossover!)


A Late Post On Deadlines, Amusingly Enough

Currently still under a big cloud at the moment but I’m still teaching at Singapore on the weekend so I’m typing this at the airport. All of my careful plans to have items in the queue have been undermined by having a long enough protracted spell of illness (to be precise, I’m working at about half speed due to migraine or migraine-level painkillers). I have very good parts of the day where I teach and carry out all of the face-to-face things I need to do, but it drains me terribly and leaves me with no ‘extra’ time and it was the extra time I was using to do this. I’m confident that I will teach well over this weekend, I wouldn’t be going otherwise, but it will be a blur in the hotel room outside of those teaching hours.

This brings me back to the subject of deadlines. I’ve now been talking about my time banking and elastic time management ideas to a lot of people and I’ve got quite polished in my responses to the same set of questions. Let me distill them for you, as they have relevance to where I am at the moment:

  1. Not all deadlines can be made flexible.

    I completely agree. We have to grant degrees, finalise resource allocations and so on. Banking time is about teaching time management and the deadline is the obvious focal point, but some deadlines cannot be missed. This leads me to…

  2. We have deadlines in industry that are fixed! Immutable! Miss it and you miss out! Why should I grant students flexible deadlines?

    Because not all of your deadlines are immutable, in the same way that not all are flexible. The serious high-level government grants? The once in a lifetime opportunities to sell product X to company YYPL? Yes, they’re fixed. But to meet these fixed deadlines, we move those other deadlines that we can. We shift off other things. We work weekends. We stay up late. We delay reading something. When we learn how to manage our deadlines so that we can make time for those that are both important and immovable, we do so by managing our resources to shift other deadlines around.

    Elastic time management recognises that life is full of management decisions, not mindless compliance. Pretending that some tiny assignment of pre-packaged questions we’ve been using for 10 years is the most important thing in an 18 year old’s life is not really very honest. But we do know that the students will do things if they are important and we provide enough information that they realise this!

I have had to shift a lot of deadlines to make sure that I am ready to teach for this weekend. On top of that I’ve been writing a paper that is due on the 17th of November, as well as working on many other things. How did I manage this? I quickly looked across my existing resources (and remember I’m at half-speed, so I’ve had to schedule half my usual load) and broke things down into: things that had to happen before this teaching trip, and things that could happen after. I then looked at the first list and did some serious re-arrangement. Let’s look at some of these individually.

Blog posts, which are usually prepared 1-2 days in advance, are now written on the day. My commitment to my blog is important. I think it is valuable but, and this is key, no-one else depends upon it. The blog is now allocated after everything else, which is why I had my lunch before writing this. I will still meet my requirement to post every day but it may show up some hours after my usual slot.

I haven’t been sleeping enough, which is one of the reasons that I’m in such a bad way at the moment. All of my deadlines now have to work around me getting into bed by 10pm and not getting out before 6:15am. I cannot lose any more efficiency so I have to commit serious time to rest. I have also built in some sitting around time to make sure that I’m getting some mental relaxation.

I’ve cut down my meeting allocations to 30 minutes, where possible, and combined them where I can. I’ve said ‘no’ to some meetings to allow me time to do the important ones.

I’ve pushed off certain organisational problems by doing a small amount now and then handing them to someone to look after while I’m in Singapore. I’ve sketched out key plans that I need to look at and started discussions that will carry on over the next few days but show progress is being made.

I’ve printed out some key reading for plane trips, hotel sitting and the waiting time in airports.

Finally, I’ve allocated a lot of time to get ready for teaching and I have an entire day of focus, testing and preparation on top of all of the other preparation I’ve done.

What has happened to all of the deadlines in my life? Those that couldn’t be moved, or shouldn’t be moved, have stayed where they are and the rest have all been shifted around, with the active involvement of other participants, to allow me room to do this. That is what happens in the world. Very few people have a world that is all fixed deadline and, if they do, it’s often at the expense of the invisible deadlines in their family space and real life.

I did not learn how to do this by somebody insisting that everything was equally important and that all of their work requirements trumped my life. I am learning to manage my time maturely by thinking about my time as a whole, by thinking about all of my commitments and then working out how to do it all, and to do it well. I think it’s fair to say that I learned nothing about time management from the way that my assignments were given to me but I did learn a great deal from people who talked to me about their processes, how they managed it all and through an acceptance of this as a complex problem that can be dealt with, with practice and thought.

 


Stages of Acceptance

Another short post while I get my head back from the migraine sequence I’ve been in.

I was speaking to someone from industry about some interesting ideas in networking and we had a great meeting because we were constantly agreeing on the resistance to new ideas. There’s a pretty standard set of responses, indicating the evolution of acceptance over time:

  1. It will never work.
  2. It may work but it won’t work here.
  3. Of course we should do that.

What we were discussing was currently in the stage 1/2 phase. Even where people could see its utility, they had a really good reason why it wouldn’t happen here. The first is straight out denial, of course. The second is special pleading, where a set of circumstances are identified as to why a general case (or accepted idea) does not apply here. The last is just plain old Human nature – I told you so.

We see so much separation between the different communities of practice across the disciplines and, regrettably, it’s possible for teaching practitioners to be (effectively) at stage 1 when the educational researchers and designers are at stage 3. Returning to Gladwell’s three requirements for the stickiness of idea, the environment in which the idea is presented and received makes a big difference: context is everything.

I suspect that next year will be one of building bridges for me, between one community and the next. Bridge building is essential if people will be able to walk from one state to another. The term Pontifex (bridge builder) is disputed in origin and is co-opted by churches now, but the existence of the term, whether it originally referred to roads or bridges, emphasises the importance of the role of the joiner, the people who brings things together.

Oh, good, another challenge. 🙂


Place holder post – my apologies

Hi everyone,

I’m home sick today and have been suffering from a string of migraines (really the same one but coming in hard) over the past few days. I’ve been too busy to take time off and, unsurprisingly, I haven’t been able to shake the actual condition, I’ve been treating the symptoms. One of the things about migraine, for those who get them, is that they don’t just make your head hurt, they shake up your brain. Because of this I accidentally released a post this morning that should have stayed queued until the person quoted had had a chance to review it. I’ve made that post private, pending any changes, and apologise for any inconvenience caused.

I may have to take some time off posting long things while I get better but I hope to be back to normal posting soon. (And, if you’re wondering, this took me about an hour to write. If you’re sick, stay home and rest before it goes crazy, people!)

My best wishes and ‘safe’ thoughts to those who are in the path of Sandy.

Regards,
Nick.


Another semester over – what have I learned?

Monday the 29th marks the last official teaching activities, barring the exam and associated marking, for my grand challenges in Computer Science course. It’s been a very busy time and I’ve worked very hard on it but my students have worked even harder. Their final projects are certainly up where I wanted them to be and I believe that the majority of the course has gone well.

However, I’m running some feedback activities this week and I’ll find out how I can make it better for next year. At this stage we look like we’re going to have a reasonably large group for next year’s intake – somewhere in the region of 10-20 – and this is going to change how I run the course. Certain things just won’t work at that scale unless I start to take better advantage of group structure. I’ve already learnt a lot about how hard it is to connect students and data and, in our last meeting, I commented that I was thinking about making more data available in advance. Well, maybe, was the reply from students but we learned so much about how the data in the world is actually stored and treated.

Hmm. Back to the drawing board maybe – but also I’m going to wait for all of the final feedback.

Do I have students who I would happily put out in front of a class to run it for a while, doubly so for a community involvement project, with the confidence that they’ll communicate confidently, competently and with passion? Well, yes, actually – although there’ll be a small range. (And now I’ve just made at least three people paranoid – that’s what you get for reading my blog.)

There is so much going on that the next two months are going to be pretty frantic. Next year is already shaping up to be a real make-or-break year for my career and that means I need to sit down with a list of things that I want to achieve and a list of things that I am and am not prepared to do in order to achieve things. The achievement list is going to be a while coming, as goal lists always are, but the will/won’t/want list is forming. Here’s a rough draft.

  1. I still want to teach and be pretty involved in teaching. That’s easy as I’m not senior or research-loaded enough to get out of teaching. (I don’t really have a choice.
  2. I need to have more time to work on my non-work projects. I’ve just spent all of a Sunday working and the only reason I stopped was that I couldn’t spell constructivist reliably any more. (Yes, that just took three tries.)
  3. I want to have enough time to spend time with my students and not looked rushed or feel guilty about the time.
  4. I want to have the time to be able to help out any colleagues who could use my assistance AND I want to have the time to be able to seek help from my colleagues!
  5. I don’t want to take on anything that I have to give up on, or push to the sidelines for next year.

So, obviously, it all boils down to time, planning and allocation of priorities. With that in mind, I’ll wish you a happy Monday or good weekend. I’m going to have some dinner.


I am a potato – heading towards caramelisation. (Programming Language Threshold Concepts Part II)

Following up on yesterday’s discussion of some of the chapters in “Threshold Concepts Within the Disciplines”, I finished by talking about Flanagan and Smith’s thoughts on the linguistic issues in learning computer programming. This led me to the theory of markedness, a useful way to think about some of the syntactic structures that we see in computer programs. Let me introduce the concept of markedness with an example. Consider the pair of opposing concepts big/small. If you ask how ‘big’ something is, then you’re not actually assuming that the thing you’re asking about is ‘big’, you’re asking about its size. However, ask someone how ‘small’ something is and there’s a presumption that it’s actually small (most of the time). The same thing happens for old/young. Asking someone how old they are, bad jokes aside, is not implying that they are old – the word “old” here is standing in for the concept of age. This is an example of markedness in the relationship between lexical opposites: the assumed meaning (the default) is referred to as the unmarked form, where the marked form is more restrictive (in that it doesn’t subsume both concepts) and it is generally not the default. You see this in gender and plural forms too. In Lions/LionessesLions is an unmarked form because it’s the default and it doesn’t exclude the Lionesses, whereas Lionesses would not be the general form used (for whatever reasons, good or bad) and excludes the male lions.

Why is this important for programming languages? Because we often have syntactic elements (the structures and the tokens that we type) that take the form of opposing concepts where one is the default, and hence unmarked, form. Many modern languages employ object-oriented programming practices (itself a threshold concept) that allow programmers to specify how the data that they define inside their programs is going to be used, even within that program. These practices include the ability to set access controls, that strictly define how you can use your code, how other pieces of code that you write can use your code, and how other people’s code can use it, as well. The fundamental access control pairs are public and private, one of which says anyone can use this piece of code to calculate things or can change this value, the other restricts such use or change to the owner. In the Java programming language, public dominates, by far, and can be considered unmarked. Private, however, changes the way that you can work with your own code and it’s easy for students to get this wrong.  (To make it more confusing, there is another type of access control that sits effectively between public and private, which is an even more cognitively complex concept and is probably the least well understood of the lot!) One of the issues with any programming language is that deviating from the default requires you to understand what you are doing because you are having to type more, think more and understand more of the implications of your actions.

However, it gets harder, because we sometimes have marked/unmarked pairs where the unmarked element is completely invisible. If we didn’t have the need to describe how people could use our code then we wouldn’t need the access modifiers – the absence of public, private or protected wouldn’t signify anything. There are some implicit modes of operation in programming languages that can be overridden with keywords but the introduction of these keywords just doesn’t illustrate a positive/negative asymmetry (as with big/small or private/public), these illustrate an asymmetry between “something” and “nothing”. Now, the presence of a specific and marked keyword makes it glaringly obvious that there has been an invisible assumption sitting in that spot the whole time.

One of these troublesome word/nothing pairs is found in several languages and consists of the keyword static, with no matching keyword. What do you think the opposite (and pair) of static is? If you’re like most humans, you’d think dynamic. However, not only is this not what this keyword actually means but there is no dynamic keyword that balances it. Let’s look at this in Java:

public static void main(String [] args) {...}
public static int numberOfObjects(int theFirst) {...}
public int getValues() {...}

You’ll see that static keyword twice.Where static isn’t used, however, there’s nothing at all, and this (by its absence) also has a definite meaning and this defines what the default expectation is of behaviour in the Java programming language. From a teaching perspective, this means that we now have a default context, with a separation between those tokens and concepts that are marked and unmarked, and it becomes easier to see why students will struggle with instance methods and fields (which is what we call things without static) if we start with static, and struggle with the concept of static if we start the other way around! What further complicates is this is that every single program we write must contain at least one static method, because it is the starting point for the program’s execution. Even if you don’t want to talk about static yet, you must use it anyway (unless you want to provide the students with some skeleton code or a harness that removes this – but now we’ve put the wizard behind the curtain even more).

One other point I found very interesting in Flanagan and Smith’s chapter was the discussion of barriers and traps in programming languages, from Thimbleby’s critique of Java (1999). Barriers are the limitations on expressiveness that mean that what you want to say in a programming language can only be said in a certain way or in a certain place – which limits how we can explain the language and therefore affects learnability. As students tend to write their lines of code as and when they think of them, at least initially, these barriers will lead the students to make errors because they haven’t developed the locally valid computational idiom. I could ask for food in German as “please two pieces ham thick tasty” and, while I’ll get some looks, I’ll also get ham. Students hitting a barrier get confusing error messages that are given back to them at a time when they barely have enough framework to understand what these messages mean, let alone how to fix them. No ham for them!

THIS IS AN IMPORTANT QUESTION!

Traps are unknown and unexpected problems, such as those caused by not using the right way to compare two things in a program. In short, it is possible in many programming languages to ask “does this equal that” and return an answer of true or false that does not depend upon the values of this or that, but where they are being stored in memory. This is a trap. It is confusing for the novice to try to work out why the program is telling her that two containers that have the value “3” in them are not the same because they are duplicates rather than aliases for the same entity. These traps can seriously trip someone up as they attempt to form a correct mental model and, in the worst case, can lead to magical or cargo-cult thinking once again. (This is not helped by languages that, despite saying that they will take such-and-such an action, take actions that further undermine consistent mental models without being obvious about it. Sekrit Java String munging, I’m looking at you.)

This way of thinking about languages is of great interest to me because, instead of talking about usability in an abstract sense, we are now discussing concrete benefits and deficiencies in the language. Is it heavily restrictive on what goes where, such as Pascal’s pre-declaration of variables or Java’s package import restrictions? Does the language have a large number on unbalanced marked/unmarked pairs where one of them is invisible and possibly counterintuitive, such as static? Is it easy to turn a simple English statement into a programmatic equivalent that does not do what was expected?

The authors suggested ways to dealing with this, including teaching students about formal grammars for programming languages – effectively treating this as learning a new language because the grammar, syntax and semantics are very, very different from English.(Suggestions included Wittgenstein’s Sprachspiel, language game, which will be a post for another time.) Another approach is to start from logic and then work forwards, turning this into forms that will then match the programming languages and giving us a Rosetta stone between English speakers and program speakers.

I have found the whole book very interesting so far and, obviously, so too this chapter. Identifying the problems and their locations, regrettably, is only the starting point. Now I have to think about ways to overcome this, building on what these and other authors have already written.