• ryan@the.coolest.zone
    link
    fedilink
    arrow-up
    127
    ·
    1 year ago

    Let him play in the legacy code. You can just hose him off later before letting him back into the office so he doesn’t track it everywhere.

    • ISometimesAdmin@the.coolest.zone
      link
      fedilink
      arrow-up
      59
      ·
      1 year ago

      Unfortunately if you let Junior play in legacy code once, it’ll learn some nasty habits and make more of it from scratch, usually when you’re trying to sleep.

      • CodeMonkey@programming.dev
        link
        fedilink
        arrow-up
        10
        ·
        1 year ago

        If you are creating an alternative implementation and leaving the old one in place, you are not fixing a problem, you are just creating a new one (and a third one because you have duplication of logic).

        Either refactor the old function so that it transparently calls the new logic or delete the old function and replace all the existing usage with usage of the new one. It does not need to happen as a single commit. You can check in the new function, tell everyone to use it, and clean up usage of the old one. If anyone tries to use the old implementation, call them out in a code review.

        If removing or replacing the old implementation is not possible, at least mark it as deprecated so that anyone using it gets a warning.

  • Bappity@lemmy.world
    link
    fedilink
    English
    arrow-up
    49
    ·
    edit-2
    1 year ago

    me when first starting out at a job commenting everything I can
    VS
    me a couple years in completely lost because I never updated the comments and now none of them make any sense whatsoever

  • magic_lobster_party@kbin.social
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    1 year ago

    There’s also that long time senior dev who’s overly confident in their abilities and force pushes production breaking code directly to master.

  • ericbomb@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Look, it’s me.

    Just let me rewrite ONE report from scratch so it doesn’t check a specific unindexed table that it doesn’t actually need to check and causes the report to be killed by MSQL because it takes too long to run.

    Please just one rewrite. Please.

    Just one little crystal report.

    • justJanne@startrek.website
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Often enough, the old code is so badly intertwined that it’s impossible to actually test. Those are the moments where all you can do is nuke it from orbit.

      • XTornado@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Well I was going for that… They will surrender before they do any changes.