29

Last year I entered in a software company as a Junior developer and started to work with new language and technologies.

I tried my best, studied, and did a lot of features. Because of this, I gained visibility and got promoted.

Nowaday I study even more and try to do things really organized (as much as I can) and following good pratices.

But when I look to my old code I feel very ashamed, because there're a lot of things that are messed up and could have been done way better. I always fear that someone (this already happened) see my old code and judge me, thinking that I'm not good. I try to refactor all the code that I can, but I have not enough time, there're big features that would take a lot of time to be refactored.

I don't know what to do, I'm feeling sad, sometimes I feel so sad that I want to quit my job, but I can't. How can I overcome this? Will people ever judge me because of old code?

4
  • 3
    By "(this already happened)", are you saying that someone in fact did "see [your] old code and judge [you], thinking that [you're] not good"? I do want to make sure we're addressing this adequately.
    – TheHans255
    Commented Dec 6, 2019 at 13:31
  • Welcome to the club! It just shows you are able to improve.
    – Aganju
    Commented Dec 7, 2019 at 1:19
  • It's a normal thing for every dev, you just need to let it go and be glad you're improving. People will always judge your code, for better or worse. Comes with the job I'm afraid.
    – berry120
    Commented Dec 7, 2019 at 20:44
  • 2
    Yeah, I'm ashamed about your old code, too. So what. Your latest code is beautiful. Commented Dec 8, 2019 at 21:29

9 Answers 9

72

You’re ashamed because you’re growing as a software engineer?

The more you learn, the worse your old code looks... just comes with the territory. Keep looking forward, that “horrible” code you’re referring to helped you get to where you are today. You’ve learned, and that’s nothing to be ashamed of.

Worrying about those who are judging you is rarely a productive event.

5
  • 5
    It is not only due to personal growth. Software Engineering practices are also developing with time. Commented Dec 6, 2019 at 12:35
  • 6
    This. I feel ashamed of code I wrote 1 month ago. In this branch you are constantly learing and evolving as a person and in your skills. Try to see those old snippets as learning moments
    – Taacoo
    Commented Dec 6, 2019 at 13:12
  • @Taacoo I even keep a selection of old snippets in a document I call "hall of shame". Pretty funny to look at sometimes. But also contains pitfalls of SDKs that you cannot reasonably know as a newbie. Things like when SDK classes or functions do not do what you would think they do.
    – Fildor
    Commented Dec 6, 2019 at 13:43
  • At work we agreed upon one thing: what has been done, has been done. There may have been good (and sometimes less good) reasons, why something has been done the way it is now. May it be personal, structural, technical, technological, orgnizational or educational reasons. It doesn't matter. What matters, is how you deal with it. If you can improve it, so that it results in an advantage for your team and the company, then do it. But don't just change things because "nowadays we do them differently" if it's of no help. If anyone was to blame for newbie code, it's the person who employed a junior.
    – Namoshek
    Commented Dec 6, 2019 at 14:09
  • Additionally, any software engineer who has gone through the same growth process (almost everyone) should have the self-awareness not to judge. A sign of a mature developer is not casting judgement in others because of legacy code. You quickly learn as a developer that the developer rarely has all the experience, time, or resources to write perfect code. Commented Dec 7, 2019 at 15:52
10

First of all, what you are passing through seems to be some sort of imposter syndrome, so thanks a lot for coming forward.

As a junior developer you are following requirements and making sure they are met (and maybe raise some concerns on the way things ought to be implemented?). With that, you don't need to feel ashamed/sad as you are developing what was needed/required. Also, if you are a junior developer, I assume that someone senior approved your code before going in production.

Some things to keep in mind, as they happen quite often (fruit of the learning process, processes that improve over time, ...):

• Look back to problems that were difficult and find them really easy.

• Look back to the code one wrote and find it ugly and/or that it doesn't fit good practices.

As for the need to make everything perfect (it is impossible as the time is limited and there are problems constantly popping up and one cannot spend too much time on little differences at the margins at the expense of important things), just consider the following:

