Seems to me not enough people learn how to refactor code.
So many devs see getting something working as the final goal and move on to something else the moment it does. It's like taking a dump without wiping your arse.
Getting something working is only the first step of the process, once you've worked out how it can be done you need to work out how it can be done well. Taking a little extra time to tidy up your code and name your functions and variables sensibly will pay dividends down the line and make refactoring a lot easier.
Yeah, it's across the board it's not down to experience.
Sure sometimes you need to make do to meet deadlines and many times you'll even get away with just using whatever works. But I've also seen a fair few features delayed or become completely unfeasible due to code rot.
Also the more you refactor the more efficient you become at doing it.
Seems to me not enough people learn how to refactor code.
So many devs see getting something working as the final goal and move on to something else the moment it does. It's like taking a dump without wiping your arse.
Getting something working is only the first step of the process, once you've worked out how it can be done you need to work out how it can be done well. Taking a little extra time to tidy up your code and name your functions and variables sensibly will pay dividends down the line and make refactoring a lot easier.
lol nice comment while eating breakfast.
This has been my experience as well with developers (not just 'junior', but even more experienced ones)
Yeah, it's across the board it's not down to experience.
Sure sometimes you need to make do to meet deadlines and many times you'll even get away with just using whatever works. But I've also seen a fair few features delayed or become completely unfeasible due to code rot.
Also the more you refactor the more efficient you become at doing it.
Print that on a mug!