Monday, July 20, 2020

Sad! How not to create a career structure: good intentions gone wrong


I worked for a company that tried to do a good thing for people's careers and promotion prospects, but it back-fired horribly and ended up hurting more than it helped. I'm going to tell you the story and draw some lessons from it. Of course, I've changed and obscured some details to protect the guilty.

Placid developers turning into a mob
(Sometimes doing the right thing badly can turn even placid software developers into a mob. Image source: Wikimedia Commons, License: Public Domain.)

The company

The company was a large corporation with several hundred software developers working in different divisions on different projects. There was a formal grade level for developers: a developer fresh out of college might be level 20 and an experienced and senior developer might be level 30. Each level had a pay band with a rigid cap; once you reached the cap, you could only get more money by promotion. The pay bands overlapped and people knew them. Everyone was keenly aware of their level and there was open discussion of who was on what level. 

The problem was, the standards and levels were inconsistent across and within departments. Some departments and managers were known to be 'generous' and others were known to be 'mean'. Some developers moved departments as the only way to get promoted, but there were problems with this approach too. Some departments had one set of rules for pay and levels, while others had different rules. In some cases, developers tried to move to other groups to get a promotion, but they were offered jobs at the bottom of the pay band at that level, which unfortunately was less money than they were currently on. Managerial inconsistencies had bad consequences for individuals too. In one case, a person got a big promotion and their manager left not long after. Their new manager felt they were underperforming and that they had been over-promoted. Some managers promoted based on performance alone, but others insisted on time served on a level.

The bottom line was, there were substantial inconsistencies and inequities and the software engineers were unhappy.

The learned organization

Fortunately, there was an active learned organization that helped software companies. One of the things this very learned organization did was produce career guidance, specifically, it produced a career hierarchy showing what software developers would be expected to do at different levels of seniority. As with all management solutions, it was a matrix. There were different skills in different areas and some areas were only applicable to more senior positions. To put it simply, they'd mapped out a grading structure and the skills and responsibilities of each grade.

On the face of it, this sounded like a perfect solution for my employer: why not roll out this grading structure and use it to decide people's levels?

The roll-out

My employer took the skills/grades matrix from the learned society and mapped it to the internal levels 20-30. The idea was, you could see what was expected of you at your level and what skills you needed to develop and the responsibilities you needed to take on to get a promotion. Sounds great!

They published this guidance to all developers.

Light the blue touch paper...

The fall-out

Here's what happened.

The people on high grades (around 30) knew they weren't going to be demoted and their salary wasn't going to go down. Most of them noticed that they weren't doing many of the things the skills/grades matrix said they should be doing. They found the whole thing hilarious. They openly joked about the grade/skills matrix and freely talked about all the things they weren't doing that the matrix said they should be.

The majority of people were on middling grades (23-27) and this was incendiary to them. Many of the people were doing more than what was expected of them at their grade level. In many cases, they were meeting the requirements two levels above their current level. The net results were urgent discussions with their managers about immediate promotions.

The middling grades people were furious, while the high-grade people were laughing about it. It wasn't a happy mix and management had to step in to stifle debate to calm people down.

Senior management soon realized this was explosive, so they backpedaled quickly. The roll-out program was canceled due to unexplained 'deficiencies in the process' and it 'not meeting business needs'. A review was promised, which as you might expect, never happened. The subject became taboo and senior management didn't attempt any further reform. 

Of course, this had its impact. The middling grades realized they had to leave to get career advancement and the senior people realized further advancement was unlikely. The people with get up and go got up and left.

What about the people on the lower grades? When the roll-out happened, they were very happy. For the first time, they had clear goals for promotion, and consistency meant they wouldn't have to leave their group to get promoted. They were upset when it was canceled because it was back to the old opaque system. When the review never happened, it dawned on many of them that the company wasn't serious about their futures.

Instead of being a positive change for the future, it set the company back several years.

Why did it go so badly wrong?

Solving the wrong problem

What problem was senior management trying to solve? There were two broad problems we faced as a company:

  • Current inequities and inconsistencies
  • Future inequities and inconsistencies

The skill/grade matrix was a solution to the second problem, but not the first. The first problem was the most serious and the skills/grade matrix just made it more visible. The senior management team had no plan to address the first problem.

The leadership applied the right solution to the wrong problem.

Overnight fix to a long-standing problem

Inconsistencies had built up over the course of about a decade, and there were reasons why things developed the way they did. Partly, it was company culture. 

As a general rule of thumb, entrenched problems take time to solve. Senior leadership plainly expected a magic wand, but that was never going to happen. They didn't put in enough effort post-launch to make the project successful.

Didn't listen/lack of inclusion

This was the main problem. Senior leadership should have talked to software developers to understand what their concerns really were. In short order, listening would have brought to the surface the issues with current inequities and it would have shown senior leadership that the plan wasn't going to work. The fact that developers weren't involved in discussions about their own future was telling.

Pretend it never happened

You can't put the genie back in the lamp. Senior management tried to brush the whole thing under the rug very quickly when it was apparent it was going wrong, which was the worst response they could have made. 

How should they have dealt with it?

Hindsight is a wonderful thing, but knowing what I know now, here's how I would have dealt with this situation differently.

  • Understand what the problem really is by talking to people. By people, I mean the people directly affected. I've learned never to rely on intermediaries who may be incentivized to mislead or tell you what you want to hear.
  • Deal with the worst cases up-front and as one-offs. A one-size fits all process can flounder when dealing with outliers, so it's better to deal with the most extreme cases individually. In this case, people who should be on much higher levels.
  • Trial the solution with a small group. Trying it on a group of about 20-30 software developers would have flushed out most of the problems.
  • Stick with it. Put the effort in to make it work, but have clear criteria for exiting if it doesn't work.

More specifically, I might have followed these policies.

  • Assuming no or very little money for promotions, I would have extended the pay bands at the bottom end. This would allow me to promote people without incurring extra costs. In the ideal world, you promote everyone who deserves it and give them the appropriate pay rise, but the ideal world doesn't exist.
  • I might reform the whole 20-30 levels, for example, I might call the levels something else, and then I would map people to new levels, including mapping some people to higher levels. An exercise like this allows you to correct all kinds of oddities, but of course, some people will be upset.
  • For people who were on higher levels than they should be, I would leave them there for a while. It's too damaging for an organization to make corrections on this scale - there were just too many people who were over-promoted. But I wouldn't promote these people further until their performance warranted it.

Saturday, July 11, 2020

The art of persuasion: pathos, logos, and ethos

The art of persuasion is ancient

In this blog post, I'm going to talk about three high-level approaches to persuasion that people have used for thousands of years: pathos, logos, and ethos. Aristotle codified them, hence their Greek names, but despite their ancient origins, they pop up in modern sales methods, in the speeches given by politicians, and in preachers' sermons. Understanding these basics will let you craft more effective speeches and emails.

(Martin Luther King was one of the best rhetoricians of the 20th century. King used pathos enormously effectively in his 'I have a dream speech'. Image source: Wikimedia Commons. Photographer: Rowland Scherman.)


Sadly, this is the weakest of the three, it's the appeal to logic; the use of facts and figures, and inference and deduction to make an argument. For example, if I were trying to make the case that the economy was great under my leadership, I might talk about high employment numbers, pay rises, and business growth. My chain of reasoning would be: the numbers are great due to my leadership, so you should vote for me. Let's look at a couple of real examples.

My first example is Winston Churchill's "Their finest hour speech" (you can read more analysis of this speech here):

"‘Hitler knows that he will have to break us in this Island or lose the war. If we can stand up to him, all Europe may be free and the life of the world may move forward into broad, sunlit uplands.’"

Note there are no numbers here, it's a chain of logic linking one idea to another, in this case, an if-then piece of logic.

John F. Kennedy also used logos. Here's an excerpt from his famous "We choose to go to the moon..." speech:

"Within these last 19 months at least 45 satellites have circled the earth. Some 40 of them were made in the United States of America and they were far more sophisticated and supplied far more knowledge to the people of the world than those of the Soviet Union."

Note the use of numbers to make the point that the United States was ahead of, and more advanced than the Soviet Union. Logos isn't just about making cold scientific claims, it can be about bashing your opponents with logic. 

Margaret Thatcher was a master speaker, and she used logos to batter her opponents:

"If the Labour Government is no longer able to act in the national interest, is there no alternative to the ruin of Britain? Yes, indeed there is - and that alternative is here at Brighton today."

