Human communication & behavior

This is the part of the series on getting better as a programmer. The articles are:

It is an indictment of the state of our discipline that I feel the need to defend human communication and behavior as a vital aspect of getting better at it. And yet, here we are, decades after the women who created our field were sidelined, after IBM decided to equate programming aptitude with being a socially awkward IBM engineer, and our society spent millions making sure everyone associated microcomputers only with males hiding in their parents basements. I still see many young engineers saying, “But I just want to write code!”

First, what code are you going to write? Some code is an experiment, trying a new approach to something, but that is basically lost unless you can communicate it. Most code is meant to be used to make some change in how humans interact with the world. Without understanding enough about human behavior and being good enough at communicating to talk to the people involved and establish what needs to happen, there’s no code to write.

Second, there is a limit to how far a single programmer can go. That limit may be enormous in some cases, but it is there. After that the multiple programmers must cooperate, and that requires they behave and communicate in a way to make that work. And even if a single programmer can get there, is that the right way? The earliest programmers on ENIAC considered working in pairs the normal approach, and this was rediscovered by the extreme programming community in the 1990’s.

And even if you are working by yourself, when you return to your own code six months or a year later, you need to communicate to yourself across time what you did before.

So, the problem is coordinating humans across time and space. First we’ll talk about some underpinnings of behavior, since its is the elicitation or prevention of behavior that our communicate aims at. Then we’ll look at the atomic, individual communication skills to develop, and then at the skills around interactive communication in groups.

Behavioral underpinnings

For programming purposes, communication is to result in particular behaviors happening or happening more often, or in preventing them from happening or making them happen less often. We rarely communicate in the discipline solely for the purpose of transmitting Dadaist poetry. So what drives behavior?

The answer from economics is rational self interest. But what is in someone’s interest may not be at all obvious to you. This may be from lack of information on your part, or just from lack of understanding what has utility to them. A Dane, dealing for the first time with some Asian cultures, may run afoul of the notion of face and thus be entirely unaware of a major piece driving their definition of self interest.

More importantly, behavioral economics adds a footnote to the whole field of economics: “only applies in academic models, any relationship to reality is incidental.” Most behavior is driven by operant conditioning, not any kind of direct evaluation of potential outcomes and personal utility functions.

The more useful scientific field for this purpose is applied behavior analysis, which is the elaboration of operant conditioning. A given behavior has an antecedant which triggers it and a consequence which either reinforces it, if the consequence increases the chance of the antecedant leading to that behavior more often in future, or punishes it, if the consequence would decrease the chance of the behavior. Don’t get hung up on the word “punishment” here. It’s a term of art for anything that will reduce the link between the antecedant and the behavior.

Punishment usually results not in a reduction of the behavior, but in a reduction of the visible behavior. The behavior was established, so something is reinforcing it. If the learner can figure out how to keep getting reinforced for it without you applying punishment, such as by doing it where you can’t see it, the behavior is not going away.

Reinforcement doesn’t have this problem. Experts in training today almost entirely avoid punishment.

What is reinforcing or punishing is individual. There may be common patterns. For instance, most parrots enjoy safflower seeds as a reward. On the other hand, some parrots may treat a scratch on their head as a reward, while others will bite your hand if you try it. Belugas apparently enjoy having their tongue tickled, but only by trainers that they like.

So when you are communicating, focus on trying to provide reinforcement and avoid punishment. At a very crude level, imagine reading, the following two warnings about identifying a common error in C from compiler messages:

  1. “If you’re stupid enough to confuse = and ==, this will go hard for you. Your program will fail to compile with a message like:”
  2. “It’s common to confuse = and ==. Look for these errors to find how to fix it in your program when it happens:”

The first is punishing. The consequence of mixing up = and == is you are judged stupid. The error messages mean that you have failed and the compiler punished you.

The second is reinforcing. First, it established that this is a common error and not a problem with us. This is negative reinforcement, that is, it is removing something unpleasant as opposed to giving something pleasant, which is positive reinforcement. Second, it sets up the error messages as antecedants for a behavior that gets reinforced by the program then compiling.

Individual skills

Now we come to the individual skills you need. The single most important one is active listening. That is, being to elicit information from someone and make sure that you understand what they are trying to tell you. You will have to deal with people whose thoughts are muddled and whose communication skills are poor, and this is the single, essential tool to do so. It is also the step on the way to interactive listening, also known as riffing on each other, improvising, or thinking collaboratively.

