4

I asked this on Twitter, but I get the feeling that I might get more responses here and I'm really curious to know what people's answers are.

No judgement question: As a developer, when you’re working on a project that involves something you’ve done previously, how often do you check if the way you previously did it is still the recommended way before referring to your old code to accomplish the task?

Comments
  • 6
    Never, as there is always something new and a different strategy to implement that system that works better without that balast.
  • 2
    Not to often, but on the other hand I read a lot about new developments so if some old truth really needs changing, for example if an exploit has been found, I quite often find that out.

    Reverifying everything you have learned over the years would take ages and even if there is a new better way, the extra time to research and learn might not be worth it? Especially if its a more complex thing as you are more likely to do something wrong ;)
  • 4
    I'll refactor bits to improve it.

    But "recommend way"....hell if I know what that is...
  • 0
    I always check how I have done it first, directly copy if I can. If there is a chance to improve, i will take it. I won’t beat up myself over it to achieve perfect solution though.
  • 0
    Almost never.

    One problem is shortage of time.

    Second is dependency, when muliple people are working on a project refactoring becomes really a problem. Thats why we have code reviews and static analysers to check if we are following best practises in place as much as possible.

    That being said, if the changes are relatively small or causing a vulnerability, I do refactor to make it sync with the current development processes.
  • 0
    depends on the scope.

    if it’s a small task i can remember i’ll redo it.

    if i can’t a sneak peek.

    if the task is so big porting make sense (=will save a lot of time in the long run) i’ll copy it over and tweak it
  • 1
    Anything I did as a junior dev, I would check.

    As a senior dev, generally have the belief in oneself that I did a good and full implementation as code reuse is one of the fundamental tenants of software development (not all would agree, but hey, some people have the time and inclination to re-invent the wheel. I'm not saying that's a bad thing. Some wheels are shitter than others!)
  • 0
    Only if my code involves anything regarding security or encryption.

    Don't see why I would otherwise.
Add Comment