36

Some background will help me explain myself better - I maintain a software system that is used by the sales team. A sales person enters some data, then some complicated computations are done, and a set of values is produced.

For simplicity sales provides some [Input], I maintain a set of functions F(x), to where F([Input]) = [Output]

Another person was assigned to update some formulas for a part of the project. They gave me some formulas f(x) and they expect result y. When I run their new formulas on expected [Input], I get result z, and not y. z and y are supposed to be Very similar, since it is a different way of computing values that is supposed to improve accuracy. However, the values are coming out wildly different.

On my end, when testing it, the sales [Input] is fixed, so I cannot magically change it. The given formulas produce the wildly different and bad values. I thus suspect that the formulas given to me by this person are wrong.

The persons insists the error is in my code, and keeps telling me to "check it". I grow increasingly frustrated, since I cannot pull out values out of thin air and I maintain that the formulas are wrong. The only other area that's wrong could be that we are looking at different initial [Input] test data, but that does not appear to be the case.

So the person keeps telling me to check my code, but in this case, the code is their formulas and they gave me the formulas. I am not sure how to get through to the person. and from my previous dealing with them I started to suspect that they may not be fit for the job. At least in the sense of collaborating effectively with other people.

I've also asked the person multiple times, to provide me the exact values that they use in their formulas to come up with a different result, but they keep pushing back, not supplying me with values, and telling me things like "you will be confused", or sending me screenshots of excel file with the results, but not the actual Excel file, or the formulas. This is again weird to me - if I asked you to supply me with your formulas and computations and to "show me your work", would you ... send me what I asked for, or would you send me a screenshot of your final result without showing any work? In my case the person is doing the latter.

I also did not touch on how incredibly aggravating all this is too me - what was supposed to be a very simple formula update, which I have already completed, is turning out into a lengthy turmoil of a project, with the person not helping me complete their project, and telling me to "check my code", when it is fairly clear to me that "my code" is not the problem here. I am thinking the problem is the person's work, and lack of support they provide me when I am trying to figure out what the actual problem is with their work.

Also I have not been able to get through to the person very well. It's like they exist in their own world, and I find myself trying to put myself into their world to be able to communicate with them (i.e. when they are not providing the background for their formulas, I attempt to find work-arounds instead of demanding they provide me with all the details, because so far my attempts to request those fell short).

How do I get myself out of this hell?

