Situation

I am working in a small office of 4 people, where 2 of us work independently and the 2 others are in a team.

It has started to bother me that those 2 in the team are not getting much work done, because of being ineffective (lots of chattering) / putting in less hours than our contract states. All this is happening while they are also complaining about having too much to do.

Now, I should not care. I am not their boss and their work does not directly impact mine, so objectively there is no reason for me to be annoyed by this, but the fact that I feel I make a bigger effort than them in our small company to achieve success does bother me.

What I tried

I tried to use the fact above to convince myself to let it go, together with the fact that I am fairly certain our boss does know about their limited performance - even though he is not very often in the office so rarely sees them working. He can only judge it from the results they are delivering.

But without success, unfortunately.

Question

How to properly let it go how coworkers around me are performing, when they do not affect my job and I do not have a manager position?

From comment: I want to stop getting bothered by it. Whether that happens by them stepping up, or I find a way of dealing with it does not matter

Note

The question is not about how to truly judge coworkers performance as a non-manager, but simply how to address the situation stated.

What is your goal in this? Do you want the coworkers to put in more effort? Or do you want them to work more hours (e.g. "I wanted to ask Susan about X but it seems like she is in later and gone early all the time so it is very hard to reach her."). These are issues to talk to your manager about.
– BrandinSep 25 '19 at 10:55

3

As stated in the question, I want to stop getting bothered by it. Whether that happens by them stepping up, or I find a way of dealing with it does not matter.
– AcarbalacarSep 25 '19 at 10:58

20

"Now, I should not care. I am not their boss and their work does not directly impact mine" & "to achieve success does bothers me" Exactly - It affects the company you are all employed in, and especially in small companies such behaviour can lead to a failure and all of you end up brushing up your resume. So I fully agree that you are concerned though it's not your direct responsibility..
– iLuvLogixSep 25 '19 at 11:58

6

Are you familiar with the sort of work these coworkers do? By default I'd imagine that you are, but some jobs require a lot of thinking (which may not look like work) or benefit from frequent breaks (like avoiding typos in data entry). Fraudulently logging hours as hours worked and failing to deliver complete work products by assigned deadlines are more obvious, but it's still worth making sure you're on the better side of the "They're underperforming" vs. "I don't know what them performing well looks like" line.
– Upper_CaseSep 25 '19 at 20:10

10 Answers
10

Now, I should not care. I am not their boss and their work does not
directly impact mine, so objectively there is no reason for me to be
annoyed by this, but the fact that I feel that I make a bigger effort
than them in our small company to achieve success does bothers me.

Clearly this is about your feelings, and feelings are personal.

What helped me over my career was that I always told myself that I needed to be the best I could be every day, and that what others did or didn't do wouldn't get in my way. I learned to seek motivation internally, not by the activity or opinions of others.

You already know that your boss does know about their limited performance, so there's no need to notify management. I have also learned over the years that management notices more than you might think, and that in the long run hard work is usually rewarded properly. I know that when I became a manager, I always knew who was really working hard and who wasn't.

Just tell yourself that this is not your concern and focus on the parts that are your concern - your own work, and your own behavior. Perhaps your hard work and example will inspire others to work harder, perhaps not. But if you become self-motivated, you'll care about them less.

Maybe one day you'll get promoted to management. At that point you can have more direct impact on the behavior of others.

"Just tell yourself that this is not your concern and focus on the parts that are your concern" As I already commented on the OP's question, it should be his concern especially in a small company that can easily fail if 50% of the staff are slacking off. Your answer would apply to a medium sized or large company where such behaviour of two inddividuals would only have a marginal impact (obviously depending on their role..), but in this specific case it's a bit different. Just my 2 cents..
– iLuvLogixSep 25 '19 at 12:02

30

My therapist gave me this thought to counter thoughts in which I compare myself to others: "Comparing myself to others only hurts me." It's true. It's not motivating you to do better or work harder. It's just making you feel bad. I'm finding this thought very helpful.
– ribs2spareSep 25 '19 at 13:06

4

Re: "I know that when I became a manager, I always knew who was really working hard and who wasn't": How do you know?
– ruakhSep 25 '19 at 21:39

2

"I have also learned over the years that management notices more than you might think" This is probably generally true. But I know as a developer, managers I've had in the past have very poor judgement on quality of work from their developers. This never bothered me because I knew I needed to find a place where management had better judgement.
– aaaaaaSep 26 '19 at 15:38