Does that code raise security issues? If yes, just write them down and give them to your supervisor as he will, or talk to someone that will, establish priorities and maybe will give you/someone else (don't forget that you are a team) some time to fix that code.

8

We all look at our old code and cringe a little. This is completely normal, but what many of us do not experience is the desire to quit over it. Don't quit over something normal, instead focus on the fact that this code which you find undesirable, was seen by the company as good enough to merit a promotion.

Learn to laugh at your own code, how noob it was and feel achievement in how much you have grown. If you can do this, anyone pointing out your past code negatively can be met with a chuckle, and a "yeah that was noob, what was I thinking?"

5

@jackwoods - there is nothing to be ashamed of. In fact, you are realized probable issues of your code is greatly appreciable since many coders still are unable to do self-realization. You shall hurry for corrective changes if this poor code is causing bugs or will become a liability in future.

You can try making a list of possible issues you identified from this poor code and suggest/discuss with your project manager for future improvements scope. You shall build a strategy for such scenarios for best coding practices/approach for all your future developments.

There might be very few opportunities where an organization/project manager would allow you such major refactoring/improvements since there is no client paying for it.

You can also use this old poor code vs new better code as a learning instrument to teach/guide your team members so that they also do not introduce mistakes. And probably might enable your next promotion to team leader from the senior programmer.

Remember these facts of a programmer's life

  1. Change is Inevitable
  2. Life Long Learning...
4

This is very very VERY common and nothing to be ashamed of. I cringe when I see some of my old code, and I've been programming for more than four decades.

A friend of mine, who is a professor, noted that in IT, you never come across a "201" class. They never teach us anything in depth, we are more or less given the basics, and thrown into the deep end, and it is sink or swim. You learn while you are doing, and there is no shame in that as long as you learn from your mistakes and make better programs as you continue.

Literally every last programmer has felt the way you feel right now. Anyone who says otherwise is lying. You get hit with tight deadlines. You're told to do things you've never tried before. You wing it much of the time.

What matters most is if it works. A functional kluge delivered on time is worth more than elegant code delivered late.

While obviously, elegant code delivered on time is the ideal situation, it often is beyond our abilities to do so. And that's okay.

1

Why are you sad about your old code?

Indeed, for any old code that has been written, it will be seen as a joke, Especially if you've learned a lot of things. Like I did .

But you have to take the positive side from here, you have learned a lot of things and from there you should not repeat things that you think are bad.

Don't think about things that make you sad, keep going and you will be fine.

For me personally , i won't judge you because of your old code. The past is the past , the current you is who you are now who willing to learned many things and improve to be a good programmer.

1

I don't know what to do, I'm feeling sad, sometimes I feel so sad that I want to quit my job, but I can't. How can I overcome this? Will people ever judge me because of old code?

You have a few choices here:

  1. Get a new job and start with a clean slate elsewhere. As drastic as this may seem, if this is substantially hampering your productivity, career (especially if you are spending time refactoring code nobody else cares about), and happiness then getting a new job would be one way to leave the problem behind. You wouldn't spend day in and day out with people who knew of your prior failings. You are also 1-2 years into your first tech job, so you could be in line for a nice raise. You can write good code at your new job, although you will have this problem 2-3 years down the line.

  2. Change your mindset to no longer care about the views of others. Caring so personally about what is just business is not productive. You are ashamed of something in which someone saw sufficient value to give you a promotion. The person who matters at the company was evidently satisfied, so why does the opinion of a few random people who are not influential to your career matter? Focus more on outcomes and less on the messy way they were obtained. Anything done where learning is involved is going to have flaws.

  3. Refactor all your old code This will eat up your time and potentially stunt your career as the refactoring may be of no business value. This is not recommended.

I suggest at least 2 with the possible addition of 1 if you are finding it hard to break away.

0

Don't be ashamed of your old code. Be proud that you improved so much in a year that you look back at your old code and are ashamed of it.

(Also ask yourself: Could you have written better code a year ago? Does the code look bad because you came to work drunk, or because you were on the internet all the time and spent no time on the code, or does it look bad because you didn't know the things you know today? In the latter case, no reason to be ashamed at all).

-1

2 questions you should ask when looking back:

1) did it work?

2) was it stable?

If yes is the answer then ok, since then you have progressed along with code etc, so while it can be improved, it may not need it.

However, if improving it is a good exercise for a junior or newbie then that is itself a good reason for not worrying about it.

You must log in to answer this question.

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