8
  • 16
    Do you or the other person have a boss? Talk to your boss (or the other person's boss) and explain the problem. – HorusKol Nov 5 '20 at 2:57
  • 4
    What's your relationship with this person? Are you on the same team? Do you have the same boss? Etc. Also, "In my case the person is doing the later." the last word should be "latter". – Acccumulation Nov 5 '20 at 4:28
  • 2
    How are you currently communicating with this person? Via email, over the phone, in person, something else? – Player One Nov 5 '20 at 7:25
  • 47
    If you do the calculation of the formulas given "by hand", do you get y, z or something completely different? – Fildor Nov 5 '20 at 11:55
  • 5
    Have you "shown your work" demonstrating that the formula is wrong? – sf02 Nov 5 '20 at 15:18
142

While it may be that you have to go to your boss and announce you're not getting anywhere, I wouldn't give up until I managed to try one more thing. About an hour spent together with this other person. In the same room with both your laptops if covid permits, otherwise on a voice and share-screens platform.

You do a test. You say "I'm expecting to see 93.1 here but ... 14.2. That can't be right, I know." They say "yeah, check your code." (I would too, if I gave you a formula and you say "I implemented that but I get another number.") You check your code all right, right in front of them. "So I take x and square it, divide that by y, look up the result in that table to factors, that gives 7, then I ...." just walk through it. If you have a debugger or some other way of showing intermediate results, you show it. Show them what you're doing and why.

And then perhaps ... angels sing ... the other person says "no, no it's y that you square." Or they say "wait those factors are for metric but you're using the imperial numbers." Or something. They work with you, they explain the formulas, or they say "hang on, let me run that input through in mine, yes, I get 13.5 same as you but then after that I ..." and you end up working this out.

Or maybe they don't. Maybe they say "look buddy, I don't know what to tell you, I can't help it if you don't understand my scientific brilliance, check your code, thanks for playing." Fine, then you go to your boss. And you say "I even sat with the person for an hour trying to get them to show me where our calculations were diverging from theirs, but they just wouldn't help me. I can't take it any further without some help." And then your boss will take it from there.

13
  • 38
    I'd enrich that by writing UnitTests and have another developer review the code (including the formulas given that have to be put into code). 4 eyes see more than 2. – Fildor Nov 5 '20 at 11:51
  • 72
    And it might just so be that you are wrong. I have been 100% sure before, and turns it I wasnt. – Martijn Nov 5 '20 at 12:52
  • 6
    That's particularly useful because most likely management will "suggest" the same thing - sit together and work out whether the problem is the formula, the implementation, or (most likely) a lack of common definitions and understanding. What else should they do? They can't magically divine where the problem actually is. – xLeitix Nov 5 '20 at 13:13
  • 7
    This answer seems unlikely to be agreed to by both parties, since the adversary is unwilling to simply supply their Excel spreadsheet, which would be the quickest and easiest solution. – joe snyder Nov 5 '20 at 14:58
  • 7
    That's a valid point, @joesnyder and if that happens, then the OP can forward the refusal email to his boss for evidence that she's tried her best to make it work. – FreeMan Nov 5 '20 at 15:33
23

This is exactly what your manager is for.

Tell him what you have done. Tell him EXACTLY what you need.

Ask him if you need to continue working on this, or write the project off as "Unable to achieve due to insufficient information from Team {X}." and shelve it.

The reason you are frustrated is that you are trying to work above your grade.

4
  • 20
    Just to insist on one relevant part brought by this answer : STICK TO FACTS. Don't try to push the blame like they did. You do not have enough data to do your work, that is the fact, the manager will handle the rest. – Walfrat Nov 5 '20 at 8:41
  • 8
    Shift to re-framing the problem without blame. Say something like "Input X gives me Z, but it is suppose to be Y. No access to formula for confirmation. Unable to proceed." – Nelson Nov 5 '20 at 8:52
  • 4
    Considering that there is a working formula in excel (according to some screenshots of an excel according to OP), but that formula got lost in translation somewhere between OP and that other person, "solving" this problem by frustrating the other person and bosses with bureaucracy seems like the very last solution to me. Pair programming/walking through intermediate results with that other person in-person/in 1:1 call is much more likely to produce actual results. – Sumurai8 Nov 5 '20 at 11:58
  • 5
    @Sumurai8 The problem is that the other person isn't cooperating. Then kicking the problem upwards is the solution. – Stig Hemmer Nov 6 '20 at 8:19
20

First make sure it isn't you

Work out by hand (if feasible; else use Excel) one of the cases for which they say their formula works. If you get the same result as them, there is a bug in your code. If you know how to fix it, fix it. If you don't, walk them through your code, explaining each step in terms of their formula. Hopefully one or both of you will spot your coding error. If on the other hand your hand-calculations produced a different result from what they expect...

Ask them for help understanding your error

It may not be your error, but it could be, and they're less likely to be defensive if you assume the mistake is on your end. So approach this situation with humility. Show them the results of your hand calculation and ask them to help you find where you're making your error. Either they'll point out your mistake, or they'll realize that they made the mistake. Either way you're likely to end the stalemate and come to a resolution to your problem.

1
  • 10
    To your second point, I totally agree. I find it is a lot easier to get cooperation when you address the issue without placing blame. The goal is to finish tasks/projects for the company. The easiest way to do that is to just assume you made the mistake (whether you actually believe that or not) and attempt to work together to fix it. If it does end up being the other persons mistake, don't say "I told you so", don't even make that part of the conversation. The outcome is that it was resolved. – gmiley Nov 5 '20 at 15:20
8

In the specific case you are talking about a technique that should work is showing your own work in some way. You mention the other person shows you Excel output so it sounds like the calculations are amenable to being modelled in Excel.

Create your own model that replicates the calculations done in code in a way that allows people to see how the sausage is made. This can be for a single value, it doesn't mean you have to replicate your entire solution in Excel. The user enters the inputs in a few cells and some interstitial calculations are shown (perhaps) and the result.

This then allows you to say you have implemented the requirements as given and your code is working properly in a way you can show to your boss if necessary. You may even find a mistake you made taking this approach, it has happened to me. You may find a mistake in the requirements, like changing a sign on an input makes the results come out as expected.

5
  • 5
    I wouldn't even use Excel, just write it on paper "showing your work" in detail like you would in school, and if you still get wrong results scan/type it in and send it to them and ask them to explain. – user3067860 Nov 5 '20 at 12:58
  • 5
    The advantage to Excel, @user3067860, is that it's easy to quickly test several inputs to ensure you haven't stumbled on an edge case that works/doesn't work, and it's easy to email the results to multiple people. Sure you can take a pic of (or scan) the paper and email that, but people don't think on paper these days... – FreeMan Nov 5 '20 at 15:35
  • 1
    @FreeMan The problem is the colleague being difficult, though...so good chance they will just say "check your Excel". If you write it out (really step by step) then you can say "I have checked this, here is the proof." – user3067860 Nov 5 '20 at 16:27
  • True, but you can do that in Excel, too. You can go step by step in Excel, "showing your work" as you go. – FreeMan Nov 5 '20 at 16:33
  • 2
    @FreeMan but you can make errors or have adins do something else. You need something that can be written down and implemented in several ways to show they get the same answer. Code can be made reproducible for some environments but Excel is not just the code. See UK corona testing figures for misuse of Excel – mmmmmm Nov 5 '20 at 23:31
6

If you find that you are unable to sit with this person and work through the issue, then write out a worked example using some of the inputs you have and step through the formula like you would for a maths exam and show them how you got the result.

Either:

a) You've misunderstood something in the steps or b) The formula is wrong