Everyone gets told to use active listening in school or coaching, and many people have sadly gotten the impression that it’s repeating someone’s words back to them. Done well, you are not only interpreting the words as you listen and fitting them into what you have already heard, you are examining all you have heard to find where you need to probe to get more or to clarify, where you see contradictions, and how much of the picture you have so far, and you are putting together a mental model of the other person’s communications abilities. And at the same time you are watching how they react to various ways you speak to them or ask questions and see what is reinforcing or punishing for them or you risk turning the experience into an interrogation. Doing it well is hard, intense work and requires practice.

When we don’t have someone we can use active listening on, we may have written records of varying levels of quality. So we have to talk about reading, and the skill level needed at it. It’s worth considering the six levels of the OECD’s international adult literacy survey:

Level Description Example
Below level 1 Seeking specific information without competing information. No need to understand text structure or other features. Looking for a bus route on a sign or the presence of ‘nuts’ on a food warning level.
Level 1 Read short texts looking for specific information stated identical or synonymous to the information given in the directions. Asked “What color is the truck?” and given the sentence, “The truck is red,” can find that the truck is red.
Level 2 Matching between the text and the information in it and the directions, and may require paraphrasing or low level inference. Given a bus timetable, say how often a particular route comes during the day.
Given a children’s book during which a character picks up three things, can list the three things.
Level 3 Understanding a potentially dense or lengthy text and following its main argument through. Working through a textbook. Reading a piece of popular nonfiction.
Level 4 Given one document, potentially lengthy and complicated, can synthesize information out of it that was not specifically laid out, or perhaps pulling information out that was not a central theme. Take a research paper and evaluate whether it is logically sound and its methods are relevant.
Given a lengthy autobiography, using side remarks and descriptions to reconstruct aspects of the author’s world.
Level 5 Like level 4, but now across multiple, possibly conflicting documents. Read the research literature on a topic and lay out what is known and how, what is in conflict, and who the major players and schools are.
Take a large collection of accounts of an event from newspapers, eye witness reports, and other sources and produce an analysis of what can be inferred about the event.

It is very interesting to look at the distribution of the population in various countries over these levels. In most such reports they don’t even distinguish between levels 4 and 5 because level 5 is generally 1% of the population, 2% in the most highly educated countries like Finland. But if you are faced with a mass of documents and code and old emails, level 5 literacy is what you need.

Now we look at the opposite direction: speaking and writing. Both are plagued with similar problems. The two most crucial are:

  1. You are not a good judge of whether your speech or writing is effective. If twenty people read your book and nineteen of them understand it, the one who didn’t probably has the problem. If none of them do, you have the problem. Your own perception is not important.
  2. Even if you think someone has understood what you have written or spoken, and they do, too, there’s a good chance they still do not. Your best bet is to have them explain it back to you, listening very actively, and see if what you learn from them matches what you tried to say.

The good news is that most people with similar backgrounds tend to misunderstand in similar ways. Once you’ve explained to enough people and then actively listened to them in turn you can often write down the questions they should be asking if they were actively listening to clarify the topic, and present them along with your speech or writing.

Each discipline and subfield also has its own jargon and idioms and ways of writing that those in the field have learned to interpret in a specific ways which, once you’ve learned it, lets you write more predictably for that audience, though less predictably for everyone else.

After this, it comes down to the detailed, precise work of learning to control the rhetorical tools of your language for your purposes, and, for speaking, learning to handle stage fright.

Interacting in groups

The skills we discussed were all one way, either receiving information from someone or pushing information on someone. In practice we need to be able to collaborate, which means doing both in a structured way so that we can build enough shared mental context to be able to make decisions together. My impression is that good skills at this are even rarer than level 5 literacy. During the pandemic there was much hand wringing over how hard it was to collaborate and communicate with each other. My mother was somewhat unsparing in her derision for this. She had been running a publishing business entirely remotely since the 1990’s, at the time with only email and weekly phone calls.

Now, before anything else, all parties involved must want to communicate in both directions. In many organizations this is not the case. A decision made at a position on the org chart closer to the executive team radiates away from the executive team. Communication in the other direction is halting at best.

Also, those involved must implicitly or explicitly agree that they are going to adjust how they communicate and how they make decisions and behave based on that communication in a way that they would not in isolation. Otherwise it is so much wasted effort. In very small groups, the usual social norms of humans being together tend to take care of this, but this kind of spontaneous organization does not scale, nor does it survive communication becoming asynchronous, slow, or difficult.

So then, how does a group of people communicate with each other in such a way that they can coordinate their goals and their individual behavior towards that goal? There is a particular structure to such discourse with specific parts (from Flores’s language action theory):

Requests and offers/promises may be about things outside the discourse (“will someone make coffee?”) or inside the discourse (“can someone please tell us what the current state of X is?” or “Bob, you’re the database expert, can you tell us what X would do to our performance?”).

