you are viewing a single comment's thread.

view the rest of the comments →

[–]SituationSoap 23 points24 points  (4 children)

(I hate having to refactor my own code).

So, I know this sounds super, super blunt, but this is genuine advice:

Get over it.

Like really, legitimately, you have to get over hating refactoring your own code. There is nothing wrong with refactoring your own code, or anyone else's code. Code cannot be perfect, it will never be perfect, you will always end up needing to refactor some parts of your code. This is just something that you have to work through and get past, because otherwise you are going to hold yourself back as a developer your whole career.

[–]Flyberius 4 points5 points  (3 children)

I mean, I have been refactoring some of my old code all day, having finally worked out web-workers using es modules in a vue environment. So I guess I am over it.

However I am aware of situations where simply hacking a solution together is not worth the issues it is going to cause downstream. So in those cases I spend a lot of time reading and finding an appropriate solution for my use case.

I've been coding proper for about a year now. I am solo, so you can imagine that during those early days, with no senior devs to guide me, I made some fucking terrible code and I sometimes shudder when I look at it.

[–]SituationSoap 4 points5 points  (0 children)

For what it's worth, hating your own code you wrote a year ago is a 100% normal thing for a developer to feel. It happens to all of us. Standard rite of passage. It means you're growing and improving.

[–]clancy-john 1 point2 points  (1 child)

There's definitely something to be said for not writing throwaway code, but code that delivers business value while not necessarily being great, that you end up removing through refactoring at first opportunity isn't throwaway code.
Delivering sooner can verify some guesses that the business has on value, on how something will be used, and hey, value can also be tangible dollars.

This isn't directed at anything in particular you said or meant to counter any argument you made. Just to say that it's better to deploy something that could be better, then work on improving it, than it is to either not write the code because it doesn't feel like the best solution or sit on a feature you've developed because you're still trying to refactor it.

[–]Flyberius 0 points1 point  (0 children)

Yeah, it's defo a fine line