5

This question already has an answer here:

I joined my current company recently, and I am on probation. The code I have inherited is brittle and has performance issues. I am not familiar with the system yet, but my manager told me to refactor this code, document it and set a hard deadline to do the first release by end of the next month.

I started working on this project last week. For a small refactoring in a simple component, I had to do many changes at various places. I fear that if I do a major refactoring, I would end up coding the project from scratch, and I will miss the deadline for sure. If I avoid doing this, the project is doomed to fail as code can break in multiple ways.

My manager made me sign a document that says I am supposed to complete all the tasks. Being nervous and confused, I signed the document. Now I fear that if I cannot complete the tasks, the whole blame will be on me. The project has already failed three times, and my manager is damned serious to make it work this time.

How should I professionally communicate to my manager that the issues with the code may cause me to miss the deadline?

marked as duplicate by gnat, scaaahu, Michael Grubey, Rory Alsop, Chris E Aug 29 '17 at 19:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 5
    He's not serious about or he wouldn't be doing it like that – Kilisi Aug 27 '17 at 13:29
  • 3
    I don't think the duplicate is a real duplicate. This is a deadline from management versus a self-given deadline, which alone makes a lot of difference. – Erik Aug 27 '17 at 15:40
  • 1
    @Erik That is an excellent point, I seem to have overlooked that. It is not clear though if the OP was consulted before the manager set the deadline. There is also a possibility of miscommunication here. The manager saying, "we would like to have the first release by next month" doesn't necessarily imply it is a "hard" deadline, just that the management wishes for it. That seems to be one more reason why this is not a duplicate, I will retract my duplicate vote. – Masked Man Aug 27 '17 at 16:00
  • 1
    @sdkks You make some good points, might want to consider fleshing it out into a full fledged answer. – Masked Man Aug 27 '17 at 17:53
  • 1
    It is not clear what problem you are trying to solve. Is the code working correctly but has performance issues? Why is refactoring the solution? Is the code buggy and hard to maintain? Is it possible to fix the bugs without refactoring EVERYTHING as the first step? I also don't understand what was the point of signing a doc since you are on probation and your manager would decide if you would continue anyway. I think your post omits important information – smith Aug 27 '17 at 20:05
11

Managers can say all they want, they are generally not very good at calculating deadlines. The only people who can really tell how much work something is, are the people who know how to actually do it and who are familiar enough with it to make the estimations.

What you'll want to do is gather all the information you have on the project and make your own estimations on how big of a project this is. You've already done part of the work, so make sure you include that, as well as your worst predictions for how messy the code is and how much of it you'll have to rewrite.

Then call a meeting with your manager, show them your data and your predictions for how big this project really is and ask them what they want done. Tell them how much you can do before the deadline, tell them how long it would take you to do everything, and give them some suggestions on how the work might be done better (for example, getting more people working on it, skipping certain segments that are very hard but don't help much, buying some new technology that handles part of the problem, whatever you can think of)

At the end you want to present them with the facts and try and work with the manager to come up with something that is both useful to the business and realistic.

If your manager doesn't want to hear it and just keeps you to the deadline you signed up for, then they are denying reality. And no matter how much you'd like to deny reality, it's going to win in the end. If you think getting everything done is completely unreasonable and your manager insists you have to do it, then the only realistic thing left for you to do, is spend your time looking for a new job, because you can't please someone who ignores the facts.

(Also, if your manager asks why you signed the document, be honest. Tell them you were nervous and didn't think it through, and that you regret signing it because you now feel it wasn't doable. It's just a document. Sane people understand that writing it down doesn't make it real, and that you'll have to change the document if your goal is to get the work done.)

  • All good advice. Also, for your own sanity and security, make sure you're writing tests as you go, or else the refactor may wind up breaking things in unexpected ways despite your best efforts. – Paul Aug 27 '17 at 17:23
  • @Paul in theory it sounds good but writing tests for a nearly finished project seems a suicidal idea unless I am given time to re-write the project from scratch. – john doe Aug 27 '17 at 20:24
  • 2
    @johnDoe i mean write a test for anything you're going to change before you change it. I'd argue that not doing that is suicide – Paul Aug 27 '17 at 21:54
  • 1
    @Erik: the kind of manager you describe surely has no interest on a refactoring per se. Surely just wants the product out the door. I think there is something missing from the post. – smith Aug 27 '17 at 22:11
  • 1
    @smith it's the engineers job to manage the quality of the code, not the managers'. If the engineer cannot find a way to make the code work reliably and efficiently without refactoring, than they'll have to explain that to the manager. – Erik Aug 28 '17 at 5:49
8

My manager made me sign a document that says I am supposed to complete all the tasks. Being nervous and confused, I signed the document. Now I fear that if I cannot complete the tasks, the whole blame will be on me. The project has already failed three times, and my manager is damned serious to make it work this time.

How should I professionally communicate to my manager that the issues with the code may cause me to miss the deadline?

Tell your manager now that your examination of the code leads you to believe you will not be able to meet the deadline and why, but that you'll do your best anyway. Also, tell them now what your approach will be and how long you think it will take to complete the task, and that you'll update your estimate as you learn more.

It's silly that your manager believes a signed document will make any difference. But you owe the company your best efforts and your best estimate. And perhaps your manager will come to his senses and accept reality, perhaps not.

Note that in the end it may not matter. You may miss the deadline on the signed document, and your employer may choose to let you go and start all over with another new hire. But you should give it your best shot anyway.

  • Looks like the manager wasn't interested in an estimate. And I'm not sure what this manager is thinking, but to give a reasonable estimate for the task "refactor and document this code", you have to spend a good amount of time first to see what the quality of the code is. – gnasher729 Aug 28 '17 at 9:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.