Orthogonally, it is useful to divide up the work done in the discourse according to a model from Gerald Weinberg into motivational, organizational, and innovative. Motivational discourse provides people with the reinforcement to want to continue taking part in the discourse as opposed to tuning out and checking their email. Organizational discourse is around organizing what has been brought in so far. Innovative discourse brings in new material.

A meeting that consists of nothing but innovative declarations is people trying to outdo each other with crazy ideas and getting nothing done. You can have organizational declarations (“let’s set up all these in a table so we can see them next to each other”) and innovative requests (“hey, can you reuse that thing you were talking about last week for this?”) and all the other combinations.

This is far from the only one way of classifying discourse. There are dozens of coding schemes for discourse in the literature. But this one is fairly useful for thinking about group communication.

Then it becomes a question of the rituals and behaviors in which all this occurs. No one gets this perfect, and most of the time it’s kind of awkward and clunky at first with a new group. The smoothest group I ever saw was a cohousing business meeting that had been running continuously for twenty years. Thirty people efficiently went through an agenda with discussion, comment, and agreement on multiple items.

The biggest distinguishing feature of different settings is whether they are asynchronous or synchronous. In a synchronous setting, everyone in the group has their attention on one thing at a time, and there is no lag between steps in a discussion. In an asynchronous setting, each member directs their attention as they will at some point in time, such as responding to all new comments on a document, and there will be no further response until someone else does the same.

The worst case is somewhere in the middle, where everyone is pinged and interrupted by updates to an asynchronous discussion and so dragged in with partial context, losing whatever else they were thinking about in the process. Either this is urgent enough to make the discussion synchronous, or it can wait until you address it in your own time.

It is better not to think of choosing an asynchronous or synchronous setting. Instead, think about when to switch between them. That mostly depends on how fast the feedback cycle needs to be versus the time spent generating a piece of discourse. If you need to do active listening where each piece of discourse is produced in seconds and you will go back and forth dozens of times, clearly this should be done synchronously. If you need to spend six hours carefully thinking through the issues around an idea to produce your next piece of discourse in response, this is probably best done asynchronously. So in a synchronous meeting you can get to a point where everyone will need to spend a few hours by themselves asynchronously on something, have everyone record a task for themselves to do so, and move on to the next thing usefully done synchronously.

In any such setting, there must be moderation. Moderation is the equivalent of metacognition in our individual thinking. In small groups with well established practices, moderation may be done ad hoc, but it usually works best to have someone chosen to moderate. The moderator’s job is to direct the flow of discourse. Some examples of tasks that often fall to the moderator:

These can be done by anyone in the group. Particularly around psychological safety or making sure people are heard, the most socially senior members of the group often do this work even if they are not moderating. This is especially true when the source of problems is someone with higher organizational authority, such as a visiting manager or executive.

How to ascend

The best place to learn about behavior and applied behavior analysis is from Susan Friedman. It is not an exaggeration to say that she has directly or indirectly taught most of that field at this point. Learn the basic ABC (antecedant, behavior, consequence) structure, and the notion of learning via successive approximations of the behavior you want, chaining sequences of learned behaviors, incompatible alternatives, and errorless learning.

Probably the richest source of these ideas applied to human discourse is improvisational theatre. Improv has a very strict set of ethics and acceptable behavior on stage that they have developed to let people do that work. It is also a good place to learn active listening.

Developing high levels of literacy generally comes from learning a discipline that depends heavily on criticism and comparison of texts such as history or literature. Note, this does not mean that you take a course where you read a textbook. This is the level where you engage with piles of primary sources.

Turning to speaking and writing, there are lots of technical details of each to make them go smoothly. Toastmasters is a decent place to learn the technical details of speaking to an audience. For speaking one on one, volunteering to teach skills that you regard as basic to those who don’t have them, such as computer skills at a library or after school tutoring, is eye opening.

For writing, once you have your basics of grammar and spelling down, my favorite book on clear style in English is Williams’s Style: Toward Clarity and Grace, which contains the only real explanation that I’ve found of what makes prose clear or unclear to read. After that, there is no substitute for writing and having people read your work. Write small pieces and essays and get feedback on them quickly.

Finally, moderation. Keeping a group organized, motivated, and making progress is best learned in small groups with clear goals and a lack of giant egos. As you add conflicting goals, size, and ego, this all gets harder. The best person I know at this can take a roomful of prima donna doctors who all hate each other and come out with a consensus that they each believe was their idea.

This series is still being written. Subscribe to get emailed when each is section is posted: