6 Replies - 1593 Views - Last Post: 27 September 2015 - 12:00 AM

#1 kathy025  Icon User is offline

  • D.I.C Head

Reputation: 39
  • View blog
  • Posts: 175
  • Joined: 19-December 14

How to Deal with a Dogmatic Superior?

Posted 22 September 2015 - 06:07 PM

I have a superior who rather implies his way to code is the only way to code and his chosen API is the only correct API for the task.

For example:
SomeObject someObject = null;
someObject = new SomeObject();



vs.

SomeObject someObject = new SomeObject();

And he insists that I always do the first one.
It appears to me the second one saves lines of code so I'd like to know the objective reason for the first rather than sheer preference.

The thing about declaration and instantiation, that's okay. Where it gets rather disheartening (as an intern) is when it comes to the choice of API. I was tasked to write code that sends email and he prefers JavaMail. I on the other hand, decided to go with Apache Commons Email (which sits on top of JavaMail also). My code worked on the local environment but somehow it didn't on prod (throws EmailException:mail.mycompany.com:465). He has NEVER used Commons Email before so he keeps blaming it with this tone that I should've used JavaMail instead.

What I'm thinking, if it WAS the Commons, then it shouldn't have worked at all -- local or prod. If the exception was thrown after a change of environment, then I'm more inclined to believe it's some configuration in the prod environment rather than the API itself. At least that's how I observe it.

But then again, he keeps blaming Commons and saying JavaMail is better and basically I shouldn't use libraries outside his preference. Then he'd say things along the lines of my code isn't that important and he'll just put it on low priority.

How to deal with a superior like this?

Is This A Good Question/Topic? 0
  • +

Replies To: How to Deal with a Dogmatic Superior?

#2 jon.kiparsky  Icon User is online

  • Chinga la migra
  • member icon


Reputation: 10726
  • View blog
  • Posts: 18,356
  • Joined: 19-March 11

Re: How to Deal with a Dogmatic Superior?

Posted 22 September 2015 - 07:36 PM

The former seems sort of goofy to me. I'd be asking for an explanation - why is this better than that? You're an intern, you're there to learn things, not just to crank out code for cheap. It could be that this guy has something to teach you - or not, but you won't know unless you go to him and actually try to learn his reasons. Humility is a great virtue for a programmer. A lot of programmers like to think they know a lot, and most of them do, but the best programmers I come across are always the ones who understand that the person they talk to - dumb as they might be - has something to teach them.

On the larger question - how do you deal with a superior or a co-worker who insists on certain habits - I would say it's best to have a consistent house style, which should be written down, and adhered to. Honestly, you can get used to just about any stylistic conventions, so I see no reason not to do what the group agrees on - this is not the hill you want to die on. On the other hand, the way these conventions are devised and updated reflect a lot about your team culture, and you should consider carefully what you see reflected there. If you find that there's a dogmatic, overbearing hand setting a bunch of arbitrary rules that everyone else is supposed to follow, probably this is the way the rest of your work life works as well.
And as I continually have to remind people, as a programmer you're in high demand and you have lots of options. Be polite, play nice, and keep your resume circulating and every job problem is temporary.
Was This Post Helpful? 4
  • +
  • -

#3 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon


Reputation: 6996
  • View blog
  • Posts: 14,635
  • Joined: 16-October 07

Re: How to Deal with a Dogmatic Superior?

Posted 23 September 2015 - 04:04 AM

The code thing is wonky. However, there is anothern patter where it kinda makes sense:
Thing result = null;
// code block that may or may not set result
return result;

// compared to 

// code block that may or may not return thing
return null;



People can get highly dogmatic about returns in the middle of functions, in which case the first is required.

Which API... honestly, whichever they tell you to use. To goal is to get the job done. Choosing one API over another can ultimately just come down to preference.

You feel API X is better and your boss says Y is the best. There is no best, but if Y and X can do the same job, you use what they want you to use. If Y cannot do something that X can, then you have to communicate that.