2

Wow, I should be working with Joe! It's certainely not been my experience that management knows what's up, nor that hard work ever gets rewarded. Basically, I work hard in order not to bore myself to death :-)
– user90842Sep 26 '19 at 22:44

Stop presuming that you are a virtuous person

Obviously, your entire position here rests on the presumption that you are a good guy, honorable and hard working. From that high horse, you judge everyone else.

And you presume that judgment is also virtuous.

You don't even think about this; you just take it for granted.

Another person might view you as a disruptive busybody and gossip, who has his nose in everyone else's business but his own. Who wastes time spying on his coworkers (while judging them in the worst possible light) instead of giving the company best effort on his own work. That is only an opinion, of course, but is it less valid than your self-opinion? Who's to say who is right?

I am not saying to have a low opinion of yourself, merely to realize that yours is not the only story. At the end of the day, you don't know how to judge them. But you know it is not constructive to do so.

The other answers are excellent, but this addresses a philosophical issue they don't. It feels very Stoic. I like it.
– BloodgainSep 25 '19 at 23:32

1

This is very insightful, and also induces a bit of self-reflection. As a manager, I do like having "slackers" in my team. If there is one thing you can trust a "slacker" to do very well is to come up with a solution that does the job in a quick and easy manner that can then be mass-deployed.
– Juliana Karasawa SouzaSep 26 '19 at 13:17

4

@sgf Stoics concern themselves with their own virtue -- and the improvement of it -- not the virtue of others. They try to accept the things they have no influence over, rather than dwell on them. I don't have a particular Marcus Aurelius quote handy or anything, but that's what I was talking about.
– BloodgainSep 26 '19 at 14:47

1

Great answer. Humility is never a losing strategy.
– achacttnSep 27 '19 at 1:02

1

Assuming I've understood the position being expressed here, this is a very stupid answer. In particular, it presumes all narratives and viewpoints are somehow on a similar footing, which is categorically untrue. Hard working, honest people are definitely more virtuous than those who are both lazy and deceitful, and just because there exist viewpoints to the contrary doesn't mean those viewpoints are ethically defensible. Speaking of which, I think a better answer would be based on defensible philosophical positions, not this postmodern nonsense.
– goblinSep 28 '19 at 13:24

How to properly let it go how coworkers around me are performing, when they do not affect my job and I do not have a manager position?

You're wrong here, three times in a single statement. Stop lying to yourself. They do. They already did affect your job. You think about them, you care about them (even if in the negative sense), and you are preoccupied with their behaviour. That affects your work, and will/would affect it in the future. You most probably won't be able to let it go - human nature doesn't work that way. Lastly, you do have a manager position - you can manage your own life.

tl;dr either learn to SNIP (smile, nod, ignore, proceed), or change your job, ASAP. FWIW, you're probably better off changing your job. You're already too deep in this, mate, if you're asking random strangers on the internet for help ¯\_(ツ)_/¯ ... don't get offended, keep reading if you can - because I was in your situation in my last job. A long story follows, with a moral lesson at the very end. Some details were changed, to protect the innocent - but since no-one is completely innocent, most of the story is real.

My team consisted of team lead, tech lead mixed front/back dev, devops guy, front end dev, and me, as a backend dev. We worked in open space office, with about 6 other teams around.

Mind me, not only most of my team was slacking off; almost the entire office was slacking off routinely (about 1/3 of the people theoretically present in the office were either in the console game room, additional game room, kitchen, nearby restaurants or in the conference rooms, doing stuff barely tangential to their jobs; there were only a couple of guys who actually spend at least 6h a day coding - also, many of the people were talking small talk for literal hours instead of working). As far as my team was concerned: team lead worked for about an hour a day, and was barely skilled enough to code or design at all (no previous work experience, master's degree in unrelated field etc.), front end dev worked sluggishly even on the simplest features and delivered them with lousy coding, devops was shared with another teams so sometimes he actually worked only for an hour or two on our project (quite big BTW, a bunch of webpages with 100s of thousands of user visits per day), and tech lead guy, while a great programmer, was either sitting in the kitchen area with the team lead, or off the office eating, or playing squash etc. Our code base was ancient and we have had several severe problems with our 3rd party suppliers. We had a couple of years (literally) of technological debt accumulated. I asked about it, and they told me it's, quote, maintaining a healthy work-life balance.

"Maintaining work-life balance when you're at work", I asked myself?

I was new there, and that whole situation was a bit disturbing to me, to say the least. I reacted doing what I could best in this situation;

I wrote code.

Sometimes I took some unpaid overtime when nobody noticed (so that nobody would frown upon me not maintaining the "balance", heh). Sometimes I went home earlier because I couldn't work with people constantly chatting about bullsh*t just up my head for literal hours. Sometimes, seldom, I worked from home (my neighbours were refurbishing their flat, so it wasn't the best option at that time).

