5

I am working as Junior Developer in a small startup. Although I am junior and it's my first job, I am working independently and have some internship experience too. I am currently working on a project alone to merge two web application into one. I have been working on it for 2-3 weeks now and had made lot of progress in refactoring but there is still a lot of mess and bugs.

Yesterday I realized a simpler way to do it. I feel it will finish the project in just 2 days and will be much less buggy approach but it will render all the work I did for past 2-3 weeks useless.

Problem is my boss have very high expectations from me (unfortunately in a bad way). He is expecting to see a lot of code changes when I finish the task since I have taken considerable time now. If I do it the new way, I'm afraid he will get onto me because I took so long and only did two days worth of work.

I know these things happen in programming but unfortunately my boss is not very understanding person. I also have been once reminded to work faster by him (after 2 days on a new project I started working on.. he prefers fast over quality).

I am feeling inclined to do it the long way (the one I am doing for last 2-4 weeks) to save myself. What should I do?

closed as primarily opinion-based by Daniel, Mister Positive, Chris E, gnat, T. Sar Mar 10 '18 at 8:52

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Working on some direction to realise that it's better to work in another direction does not make the time wasted; you were getting a better understanding of the problem – Mr Me Mar 7 '18 at 14:54
  • Just curious, how will he know the difference between which solution you've used, the 2 day or 2 week? Sounds like there is a lack of trust here. – user8365 Mar 7 '18 at 17:39
  • @JeffO Changes on github. Refactoring will show a lot of work – BuggyCoder Mar 8 '18 at 9:48
  • 1
    @BuggyCoder - If you're been submitting code to github for two weeks and then replace all of it with code you wrote in two days, I don't see it as a problem. I find that most refactors don't take as long as the original code (which was inferior) because now I know what really needs to be done. If your boss doesn't understand how programmers work, I don't know if you can educate him enough. You'd think someone able to get on github and evaluate your work would know better, but your boss is kind of being a jerk. – user8365 Mar 8 '18 at 19:04
7

When you're working in IT, it's common that work done later invalidates work done earlier. You should also never be afraid to propose a better solution when you think you've found one. Just make sure you've considered the pro's and the con's of the new solution and remember that there's a chance your new 'better' solution isn't put into practice. In this case, don't be angry or spiteful or feel bad about it, in the corporate world it will happen very often that a decision is made with which you disagree. Sometimes it's actually the right decision and you can't see it because you don't have all the information. Sometimes it's not the right decision and this fact will become apparent when something goes wrong. It's an important professional skill to be able to deal with this kind of situation.

When proposing the solution, make sure you use the right language. For example:

Hey boss, I think I've found a better solution to our foo problem. We are currently barring the foo, but if we use fizz to buzz it instead, I think we can get the job done sooner and the code will be more maintainable. The downside is that we don't have a lot of people with fizz experience but it's not very hard to learn so I don't think that's a big risk. What do you think?

  • But I am worried my boss won't be very happy that I wasted my time in a previous solution and might call me incompetent. I am junior developer and while I am good, he has way too expectations from me which I cannot fulfill all the time. All my previous employers have been very happy with my work even current one, but he seems to be always on me to work faster. – BuggyCoder Mar 7 '18 at 13:03
  • 5
    @BuggyCoder He may call you incompetent but that doesn't make it true. It's very common that you stumble upon a better solution while doing the work. It's also very common that while doing the work it turns out the problem is a lot bigger and more complex and it will take more time to do the work. The time you 'wasted' is technically a waste but until you had the better solution, it was the best you could do so it's not really wasted. It also may very well turn out that your boss disagrees that the new solution is better and chooses to stick to the old one. – Cronax Mar 7 '18 at 13:10
  • @BuggyCoder: I was 90 days into a project when I went to my boss and said that if we just switched the language I could do the thing from scratch in a week. He said go for it and I delivered a week later. I got a bonus. Never be afraid to rethink what you are doing. – NotMe Mar 9 '18 at 0:47
1

From my own experience I have learned that the shorter way isn't necessary the best. It may seem to you like a heavenly solution what you have found, also the benefits would be great: you will finish work much faster, you will be appreciated and your image will be better. But consider that you are a junior, and many things you still don't know. It is possible that your solution couldn't work or return other results than expected. So it is risky: you could end up eventually fired if you don't succeed.

When I was a Junior I also had ideas, but what I did(and I find it as a good option) was to always ask someone with more experience for an advice or an opinion about my idea. Some ideas were followed by: Nice, interesting. You should do it., while others were followed by: Ok, but have you considered this fact?. In that moment my idea it seemed to me the worse, because the fact mentioned by experienced-guy, I was not considering it.

The safe way, from my perspective, is to find someone(you are working alone, so it can be from another team, or even another friend who works in the same field) with more experience and ask him what he thinks about it(your solution, not your project if you have a confidentiality clause in your contract). Don't do anything until you have a clear and a certain answer. You can even ask more than one opinion. It is safer and at the end, if you succeed you just deliver to your boss and say that it's done. Don't let him feel that it was a two-days work and you've finished it in 2 weeks. You finished now, that's what he has to know.

The other way it's less safe, it's rather risky: just implement it in the way you have realized but think about the possible consequences if you fail, depending on the importance of the project: the worst is to fire you. Other may be to cut a percent of your salary, lose you performance bonus and so on(you know better).

Don't get me wrong, it is good to take risks. But it is good to take risks that you have a high chance of win. If you don't, just take your time and think twice. It may save your job, career and in other situation, life.

  • Unfortunately the only other technical person in my small company is my boss. He also have a habit of reviewing my code whenever I push it (not like code review but to get idea of how much work I did) – BuggyCoder Mar 7 '18 at 13:33
  • Then ask help from outside and if you can't hide the time from you boss, then just be honest. It seems that you don't have many alternatives. – lukuss Mar 7 '18 at 13:38
  • 1
    Why not just discuss with boss then? ;) – BuggyCoder Mar 7 '18 at 14:36
1

Focus on outcome not on timeline or size of effort.

Now this is much trickier than you think.

Many a times in work - we may find better/easier ways of getting things done. Quite often we realise after the whole thing after it is done. Yet, it is not surprising at all and not bad that you find a better way than your boss thought.

If indeed, you got some better way to work - first consult back to your boss and tell him/her your way and how it will be easy. There many possibilities here:

  1. The boss might really appreciate your intelligence and it will certainly help him cut his target time. No right minded boss will dislike the fact that subordinate did have a better idea.

  2. The boss might also be aware of that approach, but just choose not to take the short-cut! The decision behind why he asked you to take specific approach that takes 2 weeks - rather than something that will take 2 days might be for reasons he knows. So if you go back to him with wasting 2 weeks later only to give him the work based on alternative approach and that approach has a problem from the point of view of your boss - you have created a trouble for everyone!

  3. Above all, communicating and showing your approach (rather than sticking to either old approach or waste 2 weeks but take new approach) will work both help improve your credential as well as confidence in your boss about you. On the other hand, if your boss doesn't like your solution, you will still learn why he wants it certain way.

By all means communicate to your new idea and then come to conclusion in consensus with your boss what should we do now.

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