Is the boss challenging to deal with in general? The boss employee relationship is always challenging and it's never the boss who has to figure out how to make it work. You have a problem, you express your concerns. You may or may not get your way, depending on how persuading your argument is. In the end, you do your job or find another.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5925
  • View blog
  • Posts: 20,256
  • Joined: 05-May 12

Re: How to Deal with a Dogmatic Superior?

Posted 23 September 2015 - 05:58 AM

For that declare and set to default, and then set value on the next line: I used to work with a team which something like that as its coding style. When I asked about it the reason behind coming up with it as a style guideline, it came about because of four reasons:
1. They were using a old non-compliant C compiler;
2. They had a dumb 'ctags' type parser that only recognized setting values to a constant;
3. They had a dumb static analyzer and profiler that could only one operation/function call per line; and
4. When debugging the non-optimized version of the code, it was obvious what operation was being performed.

As the underlying tools matured, the style guide didn't mature with it.
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5925
  • View blog
  • Posts: 20,256
  • Joined: 05-May 12

Re: How to Deal with a Dogmatic Superior?

Posted 23 September 2015 - 06:09 AM

As for not using 3rd party code: Some teams have an almost religious belief in not invented here. Some of it for good reason due to patents and IP concerns. (A company I worked for previously had strict rules about not reading other peoples patents -- leave it to the lawyers to determine if something is patentable.) Others are not as concerned about patents or IP, but believe they make their developers better by making them do things The Hard WayTM because they learn and teach others in the process.

It is worth asking your mentor which is true for your organization.
Was This Post Helpful? 1
  • +
  • -

#6 birko19  Icon User is offline

  • New D.I.C Head

Reputation: 9
  • View blog
  • Posts: 29
  • Joined: 24-August 13

Re: How to Deal with a Dogmatic Superior?

Posted 24 September 2015 - 02:54 PM

I'm not sure what kind of work experience you have nor do I know what your dependency level on this job is. But if this is a person you report to then I'd be looking somewhere else for work. I get that direction from senior developers and team leads is important, but what you're describing is extreme.
Was This Post Helpful? 2
  • +
  • -

#7 kathy025  Icon User is offline

  • D.I.C Head

Reputation: 39
  • View blog
  • Posts: 175
  • Joined: 19-December 14

Re: How to Deal with a Dogmatic Superior?

Posted 27 September 2015 - 12:00 AM

View Postjon.kiparsky, on 23 September 2015 - 10:36 AM, said:

A lot of programmers like to think they know a lot, and most of them do, but the best programmers I come across are always the ones who understand that the person they talk to - dumb as they might be - has something to teach them.

View Postbaavgai, on 23 September 2015 - 07:04 PM, said:

Is the boss challenging to deal with in general?

I would say my superior is a good mentor - he teaches me many things and is able to address my code-related concerns when I get stuck.
I think the problem lies more in jon's point - my superior does not listen to me. Probably because I'm an intern and far less experienced (which I don't deny).
There's this one time he went rounds trying to do this:
public interface SomeInterface implements AnotherInterface, YetAnotherInterface {
}


I've asked him around 3 times if it was possible for an interface to implement another interface and he kept saying "Yes, that's not the problem here" every time. I just thought he was doing some Java magic I didn't know of (he has been in the industry for 10 years after all) so I just kept quiet after my 3rd attempt. Then later on he realized he was implementing on the interface and I told him (politely) it was what I've been asking earlier to which he replied "Sorry, I wasn't listening". Similar events have happened.

View Postbaavgai, on 23 September 2015 - 07:04 PM, said:

You feel API X is better and your boss says Y is the best. There is no best, but if Y and X can do the same job, you use what they want you to use. If Y cannot do something that X can, then you have to communicate that.

To update on the issue with Commons Email, it did work. It was indeed a mismatched config with the prod environment so all that was need was to comment out one line pertaining to SSL settings and the email went through. The line was easy to find since Commons Email produces a short code base. He was nicer the following day.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1