Three months have passed.

I reduced the tech debt a bit, I've introduced some new procedures and innovations that helped the team, I worked closely with all the people in the team. The team lead said he noticed how much effort was put by me and how the code went forward; I got a praise and was told I will get a junior dev as a helper and that I'll get promoted if I'll maintain my performance for another three months. I was told to do what I can to bring the project up to speed.

Other people were still slacking off, as usual.

Another three months have passed.

The tech debt got severely reduced, we migrated a lot of old stuff, I routinely finished as many tickets in a sprint as the entire rest of the team, I got the promised junior dev as a helper (a colleague of mine from previous job I referred for this position, to be precise), and I was told by our team lead that I'll get promoted as soon as possible, and that I should extend my performance even further by doing mentoring, tech talks and knowledge sharing and documenting it (which I actually did) so that it'll be easy to provide HR with proper paperwork for the promotion.

Another three months have passed.

The new junior dev was doing great work, the tech debt got reduced, we blah blah blah.

It didn't matter to me anymore. I was tired, frustrated, got some sick leaves due to upper respiratory tract infections due to crappy AC in the office, I started having problems with sleep... and I finally snapped. On one of the sprint plannings, on which the junior dev was absent, I got berated by the team lead for, quote, doing stuff I wasn't supposed to do (fixing invalid labels on tickets in Jira, to be precise) - only after I was explicitly told I can freely do those things and should do them as I see fit by the very same team lead a couple of weeks earlier, and to which I had full credentials in the system. Nobody questioned the validity of the changes I did. Nobody questioned the usefulness of the changes. I was just told "You shouldn't have done that. You did too much." by the team lead. Like I said, I snapped. I didn't yell - I just angrily asked "If I didn't do it, nobody would do it, because nobody in this room apart from me cares about this project at all", to which the team lead responded, smirking "Nobody told you to do it, it's your fault and you will pay for it."

I took sick leave due to increasing health problems. When I returned, I got called to a couple of HR talks with office manager etc. about how I was reported by my team lead to be a disruptive employee, and that a "recovery programme" is being developed for me. I got presented with a written disciplinary action proposal, being basically a forced "confession" about how I destroyed both the team, the team spirit & the project and that I take full responsibility for it, and was asked to sign it.

Luckily for me (though I wouldn't call it just "luck" but rather "tedious preparation"), I got all the team comms and messages CCed, I got the repos cloned with commit history and with code metrics showing clearly how much code was authored by each and every person in team, I had analytics from issue tracker showing task completion rates and ratios by person, I had all the dirty-ish info & evidence on team's members breaches of conduct (alcohol & drugs taken in the office, sex in the office etc.) - also, I learned something in the meantime: my progress was reported as the progress of the tech lead guy, with which the team lead had a romance. I was never really considered for promotion by no-one; I was meant as his backup, in case his fiancee finds out and he's forced to quit... that would be the only case in which I'd get "promoted". I told the head HR representative I won't sign the documents, that I have a complete evidence proving this is a set up, I showed and explained some of the evidence, and I said that the best that they can expect from me is that I won't sue for mobbing and keep my mouth shut about the whole issue, if they retract their accusations. HR head told me they will get back to me as soon as they verify the information I gave them.

They never did.

I got no disciplinary action, I got no "recovery programme", I didn't receive a notice... I got no response at all.

Month later, tech lead guy resigned.

After snooping around, I heard that he was actually presented with an ultimatum - either he resigns, or he gets fired for misconduct. I don't know if that was what actually happened. I think it was. The slot was now free, and I was eligible for promotion, which I knew I'd never get after what happened. At the same time, team leader took a step back from me and we only shared "good morning" and "bye" from that time on.

The next week, I resigned. I went home, opened a beer, sat in an armchair, and exhaled deeply.

A month has passed. My respiratory tract is still infected, but it's getting better slowly. I'm still tired and frustrated a bit. I still have trouble sleeping (it's 5am here where I'm writing this). I'm still not happy - but I'm getting happier by the day. So, if by the virtue of my knowledge I can share something with you -

don't do this to yourself.

Either stop giving a sh*t right now, ASAP, and never think about those other people again - or resign. Maybe your company will get better. Maybe those people are really working very hard. Maybe you're just overreacting, or maybe you're the one who's slacking off. It doesn't matter. What matters here is your happiness. Currently, you're unhappy, and that's a fact here. It will only spiral down, not up. You already started dwelling on it; your emotions were a sign of the problem outside of you, but right now they are a problem inside of you.

If I were you, I wouldn't take any chances. You've only got one life - live it so that you won't regret it. You can always get another job. You can't get another life.

That was a great read. It's interesting that your story proves the other answers right (your hard work was eventually rewarded) but it wasn't worth the months of unhappiness.
– Robin BennettSep 26 '19 at 10:04

7

+1 thank you for taking the time to write down all the story and your concluding words, and advice.
– Marcello MiorelliSep 26 '19 at 11:45

1

@RobinBennett Did you really read his story? His story is about getting NO rewards and instead later on when he made a small "mistake" (which is disputable based on how it reads), the team lead initiated legal processes to throw him out. The rest of the story is about his defence for his work.
– MugenNov 29 '19 at 5:57

@Mugen well, I'd say both you and Robin are right here (although I personally would be closer to what you're saying here) - I got the reward (or "reward", YMMV) of being able to improve the code, to learn a lot in the process, to succeed as a programmer (in the strictest sense of achieving a technical goal I wanted to achieve), and that's still something I can be proud of today. Yet, as far as the particular job went, the actual monetary reward was nil, and the losses weren't worth it, at least IMVHO
– user97792Nov 29 '19 at 13:27

Having been in this situation many times, the answer is as you implied: it's not your job to care, so, don't. It is your manager's job to assess performance of your colleagues, not yours. Presumably, your manager has some way of measuring performance in a consistent manner (tickets, call times, sales, something relevant to the job you do), and also less obvious things (hygiene efforts, documentation, etc.): while your colleagues may think (and look like) they're getting away with it, they probably aren't.

Your responsibility is to ensure that your work meets your own personal standards, and is acceptable to your management. You cannot make your co-workers share your work ethic, nor is it your concern to try.

In terms of not being bothered by your co-workers lack of motivation, it may help to re-frame the situation:

You are the productive one

You are the reliable one

You are the valuable one

You will undoubtedly still feel resentment toward your co-workers, but that's not really the point: being productive at work is about you. Your professionalism. Your reputation. Your value to the business.

Nobody is irreplacable, but in most reasonably managed organizations, it's the lazy people who are first to be culled during things like layoffs. If you're a key employee, any reasonable manager will fight tooth and nail to keep you.

So, by all means, let your co-workers slack off. Let them enjoy youtube. Let them enjoy making you look better, at no cost to you. Resent them quitely, while you publically absorb the higher profile of being the team's shining star.

"You will undoubtedly still feel resentment toward your co-workers, but that's not really the point: being productive at work is about you. Your professionalism. Your reputation. Your value to the business." Really, is that it? Don't people ever work in a place where their team is building something they want to get built? Some even seem to claim that is a good reason to choose a job.
– JiKSep 26 '19 at 10:06

7

@JiK: I’ve never understood that about this StackExchange. People here like to think that humans are machines and should work like machines. “Just ignore it and do your work”. Sounds nice, but doesn’t work like that in practice.
– MichaelSep 26 '19 at 12:38

I don't have the reputation to downvote, but I strongly advise against the attitude of this answer. The attitude of "I am the virtuous, pure one, and they are the ones who deserve everything bad that will happen to them when judgment is finally handed down" is absolutely sick and will make you a miserable person. Judgment is not yours to make. You don't know what your coworkers are going through. Do the best work you can do and let that be enough. Ressentiment is a disease and should not be left to quietly fester.
– Charles HudginsSep 26 '19 at 18:31

2

"How do I stop caring?" "it's not your job to care, so, don't" and "you will undoubtedly still feel resentment toward your co-workers" - downvote for not answering the question as asked.
– TessellatingHecklerSep 27 '19 at 4:01

It can be interesting to look at this from the company's point of view...

If you had 2 cars and your wife's got poorer mileage/needed more repairs would you throw it away? Maybe? Maybe not right away? Maybe not at all? Sometimes you keep the sub-optimal one because it's better than the alternatives (Not having one or buying a new one).

In some cases I think that a person might be valuable enough to keep while not working quite as hard as another. As long as the company still profits from having them, what's the damage? I suppose you could make their life miserable by watching them more closely, hounding them or reducing their salary, but--well if Fred came in for 10 minutes a week and made the company more money than he cost them, why should it matter to you that Fred is slacking off? Anyway even if a manager thought they could hire someone that could work 50 hours and do the same amount of work as Fred, would that be a good trade?

Sometimes it's easiest to just remind yourself "Life isn't fair" and do what you think would be best for you. Even if Fred is making enough money to justify his continued employment, you will be the one chosen for a raise or promotion as long as you are being more productive.

I have seen that, we had a slacker on a team doing important work. He was the only person we could find that could do his job. The team did amazing work and despite missing a few deadlines saved the company literally millions of dollars. I had a dev with a different set of skills who was complaining when their contract was up and we had to say "we prioritized keeping (the slacker) on because they had the skills we needed to complete high priority work". Though, it does suck when it is that way.
– kleinegSep 26 '19 at 17:26

"Even if Fred is making enough money to justify his continued employment, you will be the one chosen for a raise or promotion as long as you are being more productive." - yes, OP will be the one forced out of a nice tech job into a more responsible, busier, more stressful, more competitive, more demanding, less fun promotion. Fred will stay on easy street. As you say, life isn't fair. 🤷‍
– TessellatingHecklerSep 27 '19 at 4:08

Where this breaks down is your wife's car being a gas guzzler doesn't demotivate your car into guzzling gas. The same cannot be said for workers. One bad apple can ruin the whole bushel given enough time.
– TemporalWolfSep 27 '19 at 22:23

1

True. That would be a great candidate for some creative management.
– Bill KSep 27 '19 at 22:41

