Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. They can see the policy working...

They can see the policy working...

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
36 Posts 25 Posters 2 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q [email protected]

    Except those imports were used by a huge section of code you temporarily commented out, and now you'll need to manually select a dozen imports to get it working again when you come back to it.

    (Sure you could have just commented out the unused imports, but the linter auto-sorted them and you're feeling too lazy to copy-paste a dozen scattered lines)

    C This user is from outside of this forum
    C This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #7

    Use a good IDE, and readding the imports is pretty easy.

    I find commented code to be a bit of a smell on its own, just delete it, and if you really need it again, dig it out of source control.

    J 1 Reply Last reply
    10
    • R [email protected]

      Code reviews?

      C This user is from outside of this forum
      C This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #8

      "It passed CI, LGTM"

      M 1 Reply Last reply
      21
      • C [email protected]

        Use a good IDE, and readding the imports is pretty easy.

        I find commented code to be a bit of a smell on its own, just delete it, and if you really need it again, dig it out of source control.

        J This user is from outside of this forum
        J This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #9

        Yeah. My last job, a PR with commented out code typically wouldn't get approved. Either leave it in version history, or stick it on a branch

        1 Reply Last reply
        6
        • R [email protected]

          Code reviews?

          M This user is from outside of this forum
          M This user is from outside of this forum
          [email protected]
          wrote on last edited by [email protected]
          #10

          The developer I report to was in charge of that side of the code base and doing all the code reviews for it .... I thought he had a handle on it 😕

          1 Reply Last reply
          7
          • blaue_fledermaus@mstdn.ioB [email protected]

            That is what version control is for.

            entropicdrift@lemmy.sdf.orgE This user is from outside of this forum
            entropicdrift@lemmy.sdf.orgE This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #11

            This. Commenting out code is bad practice

            naeap@sopuli.xyzN U 2 Replies Last reply
            19
            • Q [email protected]

              Except those imports were used by a huge section of code you temporarily commented out, and now you'll need to manually select a dozen imports to get it working again when you come back to it.

              (Sure you could have just commented out the unused imports, but the linter auto-sorted them and you're feeling too lazy to copy-paste a dozen scattered lines)

              C This user is from outside of this forum
              C This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #12

              Honestly I'll disable linting across entire files during these kinds of refactors because it's annoying having build output littered with unused imports and format warnings while I'm still working on a solution. Requires some extra diligence to re-enable and clean up before pushing though.

              Z 1 Reply Last reply
              1
              • C [email protected]

                "It passed CI, LGTM"

                M This user is from outside of this forum
                M This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #13

                My eye just twitched

                C 1 Reply Last reply
                5
                • C [email protected]

                  Honestly I'll disable linting across entire files during these kinds of refactors because it's annoying having build output littered with unused imports and format warnings while I'm still working on a solution. Requires some extra diligence to re-enable and clean up before pushing though.

                  Z This user is from outside of this forum
                  Z This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #14

                  Use pre-commit with a linter config that checks all files, local dev can have a different config to disable as needed.

                  1 Reply Last reply
                  2
                  • Q [email protected]

                    Except those imports were used by a huge section of code you temporarily commented out, and now you'll need to manually select a dozen imports to get it working again when you come back to it.

                    (Sure you could have just commented out the unused imports, but the linter auto-sorted them and you're feeling too lazy to copy-paste a dozen scattered lines)

                    T This user is from outside of this forum
                    T This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #15

                    During code review, we reject PR’s with commented out code. Problem solved.

                    1 Reply Last reply
                    2
                    • X [email protected]
                      This post did not contain any content.
                      savvywolf@pawb.socialS This user is from outside of this forum
                      savvywolf@pawb.socialS This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #16

                      Hot take: Clean up your darn imports. Otherwise you just make the links between modules confusing and messy.

                      J 1 Reply Last reply
                      46
                      • X [email protected]
                        This post did not contain any content.
                        C This user is from outside of this forum
                        C This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #17

                        The duality of Programmer Humor: You get posts complaining about bloat, and posts complaining about this.

                        K X 2 Replies Last reply
                        15
                        • M [email protected]

                          My eye just twitched

                          C This user is from outside of this forum
                          C This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #18

                          Move over vibe coding, we vibe reviewing now

                          B M U 3 Replies Last reply
                          10
                          • entropicdrift@lemmy.sdf.orgE [email protected]

                            This. Commenting out code is bad practice

                            naeap@sopuli.xyzN This user is from outside of this forum
                            naeap@sopuli.xyzN This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #19

                            In general, I'm with you
                            But sometimes I need to revert/comment out a code block, because another code part isn't finished/working as it should.
                            Sure, it clutters code, but if I just comment out a function call and temporarily replace it with the workaround, it should imho stay in code.

                            Else the workaround will stay forever and the commented out code will act as a reminder, that this part isn't clean yet.

                            But maybe it really is a case by case thing, where sometimes it's better to branch it out for later merge - although that can get really messy, while having the future implementation commented out, others will also see, how it is supposed to work and don't try to further extend the workaround, which makes future merging hell

                            Out of interest, how would your best practice look in such cases?

                            entropicdrift@lemmy.sdf.orgE 1 Reply Last reply
                            2
                            • M [email protected]

                              Hum... Ignore linter advice for code that you temporarily mangled.

                              It's not like you have to act upon it as soon as a blue line appears under your code.

                              bleistift2@sopuli.xyzB This user is from outside of this forum
                              bleistift2@sopuli.xyzB This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #20

                              Depending on the configuration, a linter may cause the compilation or a CI pipeline to fail.

                              M 1 Reply Last reply
                              0
                              • C [email protected]

                                The duality of Programmer Humor: You get posts complaining about bloat, and posts complaining about this.

                                K This user is from outside of this forum
                                K This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #21

                                Competent people vs incompetent people.

                                U 1 Reply Last reply
                                3
                                • C [email protected]

                                  The duality of Programmer Humor: You get posts complaining about bloat, and posts complaining about this.

                                  X This user is from outside of this forum
                                  X This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #22

                                  1 Reply Last reply
                                  21
                                  • bleistift2@sopuli.xyzB [email protected]

                                    Depending on the configuration, a linter may cause the compilation or a CI pipeline to fail.

                                    M This user is from outside of this forum
                                    M This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #23

                                    Failing your local compilation due to linter problems is just stupid.

                                    Sending "temporary" changes into your CI pipeline isn't even stupid, it's borderline malicious.

                                    bleistift2@sopuli.xyzB 1 Reply Last reply
                                    0
                                    • naeap@sopuli.xyzN [email protected]

                                      In general, I'm with you
                                      But sometimes I need to revert/comment out a code block, because another code part isn't finished/working as it should.
                                      Sure, it clutters code, but if I just comment out a function call and temporarily replace it with the workaround, it should imho stay in code.

                                      Else the workaround will stay forever and the commented out code will act as a reminder, that this part isn't clean yet.

                                      But maybe it really is a case by case thing, where sometimes it's better to branch it out for later merge - although that can get really messy, while having the future implementation commented out, others will also see, how it is supposed to work and don't try to further extend the workaround, which makes future merging hell

                                      Out of interest, how would your best practice look in such cases?

                                      entropicdrift@lemmy.sdf.orgE This user is from outside of this forum
                                      entropicdrift@lemmy.sdf.orgE This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by [email protected]
                                      #24

                                      I would make it a TODO so that it's clearly temporary and so the linter bugs me about it until the intended permanent code is restored.

                                      In general I prefer to keep separate branches and maybe a draft PR open for visibility for that kind of situation, though.

                                      1 Reply Last reply
                                      3
                                      • savvywolf@pawb.socialS [email protected]

                                        Hot take: Clean up your darn imports. Otherwise you just make the links between modules confusing and messy.

                                        J This user is from outside of this forum
                                        J This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #25

                                        Sounds like a perfectly normal take.

                                        C 1 Reply Last reply
                                        11
                                        • M [email protected]

                                          Failing your local compilation due to linter problems is just stupid.

                                          Sending "temporary" changes into your CI pipeline isn't even stupid, it's borderline malicious.

                                          bleistift2@sopuli.xyzB This user is from outside of this forum
                                          bleistift2@sopuli.xyzB This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #26

                                          Sending “temporary” changes into your CI pipeline isn’t even stupid, it’s borderline malicious.

                                          No? “Hey customer, I’ve deployed the changes you requested to the staging area. Is this what you had in mind? Keep in mind it only looks good and isn’t fully functional yet.”

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups