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. You typical Node project

You typical Node project

Scheduled Pinned Locked Moved Programmer Humor
67 Posts 47 Posters 16 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.
  • F [email protected]

    And this is why tree shaking exists.

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

    It's great when it works, yeah.

    1 Reply Last reply
    0
    • C [email protected]

      Rust as well. Seems to just be a modern language thing.

      B This user is from outside of this forum
      B This user is from outside of this forum
      [email protected]
      wrote last edited by [email protected]
      #42

      At least Rust compiles down to what is used. I don't know if js has any of that, but at least with rust the final program doesn't ship tons of bloat.

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

        At least Rust compiles down to what is used. I don't know if js has any of that, but at least with rust the final program doesn't ship tons of bloat.

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

        Yes and no, the linker does nicely trim a lot of the fat, but rust binaries are still pretty chonky. Its good chonky (debug etc), and static compile doesnt help, but they are quite fat.

        Also doesnt help compile times that you have to build all this extra stuff, only to throw most of it away.

        1 Reply Last reply
        0
        • L [email protected]

          Why write code, when someone else already wrote it?

          O This user is from outside of this forum
          O This user is from outside of this forum
          [email protected]
          wrote last edited by
          #44

          Why not import all code ever created by human kind just in case we might need some of it.

          S P 2 Replies Last reply
          15
          • C [email protected]
            This post did not contain any content.
            M This user is from outside of this forum
            M This user is from outside of this forum
            [email protected]
            wrote last edited by
            #45

            Wait until OP finds out about interpreters and compilers.

            1 Reply Last reply
            2
            • D [email protected]

              Feels like a lot of “not inventing the wheel” - which is good? There are plenty of good wheels out there.

              icastfist@programming.devI This user is from outside of this forum
              icastfist@programming.devI This user is from outside of this forum
              [email protected]
              wrote last edited by
              #46

              "Yes, I'd like a wheel. I don't want to invent it. Why, of course, give me the full package of wheel, axis, rotor, engine, fuel tank, windshield, mirrors, tire, front panel, brakes. This wheel will be great for me manually spinning cotton!"

              P 1 Reply Last reply
              8
              • zea_64@lemmy.blahaj.zoneZ [email protected]

                Dead code elimination but with a different name for some reason

                Q This user is from outside of this forum
                Q This user is from outside of this forum
                [email protected]
                wrote last edited by
                #47

                Because we're monkeys

                M 1 Reply Last reply
                2
                • T [email protected]

                  Be the change you want to see in the world, people. Don't use any Node (or Rust or Python or Java or whatever) modules that have more dependencies than they absolutely, positively, 100%, for real have to. It's really not that hard. It doesn't have to be this way.

                  icastfist@programming.devI This user is from outside of this forum
                  icastfist@programming.devI This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #48

                  cries in legacy systems

                  1 Reply Last reply
                  1
                  • M [email protected]

                    Except in the picture on the left, someone's actually reading it.

                    Something's gone wrong if you're looking in the node_modules folder.

                    I This user is from outside of this forum
                    I This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #49

                    Sometimes you gotta monkey patch that library because they won’t accept your pull requests to fix that bug.

                    J 1 Reply Last reply
                    2
                    • O [email protected]

                      Why not import all code ever created by human kind just in case we might need some of it.

                      S This user is from outside of this forum
                      S This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #50

                      I want to build a kick scooter. For that I need some wheels. So I import the well-known semi-truck framework. From that framework I take some huge wheels. They are too large and too many, but I guess I can make do with them.

                      But I need to attach the wheels to one another, so I import the bridge-building-library, because they have steel bars in there.

                      Lastly, to attach all of that together I import the NASA space ship framework because there's a hand welder in there, that's been deprecated years ago, but it's still rotting away in there because some important products still require the hand welder class for some entirely unrelated use cases.

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

                        Also C programmers using glibc

                        1 Reply Last reply
                        0
                        • Q [email protected]

                          I should check Go's pkg folder...

                          G This user is from outside of this forum
                          G This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #52

                          Rust is like nodejs

                          1 Reply Last reply
                          1
                          • I [email protected]

                            Sometimes you gotta monkey patch that library because they won’t accept your pull requests to fix that bug.

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

                            At least you can monkeypatch it.

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

                              I used to struggle with this, until I realized what's really going on. To do conventional web development, you have to download a zillion node modules so you can:

                              • Build one or more "transpilers" (e.g. Typescript, Sass support, JSX)
                              • Build linters and other SAST/DAST tooling
                              • Build packaging tools, to bundle, tree-shake, and minify your code
                              • Use shims/glue to hold all that together
                              • Use libraries that support the end product (e.g. React)
                              • Furnish multiple versions of dependencies in order for each tool to have its own (stable) graph

                              All this dwarfs any code you're going to write by multiple orders of magnitude. I once had a node_modules tree that clocked in at over 1.5GB of sourcecode. What I was writing would have fit on a floppy-disk.

                              That said, it's kind of insane. The problem is that there's no binary releases, nor fully-vendored/bundled packages. The entire toolchain source, except nodejs and npm, is downloaded in its entirety, on every such project you run.

                              In contrast, if you made C++ or Rust developers rebuild their entire toolchain from source on every project, they'd riot. Or, they would re-invent binary releases that weekend.

                              S C 2 Replies Last reply
                              8
                              • C [email protected]

                                Or bugs that you only work out much later on.

                                A This user is from outside of this forum
                                A This user is from outside of this forum
                                [email protected]
                                wrote last edited by
                                #55

                                Or someone deletes the axle repo and the wheel flies off.

                                1 Reply Last reply
                                1
                                • D [email protected]

                                  Feels like a lot of “not inventing the wheel” - which is good? There are plenty of good wheels out there.

                                  D This user is from outside of this forum
                                  D This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by
                                  #56

                                  You say that, but I've watched the JS community move from one framework and tool suite to the next quite rapidly. By my recollection, I've seen a wholesale change in popular tooling at least four times in the last decade. Granted, that's not every developer's trajectory through all this, but (IMO) that's still a lot.

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

                                    I used to struggle with this, until I realized what's really going on. To do conventional web development, you have to download a zillion node modules so you can:

                                    • Build one or more "transpilers" (e.g. Typescript, Sass support, JSX)
                                    • Build linters and other SAST/DAST tooling
                                    • Build packaging tools, to bundle, tree-shake, and minify your code
                                    • Use shims/glue to hold all that together
                                    • Use libraries that support the end product (e.g. React)
                                    • Furnish multiple versions of dependencies in order for each tool to have its own (stable) graph

                                    All this dwarfs any code you're going to write by multiple orders of magnitude. I once had a node_modules tree that clocked in at over 1.5GB of sourcecode. What I was writing would have fit on a floppy-disk.

                                    That said, it's kind of insane. The problem is that there's no binary releases, nor fully-vendored/bundled packages. The entire toolchain source, except nodejs and npm, is downloaded in its entirety, on every such project you run.

                                    In contrast, if you made C++ or Rust developers rebuild their entire toolchain from source on every project, they'd riot. Or, they would re-invent binary releases that weekend.

                                    S This user is from outside of this forum
                                    S This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #57

                                    And if you made JavaScript developers use compatible versions for everything they'd riot. And also every build would fail for, like, at least a week

                                    1 Reply Last reply
                                    5
                                    • O [email protected]

                                      Why not import all code ever created by human kind just in case we might need some of it.

                                      P This user is from outside of this forum
                                      P This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #58

                                      ...and then we can grind all the code ever created by human kind into a fine paste, and write a clever algorithm to regurgitate it as a squishy code slurry in response to questions about problems that the standard libraries already solved.

                                      1 Reply Last reply
                                      6
                                      • icastfist@programming.devI [email protected]

                                        "Yes, I'd like a wheel. I don't want to invent it. Why, of course, give me the full package of wheel, axis, rotor, engine, fuel tank, windshield, mirrors, tire, front panel, brakes. This wheel will be great for me manually spinning cotton!"

                                        P This user is from outside of this forum
                                        P This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by [email protected]
                                        #59

                                        And I have the option to spin cotton off-road on rugged terrain...so there's that...

                                        1 Reply Last reply
                                        0
                                        • D [email protected]

                                          You say that, but I've watched the JS community move from one framework and tool suite to the next quite rapidly. By my recollection, I've seen a wholesale change in popular tooling at least four times in the last decade. Granted, that's not every developer's trajectory through all this, but (IMO) that's still a lot.

                                          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 last edited by
                                          #60

                                          But changing frameworks is not why node_modules is so large. You don’t import Angular and Vue.

                                          D 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