It is a natural reaction. Give one small child 2 sweets and another 5 sweets in front of each other and the one with less will complain of unfairness in spite of the fact that there is no reason to guarantee they would get more sweets (please don't actually do this).

Now you are not a child but it is a sense of fairness that never leaves us, we just tend to control our emotions better.

Unfortunately that isn't a great solution but you do have to remember it is a natural reaction to someone else seemingly having it better than us. It is natural but not always logical to feel this so as long as they are not getting credit for your work then remember it is best for you not to react to it.

Note that this reaction has also been tested with monkeys in a lab. It is not some personal flaw or failing. Social animals have a built-in natural expectation to be treated fairly.
– Daniel R. CollinsSep 26 '19 at 18:32

5

It's funny but what I've noticed is that people most resent things in others that they want but deny themselves. If you think you must work hard because that's your "Ethic" but you'd really rather go home, it REALLY bothers you if others don't have that same ethic. Watching them enjoy what you deny yourself out of some personal sense of morals, ethics or fairness is truly painful.
– Bill KSep 26 '19 at 19:01

comparing yourself to a standard with "I should not care", "objectively there is no reason why"

finding that you do care, so you are not meeting your standard

feel bad about that as well

This is like having failing code which throws a divide by zero error, putting a unit test around it to assert that there should not be a divide by zero error, then being surprised that there still is one and it hasn't fixed the code. You need to go into the failing code to debug it, and you need to go into your thoughts to debug those, too.

Just like debugging, you need to explore possible causes and run tests against yourself, and it is a skill to learn which is unlikely to be teachable in a web comment. Why do you care? What is the nature of "it bothers me"? Here are some ideas I have why you might be bothered, and I expect that reading through it, some of them might make you feel a reaction, and others won't. That's meaningful and might help you trace what's happening; explore more in the areas that cause a reaction.

You are envious of their easier time at work, while your work is more stressful.

You are envious of their friendship with each other, while you are more isolated.

You are envious of their closer relationship with the boss which lets them get away with it, while you fear the boss judges you more strictly.

You are disgusted by their laziness and what it says about their character.

You are ashamed on behalf of your customers/clients.

You are angered by the unfairness of the world in general.

You are angered by the unfairness of the boss's treatment of you all.

You are resentful of the time you spent to become a capable employee believing that only the hardest working could get a job, and now you resent believing that all the years.

You are resentful of the effort you put in not being rewarded, in the way your parents told you it would be.

You resent that the coworkers are not being punished for their transgressions against some personal or societal or religious standard you hold to.

You are afraid about your financial future if the company fails.

You are focused on "they are also complaining about having too much to do" as a lie, (how dare they!)

You think they are bad people, and you should not have to work with bad people.

Someone told you that work would not be like high school (perhaps years ago) and you feel naive and stupid for believing them and resent yourself for believing it.

You feel people who are not contributing enough have no right to behave happily.

Similarly, find which negative feelings resonate more strongly - are you more angry or more ashamed, more betrayed or more fearful, more guilty or more hopeless or more panicky or more unloved, etc. Trying to filter out what isn't happening in your head might be easier than focusing in on what is happening.

You are ultimately looking to identify what beliefs about the world, and about yourself, you hold very tightly and could never imagine giving up because it would be unthinkable.

Beliefs like:

If life is unfair, I have to be sad about it. It's unthinkable that people could suffer unfairness and be happy.

If I forgive them for laziness, I will only encourage them to do it more, they need to be punished. It's unthinkable that everyone could be allowed to get away with being lazy, the world would collapse.

I will not ignore this injustice, who would I be if I saw injustice and simply let it pass unbothered? I don't want to be someone who is not bothered by injustice and unfairness!

What I deserve is proportionate to how hard I work, the world must work this way, it's unthinkable that I could accept it being otherwise.

If I stop being bothered by this, that means I approve of it. And I don't approve of it, therefore I must be bothered by it.

A human is valued by their honesty. They are lying to the boss, so they are bad people. It cannot be otherwise.

I must be allowed to judge, otherwise how could I ever improve myself?

You will likely not easily see it, and skip over it as "obviously that's how the world is and should be" because it's a deeply held part of your thinking.

If you do see one or more of these, you'll then face a choice: change it and stop being bothered, or continue being bothered. You won't want to change it, because it's unthinkable for things to be different. You'll then find it unfair that you have to be bothered forever.

If you do choose to give it up, you still won't easily be able to. One strategy to help is to consider that all things have two sides. When you feel bad about something bad in the world, it can be because you hold the opposite thing - the good other side - in high regard, and if you changed yourself to stop caring about the bad thing, you fear losing that good side as well. For every thing you are bothered by, there is another side to it which says a good thing about you, e.g.

If you cannot forgive their laziness, it shows you value hard work.

If you resent feeling excluded from their enjoyment, it shows you value connection and enjoyment with others.

If you are angry at your boss for not treating you all fairly, it shows you value fairness.

If you are resentful at yourself for being naive and believing life would be fair, it shows you value having an honest and accurate view of things.

If you resent working harder and feeling taken advantage of, it shows you value contributing to your group.

If you feel fearful about your future, it shows you value careful planning and long term thinking instead of short term pleasure seeking.

Identify as many of these as you can; from there, realize that you don't have to lose these good things when you change some beliefs about the world. That makes changing the beliefs easier. "It's unthinkable that people could suffer unfairness and be happy." -> if you can accept people being happy and not give up valuing fairness and not become a bad person who doesn't stand up for injustice, that makes it easier to be happy.

This is becoming a long answer; the short version of it is: therapy. This is what (some, good) therapists help people work through.

Warning: I am going to make an assumption that you are either a developer/sysadmin, but much of what I will say apply for many positions.

Question: do you want to stay on that company for the next year? 5 years?

Hint: it is not the only place you can get a job.

Like @vaxquis said, document everything, specially emails praising your work and reports of what you are achieving. Then, get involved in some open source projects. Help people here. Write blogs. Find meetups in your area and conferences you can either attend, volunteer, or submit a talk. In other words, stop thinking on your co-workers and see what you can do to improve yourself, to make yourself more marketable and known to the rest of the world. There are metric tons of companies looking for people who have verifiable game.

While at work: can you put headphones on and listen to music? If so, do it so you can zone the coworkers out. Also, remember you do not know the relationship between your boss and those people. Maybe they are related somehow, maybe he is letting them work there as a favour to someone else.

Someone I knew told me every time someone cuts you off on the road, your should consider they might be in desperate need for a bathroom...

To provide a direct answer to your question: Invest in a really good pair of noise canceling headphones. This is the most effective thing to help you ignore your surroundings and focus on YOUR work.

Other than that, there's no real help instead of repeating yourself its not your bussines to keep track of how others work. In this situation it is probably also impacting your own pace -> the time wasted on observing others is time you also slacked off. Remind yourself each time you catch yourself "slacking off" that you should stop doing that and eventually it will stop bothering you, and you will be even more productive.