But either way, you should expect the person receiving this to own up to (b) or show you exactly where you have gone wrong.


There is an additional advantage to this approach rather than face to face if your colleague is not good at being proven wrong - this gives them a chance to realise they might be wrong and deal with it in private before putting on a brave face and 'fessing up to their error. Can be a lot easier this way round than a face to face confrontation if you know your colleague is likely to be difficult.

2

They gave me some formulas f(x) and they expect result y. When I run their new formulas on expected [Input], I get result z, and not y.

That's where the deviation stems from. Ask your colleague to fix their test example (or find a new one) which produces the expected result exactly, using their formula. Then run your implementation of f(x) on that example, and you will either find out that your implementation is not 100% correct, or you will have a solid proof to the contrary.

If your colleague insists that their example is already correct, show them your calculations which arrive to z instead of y. Either they will point you to an error in your development, or they will find an error in their own.

3
  • 3
    I'd start with your second step. Both people are convinced they're right. One or both aren't, and continuing to insist that you're right isn't likely to get you anywhere. – bob Nov 5 '20 at 15:07
  • @bob There is a big difference between a result that is "similar" vs. "exact". Trying to debug an algorithm implementation with a non-exact test case makes the whole thing subjective, giving enough room for both people to be right, no matter how long they discuss. – Dmitry Grigoryev Nov 6 '20 at 7:55
  • I think I see better now what you were saying, and it makes sense, though wording could be a challenge (so they don't think OP is saying "fix your formula and then we'll talk"), and also since the formula is an approximation, I'm not sure it will ever produce exact results. And does it need to? I'm assuming if OP reproduces an erroneous formula exactly, the error in the formula isn't OP's problem. But if OP doesn't reproduce it correctly, whether or not the formula is correct, then it is OP's problem. So I'm wondering if the first step is value-added? – bob Nov 6 '20 at 13:41
2

You can be wrong, they can be wrong, you both can be wrong. This is what QA tests are for. You get a set of values and the expected output.

Best case scenario: you have a set of inputs and the expected set of exact outputs.

But this does not seem to be your case. What I would do is to go to the "knowers" (the ones that can tell whether the output makes sense) and ask for expected values (a range, or order of magnitude, or whatever applies).

Finally, I would go to your boss showing him:

  • your code
  • the tests
  • the results of the tests

The other person can come out with tests as well, which match the expected results. You then have a problem and need to work together with someone experienced in testing that will check the tests (not the code at that point).

2

I don't know how complex is the "formula", if it can be solved instantaneously in Excel or it takes 20 minutes in a GPU, but for the likes of it, it is complex enough you can't agree who is wrong.

But that doesn't matter. In fact, I would approach the problem believing my implementation is wrong (it is easy enough to write 4^2 expecting to get 16, when instead you will get 6 in half dozen programming languages). The problem is that your coworkers are uncooperative in helping you solve the problem. If it is a complex enough formula, and they created the model, they certainly have their own implementation in Excel or Matlab or whatever. It is completely reasonable, and even expected I would say, they provide the reference implementation to you so you can compare with yours.

Without it, I would simply close the ticket as "Not enough information, please provide a reference implementation that yields the expected result." and go about other business. It is best to keep your boss in the loop, with something along the lines: "My code seems to be wrong, but I could not find the error by simply comparing with the written formulas. I would need the original Excel file in order to fix it."

I am not that experienced with many different company cultures, but in the software development companies I worked, this would be perceived as a completely reasonable request, and not at all as incompetence (everyone has spent countless hours in silly bugs, and it is simply not worth it when an easy path is available).

1
  • Except I would put it as "I need the Excel sheet to compare the results of each step of the formula to what I'm getting so I can find the error." As it stands it's a closed due to insufficient information to reproduce. – Loren Pechtel Nov 7 '20 at 21:17
1

This is what some, icluding me, call GIGO or SISO - Garbage in-garbage out. There is a nice XKCD comic about it as well. Whenever I'm tasked with some "challenging" sample my first answer is "Are you aware that the quality of the results is proportional to the quality of the sample?"

At first, be bloody sure your workflow is correct. Do the math, be able to explain it to a rubber duck.

Approach your supperior or the lowers-ranked superior of both of you. Explain them your workflow, what it does and how it does it. Explain them the Randal Munroe's garbage math.

Show them how it works with dummy inputs, correct inputs and the intputs you were provided. Explain them the results.

If they still blame you, grab a box and find another workplace. You really don't want to work for them.

2
  • 2
    I don't think it's OP's algorithm from the description. – bob Nov 6 '20 at 13:42
  • Algorithm, in here is the whole procedure of dealing with the task. – Crowley Nov 8 '20 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .