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 

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

then

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.

Spreadsheets

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.