(Leader's Speech, Brighton, 1976)

The point is, logos isn't about a mathematical deduction, it's about creating a chain of arguments to lead the audience to the conclusion that your point is true. 

In sales situations, logos is used in several ways, for example, a salesperson might say something like: "Our solution costs less on a yearly basis than competitor Y but has features A, B, and C that Y does not."


This is an appeal from authority, the idea is that the speaker has some kind of position that gives them special knowledge. The most obvious example is the old quote: "Trust me, I'm a doctor". Speakers use this device a lot to establish credibility, for example, you might hear people talk about years of government service, or their qualifications, or their awards. 

One of the best examples of ethos I've come across is Steve Jobs Stanford Commencement address of 2005. Pretty much, the whole speech is ethos, establishing his credibility with the audience. Here's a small extract:

"I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents’ garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4,000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30."

There are several ways speakers establish ethos. Sometimes, they talk about their education, or they talk about their experiences, or they talk about their awards. But how do you establish ethos if you have none of those things? The answer is, you can co-opt it from other people and organizations.

A salesperson might co-opt ethos by talking about the awards and success of their company or product, for example, "Product X was the biggest selling product in category Y, it's the industry standard." They also use external references from trusted sources. Gartner's magic quadrant analysis is widely used for a reason, it lends external credibility and is a great source of ethos. Success stories serve similar purposes too; you can use a quote from an industry figure to boost your credibility.


This is an emotional appeal to do something. It's is one of the most effective persuasive techniques, but it has to be used carefully; it's a blunt instrument that can undermine your argument. One of the clearest examples of pathos also illustrates the problem: "do as I ask or I kill this kitten".

I'm going to return to Winston Churchill and another of his famous speeches for my first example, here's a famous extract:

"I would say to the House, as I said to those who have joined this government: “I have nothing to offer but blood, toil, tears and sweat.”"

(Blood, toil, tears, and sweat)

Churchill's goal was to get the politicians and the people to join him in an existential struggle against fascism. He used vivid imagery to illustrate the struggle ahead. If logos is the use of facts and figures, pathos is the use of adjectives and adverbs.

One of my other favorite speakers is Martin Luther King, here's an extract from his most famous speech:

"I have a dream that one day even the state of Mississippi, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice."

King is using evocative language to appeal to his audience, to motivate them to appeal for change.

I've seen salespeople use pathos in a clever way when they ask a prospect what the success of product would mean for them. The crude example here is telling someone they would look good in a sports car. Less crudely, the success of a product could lead to promotions. This has to be artfully done, but I've seen it used very effectively.

Using them in a speech

Not every speech uses all the elements of persuasion, but many of them do. Let's imagine you're promoting your company's product at a convention and had a short slot to do it. Here's how you might use pathos, logos, and ethos.

Speech Commentary 
In 2020, Gartner placed us in the leader quadrant of their X magic quadrant for the fifth year running.
Ms A, Vice-President for Important Things at Big Company B said that Product Y was a game-changer for them.
She said it reduced design costs by 20% and reduced time-to-market by 15%. Her experience is common, which is why we have the largest market share and we're growing more rapidly than any other company in the sector. We're becoming the industry standard. Logos.
But it's not just about money. Because we reduce design flow issues, we reduce low-level re-work and rote work, so we free up engineers' time to be more creative and use their skills in more engaging and interesting ways. Our software enabled Dr S to design H, which won the industry design award and got him on the cover of Trade Publication. Pathos

This is a little crude, but you get the general idea.

Churchill, Kennedy, and King did not just make up their speeches. They knew very well what they were doing. Churchill and King in particular were master rhetoricians, adept at using words to change the world. Knowing a little of rhetoric can pay dividends if you're trying to be more persuasive.

Reading more

A lot of books on rhetoric are unreadable, which is odd given that rhetoric is about communication. Here are some of the ones I like:

  • Thank You for Arguing, Fourth Edition: What Aristotle, Lincoln, and Homer Simpson Can Teach Us About the Art of Persuasion - Jay Heinrichs
  • Words Like Loaded Pistols: Rhetoric from Aristotle to Obama - Sam Leith

Rhetoric for managers series

This post is part of a series of posts on rhetoric for managers. Here are the other posts in the series:

Thursday, July 2, 2020

Managers must actively listen: foundational skills

Managers need to actively listen

Almost every MBA or business school degree has units on communications, including spoken communication. A great deal of attention is lavished on learning how to give speeches and how to communicate ideas, but no time is given to a more important management skill: how to actively listen. 

(If a dog can listen attentively, why can't you? Image credit: Wikimedia Commons. License: Public Domain.) 

If you're thinking of listening as a passive skill, you've got it wrong. If you think of it just as letting someone speak, you're mistaken. If you think of it as something you can just do, you've totally misunderstood it.

By actively listening, I mean understanding the true meaning of what someone says and not just the superficial content. I mean actively probing for the key underlying messages and feelings. I mean communicating back to the speaker that you've heard and understand what they have to say by your choice of gestures, noises, and responses.

By actively listening, you can understand what's really going on and earn trust as a manager. You can demonstrate empathy, respect, and the value you place on people. 

In the last few years, the 'fake it until you make it' business meme has done the rounds, meaning pretending to be something you're not so you can get promoted to be what you were pretending to be. Active listening is the antithesis of this approach; it's all about communicating genuine human warmth. You can't fake caring.

Listen without distraction

Our first listening lesson is the simplest: listen with undivided attention and communicate that your attention is undivided. This means no ringing phones and no beeping devices. Turn off or silence your phone or watch. Turn off or silence notifications on your computer - better still, close up your laptop or turn your screen away. 

If at all possible, you should sit close to someone without distractions or obstructions. If you have an office, get up from behind your desk so you can sit with the person without diversion. Sitting behind your desk communicates power, and it's even worse if your monitor even partially obscures your view. If you don't have an office, go to a meeting room where you won't be distracted. On Zoom or video conferencing, close down any distracting windows and look at the person only (not other computer windows or something else in your home office).

These things sound simple, but it's surprising how many people don't understand the basics of turning off distractions. If you want people to talk, you need to give them the right environment - and that means you have to take action.

Let's imagine you wanted to talk to your manager about a difficult situation at work. Perhaps you suspect you're the victim of sexual or racial harassment, or you've seen something in another department you think you should report, or you're unhappy with a colleague. Each of these situations is difficult for you to talk about and requires you to trust your manager. Now imagine when you finally screw up the courage to see them, they sit behind their desk fiddling with their phone, their computer pings every minute, and they keep on turning away to check their monitor. Do you think you would tell a manager who behaves like this something that's risky and that requires trust? Do you want to be the kind of manager your team trusts, or do you just want to just fake it? Being authentic requires effort on your part.

Just making time for people isn't enough. You have to understand what's expected of you and what you mustn't do.

Listening isn't problem-solving

One of the big mistakes managers make is slipping into problem-solving mode as soon as someone starts discussing a problem or issue. For people from a technical background, this is a comforting response to a difficult situation, after all, solving problems is what technical people are trained to do. But this might be the exact opposite of what the person wants. They might just want to talk through a difficult or disturbing situation and be heard. The other risk is, by offering solutions too soon, you might block more serious content. Sometimes, someone might come to see you with a 'presenting problem' that's relatively innocuous; they're seeing if they can trust you before disclosing the bigger issue. Before suggesting any solution, you should make sure you've heard the totality of what someone has to say. Your first goal should be making sure the person feels heard.

The biggest risk of active listening for managers

I do have to address one of the big risks of listening: role confusion. You are a manager, not a counselor. The art of listening as a manager is to know your limits and not try to be a cheap therapist. Remember, as a manager, you may have to use the performance management process on someone which may be next to impossible if the person is relying on you as a counselor. If you've allowed an unhealthy pseudo-counseling relationship to develop, you've put yourself in a career-limiting situation. At all times, you must remember you are a manager.

Listening leads to acting - sometimes

There's another key difference between a therapist and a manager. As a manager, you need to act on what people tell you. You don't need to act all the time, sometimes people need to vent and your role is solely to listen and communicate you've heard what they have to say. But on other occasions, you have to act - in fact, acting is the ultimate in active listening: 'I've heard what you have to say and I'm going to do something about it'. If you do nothing in response to what you hear, ultimately people will do something themselves: they'll leave and go somewhere else.

What's next?

I'm going to blog a bit more about listening. I'm going to focus on some micro-skills you can use to communicate you're listening, and provide examples and exercises you can follow. These blog posts are not about faking listening, they're about being human and about your role for your team - demonstrating why you're a manager.


The best single-volume book I've come across that covers the skills of active listening is "Swift to hear" by Michael Jacobs (ISBN: 978-0281052608). The book is aimed at people involved in pastoral care, but it focuses on technical skills, making it a great resource for anyone who needs to listen attentively.

Friday, June 26, 2020

Drunk and disorderly: not funny at company events

Loutishness isn't funny

Maybe I'm getting more puritanical as I get older, but I'm finding myself less and less tolerant of drunken loutishness at corporate events. I've seen too many instances where people have got away with poor behavior to the detriment of others and to the detriment of the organization as a whole. Let me tell you my stories; I've disguised some of the details to protect the guilty.

(Great when enjoyed responsibly, not so great when it leads to bad behavior on company time. Image credit: Wikimedia Commons (klimkin). License: Creative Commons Zero)

Ruining the lawn

One fine summer evening, the company I worked for held a large-scale open-air event. The aim was to play summer outdoor games and enjoy a drink or two in the company of our colleagues. The venue was extremely proud of its grounds and had obviously spent a lot of money creating and maintaining immaculate grass playing surfaces. Some of my colleagues realized there was no limit at the bar and set out to get drunk on company money; a task they succeeded at admirably. One of them decided it would be really funny to plant his glass in the middle of the grass. He turned his glass upside down and stomped it into the lawn. His friends thought this was funny, so they did it too. The next day, the groundskeepers discovered the stomped glasses and had to fix the damage, which meant the venue was unavailable for others. Net result? The company paid a penalty to repair the lawn and was banned from the venue (the only venue like it for miles). Everyone knew who the stompers were, but they got away with it.

The Christmas party

Christmas time seems to bring out the worst in some people at corporate events. I was at a large-scale company Christmas lunch where a lot of alcohol had been consumed. One of the employees decided it would be fun to start throwing food at other tables. The food fight escalated until someone soaked a small tablecloth in water, screw it up into a ball, and threw it at another table. It hit the other table like a bomb, exploding a carafe of red wine, splattering everyone in red wine and glass fragments. This was plainly very upsetting for the people on the table and brought the event to an end. Obviously, the company was banned from the venue, but this time I believe someone did have a word with one of the perpetrators and there was managerial discussion of curtailing bad behavior.

The overseas trip

Corporate events held away from home can be a lot of fun, but there can be problems too. I was at a corporate event held in a resort venue and I witnessed some unfortunate things. There was a mix of company people, who were getting everything for free, and vacationers, who had paid to stay at the resort. It was not a happy combination. The company people were away from family, off the leash, and with unlimited free alcohol. On the whole, their behavior towards paying guests was disrespectful at best. At one of the resort bars, I got chatting to a vacationing couple who complained to me about poor treatment from my work colleagues. The vacationers were very unimpressed by the rude and drunken behavior they saw. This was not a good company image to project.

Company culture and drunkenness

I'm happy to say, I haven't seen drunken behavior at my current employer and I think I know why. The company has taken great pains with recruitment and boorish behavior just isn't part of company culture. As a manager, I would be on top of drunken misbehavior immediately, and I believe my fellow managers would do the same too.

Advice to managers: stop it dead

Along with most managers, I've read my fair share of legal documents, case studies, and guidance. Pulling all this together, here are my thoughts:

  • You are never off-the-clock if you're at a company event or with company people. Even if a few work colleagues go out for a drink, it's still a company event.
  • Loutish behavior is not tolerable and there have to be consequences. Just as the workplace must be safe, it must be safe to be with work colleagues. It must be safe for non-employees to be around employees too. Managers need to jump on instances of bad behavior immediately.
  • Everyone must know what the rules are and there must be reminders. Managers must make it clear to new employees what's acceptable and what isn't. It's only fair that everyone knows what's expected of them.

I'm not against people having a drink at company events, I'm not even against people getting drunk at events, but I am against harmful behavior toward others. I want everyone to feel safe and to be safe.

Saturday, June 20, 2020

Being more persuasive in speech: anaphora

There are a host of rhetorical techniques known since antiquity to make you more persuasive and compelling as a speaker. Anaphora is one of them and it's in my top three convincing rhetorical techniques. It’s been used by everyone from Charles Dickens to Winston Churchill to Chance the Rapper. I’m going to tell you what it is and how you can use it.

Anaphora is the repetition of the same phrase at the start of adjacent clauses in a sentence or paragraph. Here’s an example from Charles Dickens' ‘A Tale of Two Cities’. The anaphora is in bold.

It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair…
-Charles Dickens – A Tale of Two Cities

Another good example of anaphora is the poem ‘If’ by Rudyard Kipling, here’s an extract:

If you can dream—and not make dreams your master;
   If you can think—and not make thoughts your aim;
If you can meet with triumph and disaster
   And treat those two impostors just the same;
If you can bear to hear the truth you’ve spoken
   Twisted by knaves to make a trap for fools,…
-If – Rudyard Kipling

Pretty much the entire poem is anaphora which he uses to build towards his point at the end.

Anaphora works by the repetition of the same words to link ideas into a coherent and memorable flow. It reinforces the point in an elegant way.

As you've seen, anaphora is effective in writing, but it also works well in speeches too. It can have a compelling and convincing effect as we’ll see. I’m going to play you an example of one of the most famous examples of anaphora. This time, I’ll give you some context for the speech before providing the audio link.

The year is 1940. France had fallen to the Nazi hordes and the disaster at Dunkirk had just occurred. The British people expected Hitler’s armies to cross the channel and invade imminently. Britain stood alone.

The place is the House of Commons in London. MPs too expected an invasion and expected Britain to fall. They knew many of their constituents, families, and friends would die.

And the person is Winston Churchill, the new Prime Minister. His job was to rally the nation and prepare the country for invasion and an existential fight.

Here’s the most famous piece of his speech - YouTube. Listen to the anaphora.

(Image credit: WikiMedia Commons - open source)

We shall fight… we shall never surrender.

The effect of this speech was electrifying. A friend told Churchill his speech was worth 1,000 guns. Opposition politicians openly wept and pledged support for Churchill. And this speech changed the national mood from one of defeat to one of defiance in the face of disaster.

So how might you use anaphora? Let’s imagine you’re giving a talk where you’re trying to persuade your company to spend resources on training, you could say:

The research shows that investing in training gives returns on staff retention, recruitment, and efficiency.

Or you could use anaphora to say:

Investing in training leads to higher staff retention and greater employee engagement,
Investing in training makes it easier to recruit good-quality people,
Investing in training lets us do our jobs more efficiently,
It’s time to invest in training.

I’ve used anaphora in speeches and in writing. You can too. It’s a great device to use when you have multiple points you want to make and you need to link them together.

Let’s listen to how Chance The Rapper used anaphora to link his points together: YouTube. The 'Oh now' anaphora allows him to construct a series of lyrical points and link them together with the same structure to make them work together in a catchy way. (As an aside, rap and hip-hop artists make incredibly inventive use of language - something they never get credit for.)

If anaphora is good enough for Charles Dickens, Winston Churchill, and Chance The Rapper, surely, it’s good enough for you too?

Reading more

This blog post is one in a series of posts on practical rhetoric. Here's the series:

Saturday, June 13, 2020

Death by rounding

Round, round, round, round, I get around

Rounding errors are one of those basic things that every technical person thinks they're on top of and won't happen to them, but the problem is, it can and does happen to good people, sometimes with horrendous consequences. In this blog post, I'm going to look at rounding errors, show you why they can creep in, and provide some guidelines you should follow to keep you and your employer safe. Let's start with some real-life cases of rounding problems.

(Rounding requires a lot of effort. Image credit: Wikimedia Commons. License: Public Domain)

Rounding errors in the real world

The wrong rounding method

In 1992, there was a state-level election in Schleswig-Holstein in Germany. The law stated that every party that received 5% or more of the vote got a seat, but there were no seats for parties with less than 5%. The software that calculated results rounded the results up (ceil) instead of rounding the results down (floor) as required by law. The Green party received 4.97% of the vote, which was rounded up to 5.0%, so it appeared the Green party had won a seat. The bug was discovered relatively quickly, and the seat was reallocated to the Social Democrats who gained a one-seat majority because of it [Link]. 

Cumulative rounding

The more serious issue is cumulative rounding errors in real-time systems. Here a very small error becomes very important when it's repeatedly or cumulatively added.

The Vancouver Stock Exchange set up a new index in January 1982, with a value set to 1,000. The index was updated with each trade, but the index was rounded down to three decimal places (truncated) instead of rounding to the nearest decimal place. The index was calculated thousands of times a day, so the error was cumulative. Over time, the error built up from something not noticeable to something very noticeable indeed. The exchange had to correct the error; on Friday November 25th, 1983 the exchange closed at 524.811, the rounding error was fixed, and when the exchange reopened, the index was 1098.892 - the difference being solely due to the rounding error bug fix [Link].

The most famous case of cumulative rounding errors is the Patriot missile problem in Dharan in 1991. A Patriot missile failed to intercept a Scud missile, which went on to kill 28 people and injured a further 98. The problem came from the effects of a cumulative rounding error. The Patriot system updated every 0.1s, but 0.1 can't be represented exactly in a fixed point system, there's rounding, which in this case was rounding down. The processors used by the Patriot system were old 24-bit systems that truncated the 0.1 decimal representation. Over time, the truncation error built up, resulting in the Patriot missile incorrectly responding to sensor data and missing the Scud missile [Link].  

Theoretical explanation of rounding errors

Cumulative errors

Fairly obviously, cumulative errors are a sum:

E = ∑e

where E is the cumulative error and e is the individual error. In the Vancouver Stock Exchange example, the mean individual rounding error when rounding to three decimal places was 0.0005. From Wikipedia, there were about 3,000 transactions per day, and the period from January 1st 1982 when the index started to November 25th, 1983 when the index was fixed was about 473 working days. This gives an expected cumulative error of about 710, which is in the ballpark of what actually happened. 

Of course, if the individual error can be positive or negative, this can make the problem better or worse. If the error is distributed evenly around zero, then the cumulative error should be zero, so things should be OK in the long run. But even a slight bias will eventually result in a significant cumulative error - regrettably, one that might take a long time to show up.

Although the formula above seems trivial, the point is, it is possible to calculate the cumulative effect of rounding errors.

Combining errors

When we combine numbers, errors can really hurt depending on what the combination is. Let's start with a simple example, if:

z = x - y 

sis the standard error in z
sis the standard error in x
sis the standard error in y


sz  = [s2x + s2y]1/2

If x and y are numerically close to one another, errors can quickly become very significant. My first large project involved calculating quantum states, which included a formula like z = x - y. Fortunately, the rounding was correct and not truncated, but the combination of machine precision errors and the formulae above made it very difficult to get a reliable result. We needed the full precision of the computer system and we had to check the library code our algorithms used to make sure rounding errors were correctly dealt with. We were fortunate in that the results of rounding errors were obvious in our calculations, but you might not be so fortunate.

Ratios are more complex, let's define:

z = x/y

with the s values defined as before, then:

sz /z = [(sx/x)2 + (sy/y)2]0.5

This suffers from the same problem as before, under certain conditions, the error can become very significant very quickly. In a system like the Patriot missile, sensor readings are used in some very complex equations. Rounding errors can combine to become very important.

The takeaway is very easy to state: if you're combining numbers using a ratio or subtracting them, rounding (or other errors) can hurt you very badly very quickly.

Insidious rounding errors

Cumulative rounding errors and the wrong type of rounding are widely discussed on the internet, but I've seen two other forms of rounding that have caught people out. They're hard to spot but can be damaging.

Rounding in the wrong places - following general advice too closely

Many technical degrees include some training on how to present errors and significant digits. For example, a quantity like 12.34567890 ∓ 0.12345678 is usually written 12.3 ∓ 0.1. We're told not to include more significant digits than the error analysis warrants. Unfortunately, this advice can lead you astray if you apply it unthinkingly.

Let's say we're taking two measurements:

x = 5.26 ∓0.14
y = 1.04 ∓0.12

following the rules of representing significant digits, this gives us

x = 5.3 ∓0.1
y = 1.0 ∓0.1

If :

z = x/y

then with the pre-rounded numbers:

z = 5.1 ∓ 0.6

but with the rounded numbers we have:

z = 5.3 ∓ 0.5

Whoops! This is a big difference. The problem occurred because we applied the advice unthinkingly. We rounded the numbers prematurely; in calculations, we should have kept the full precision and only shown rounded numbers for display to users.

The advice is simple: preserve full precision in calculations and reserve rounding for numbers shown to users.

Spreadsheet data

Spreadsheets are incredible sources of errors and bugs. One of the insidious things spreadsheets do is round numbers, which can result in numbers appearing not to add up. 

Let's have a look at an example. The left of the table shows numbers before rounding. The right of the table shows numbers with rounding (suppressing the decimal places). The numbers on the right don't add up because of rounding (they should sum to 1206). 

  No round   Round
 Jan121.4   Jan  121
 Feb 251.4  Feb 251
 Mar 311.4  Mar 311
 Apr 291.4  Apr 291
 May 141.4  May 141
 Jun 91.4  Jun 91
 TOTAL 1208.4  TOTAL 1208

An insidious problem occurs rounded when numbers are copied from spreadsheets and used in calculations - which is a manifestation of the premature rounding problem I discussed earlier.

1.999... = 2, why 2 != 2, and machine precision

Although it's not strictly a rounding error, I do have to talk about the fact that 1.999... = 2. This result often surprises people, but it's an easy thing to prove. Unfortunately, on machines with finite precision, 1.9999... == 2 will give you False! Just because it's mathematically true, doesn't mean it's true on your system.  

I've seen a handful of cases when two numbers that ought to be the same fail an equality test, the equivalent of 2 == 2 evaluating to False. One of the numbers has been calculated through a repeated calculation and machine precision errors propagate, the other number has been calculated directly. Here's a fun example from Python 3:

1 == (1/7) + (1/7) + (1/7) + (1/7) + (1/7) + (1/7) + (1/7)

evaluates to False!

To get round this problem, I've seen programmers do True/False difference evaluations like this:

abs(a - b) <= machine_precision

The machine precision constant is usually called epsilon.

What to watch for

Cumulative errors in fixed-point systems

The Patriot missile case makes the point nicely: if you're using sensor data in a system using fixed-point arithmetic, or indeed in any computer system, be very careful how your system rounds its inputs. Bear in mind, the rounding might be done in an ADC (analog-to-digital converter) beyond your control - in which case, you need to know how it converts data. If you're doing the rounding, you might need to use some form of dithering.

Default rounding and rounding methods

There are several different rounding methods you can use; your choice should be a deliberate one and you should know their behavior. For example, in Python, you have:

  • floor
  • ceil
  • round - which uses banker's rounding not the school textbook form of rounding and was changed from Python 2 to Python 3.

You should be aware of the properties of each of these rounding methods. If you wanted to avoid the Vancouver Stock Exchange problem, what form of rounding would you choose and why? Are you sure?

A more subtle form of rounding can occur when you mix integers and floating-point numbers in calculations. Depending on your system and the language you use, 7.5/2 can give different answers. I've seen some very subtle bugs involving hidden type conversion, so be careful.

Premature rounding

You were taught to only present numbers to an appropriate numbers of decimal places, but that was only for presentation. For calculations, use the full precision available.


Be extremely careful copying numbers from spreadsheets, the numbers may have been rounded and you may need to look closer to get extra digits of precision.

Closing thoughts

Rounding seems like a simple problem that happens to other people, but it can happen to you and it can have serious consequences. Take some time to understand the properties of the system and be especially careful if you're doing cumulative calculations, mixed floating-point and integer calculation, or if you're using a rounding function.

Saturday, June 6, 2020

(De)motivational speakers

I’ve heard motivational speakers give messages completely contrary to company values and I’ve heard a motivational speaker encourage people to resign. I’ve heard speakers that made me feel good to be a part of the company and I’ve heard speakers that made me think. 

It might seem like a good thing for a company to bring in a motivational speaker, but it needs thought as we’ll see. Let’s start with the bad because that’s always more fun.

(Motivational speaking, old school. Image credit: Wikimedia Commons)

At one company I worked at, we had a talk given by a mountaineer who had climbed Mount Everest. They vividly described the struggle of the team to get to the top; the cold, the physical demands, the oxygen deprivation. The expedition got close to the summit, but some of the team were struggling and it was difficult to move forward together. The leadership made the decision to leave some of the team behind and make for the summit with just a handful. The small group made it to the summit and took their pictures at the top of the world. They celebrated their glorious achievement and the speaker spoke movingly of the elation they felt. Then they started to make their way down, meeting up with their colleagues they’d left behind. The speaker told us how bitterly disappointed the people who were left behind were. The leadership had to carefully manage relationships with those they’d left behind to get everyone off the mountain and safely back to base camp. Once they were back at base camp, it didn’t matter anymore because everyone dispersed.

It was a great talk delivered well, but…

The company I worked for at the time had a big thing about teamwork and carrying everyone with you. It was all about the collective way forward. But the talk seemed to have a couple of underlying themes; you need a big team to get to the top and if people are holding you back, you cut them loose so the high performers can achieve their goals. It seemed to me that the talk was completely at odds with the company’s values. Was the company now advocating that we leave people behind? As I heard this story, I wondered about the people in the audience, did they all identify with the group that made it to the summit, or did they think they might be in the group left behind? What does it mean to work in a company where you might be left behind so others can get to the summit?

A different company I worked for was having some trouble retaining staff but wanted to grow. At a company meeting, we had a speaker who had sailed in a major race. The speaker was great, he spoke about his impoverished background, how he stumbled across sailing but loved it. He told us how he sacrificed a great deal to afford to sail and how after years of struggle, he qualified for a major sailing event. He told us how hard the race was and the deprivations he suffered during it. But he also told us how elated he was when he finished and achieved his life’s ambition. His closing message was, you should never be content with where you are and that you should stretch yourself to achieve new goals, do new things, and go to new places. But...

One of my colleagues turned to me and said “did he just tell us to leave the company and go somewhere else?” I said that he’d just told us we could do better elsewhere. Both of us left the company within six months to get better jobs.

Let’s turn to more positive speakers.

I had the great fortune to hear Mark Cuban and Adam Savage (from Mythbusters) speak at a company event for customers. They didn’t say anything that supported the company’s values but they didn’t say anything to contradict them either - they talked about their own subjects, Mark Cuban spoke about innovation and management and Adam Savage spoke about Mythbusters and what happened on set. It was great to hear them speak and great to get some insight into who they are. I left the event with a good feeling about the company - I was happy I’d had this experience and felt gratitude to my employer for providing it for me.

Recently, I heard a speaker talk about how their family had built a clothing company chain of stores around exemplary customer service. Their stores are extremely high-end, serving CEOs and others at the top of their professions. He told stories of associates driving to customer’s houses to deliver items, of clothing shipped out overnight across America so a CEO could give a TV interview looking his best, of tailoring services provided free to high-end customers to win their business. It was an awe-inspiring talk and fascinating to see how the family had consistently built their business. As you can tell, I loved the talk. I was fascinated by how well they’d aligned their tactical activities towards their strategic business goals; for me, it wasn’t about customer service, it was about aligning incentives and actions towards a clear end goal.

I’ve had the opportunity to think about the motivational speakers I’ve heard and the effect they’ve had on people. On the face of it, it seems like a great idea to bring in a compelling speaker, but as we’ve seen, it can go wrong. I recommend motivational speakers, but with qualifications.

  • Listen to them speak and hear the entirety of their talk. Does it support your company values? Is there anything in the talk that might encourage behavior you don’t want (leaving people behind, encouraging people to quit)?
  • Brief your speaker on your company values and ask them to avoid undermining them. Speakers can choose to focus on parts of their story, and they could choose the parts that support your values.
  • Understand why you’re bringing in a speaker and the effect you want to have on your audience. Bringing in celebrities is fun and makes people feel good. Bringing in business people can make people think. Bringing in people who have a powerful story to tell can be moving. But what’s your goal?
  • Reinforce the message by having an executive point out the pieces they want the audience to take away. Never leave it to the audience or the speaker to decide the takeaways.