Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
 cm0002   ( @cm0002@piefed.world )  to Programmer Humor@programming.devEnglish · 5 months ago

You typical Node project

lemmy.ml

message-square
28
link
fedilink
316

You typical Node project

lemmy.ml

 cm0002   ( @cm0002@piefed.world )  to Programmer Humor@programming.devEnglish · 5 months ago
message-square
28
link
fedilink
alert-triangle
You must log in or # to comment.
  •  dormedas   ( @dormedas@lemmy.dormedas.com ) 
    link
    fedilink
    arrow-up
    32
    ·
    5 months ago

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

    •  Shayeta   ( @Shayeta@feddit.org ) 
      link
      fedilink
      English
      arrow-up
      46
      ·
      5 months ago

      But I don’t NEED a wheel, I just need a tarp to put over this metal frame on my patio, and for some reason the tarp manufacturer attaches wheels and plane wings to it!?

      •  jol   ( @jol@discuss.tchncs.de ) 
        link
        fedilink
        arrow-up
        14
        ·
        5 months ago

        The package comes with all the bells and whistles but the final build only contains the tarp, if you import it right and tree shake it.

    •  fmstrat   ( @fmstrat@lemmy.nowsci.com ) 
      link
      fedilink
      English
      arrow-up
      12
      ·
      5 months ago

      The problem is “I need function, library with 1000 functions has function, include.” Library’s 823rd function turns out to have a vulnerability.

      •  bleistift2   ( @bleistift2@sopuli.xyz ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        Enter tree-shaking.

    •  I Cast Fist   ( @ICastFist@programming.dev ) 
      link
      fedilink
      arrow-up
      10
      ·
      5 months ago

      “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!”

      •  pinball_wizard   ( @pinball_wizard@lemmy.zip ) 
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

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

    •  MonkderVierte   ( @MonkderVierte@lemmy.zip ) 
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      Yes, but my moon rover’s wheels need to fulfill different requirements.

  •  LostXOR   ( @LostXOR@fedia.io ) 
    link
    fedilink
    arrow-up
    25
    ·
    edit-2
    5 months ago

    deleted by creator

    •  onnekas   ( @onnekas@sopuli.xyz ) 
      link
      fedilink
      arrow-up
      18
      ·
      5 months ago

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

      •  pinball_wizard   ( @pinball_wizard@lemmy.zip ) 
        link
        fedilink
        arrow-up
        4
        ·
        5 months ago

        …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.

  •  fahfahfahfah   ( @fahfahfahfah@lemmy.billiam.net ) 
    link
    fedilink
    English
    arrow-up
    23
    ·
    5 months ago

    And this is why tree shaking exists.

    •  sheepishly   ( @sheepishly@fedia.io ) 
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      I feel like the end result of tree shaking would be the image here https://fedia.io/m/programmer_humor@programming.dev/t/2547352/CSS-Gardening

      •  I Cast Fist   ( @ICastFist@programming.dev ) 
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        Gotta fix that link

        •  sheepishly   ( @sheepishly@fedia.io ) 
          link
          fedilink
          arrow-up
          1
          ·
          5 months ago

          Works on my machine…

  •  katy ✨   ( @cupcakezealot@piefed.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    16
    ·
    5 months ago

    the one on the right is also packages in node_modules that you’re actually using and specifically requested.

  •  mesa   ( @mesamunefire@piefed.social ) 
    link
    fedilink
    English
    arrow-up
    15
    ·
    5 months ago

    Very true.

    Python feels like that sometimes too. Except much more standard library which is much better than node modules.

    •  CameronDev   ( @CameronDev@programming.dev ) 
      link
      fedilink
      arrow-up
      16
      ·
      5 months ago

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

      •  PhilipTheBucket   ( @PhilipTheBucket@piefed.social ) 
        link
        fedilink
        English
        arrow-up
        18
        ·
        5 months ago

        I sort of have a suspicion that there is some mathematical proof that, as soon as it becomes quick and easy to import an arbitrary number of dependencies into your project along with their dependencies, the size of the average project’s dependencies starts to follow an exponential growth curve increasing every year, without limit.

        I notice that this stuff didn’t happen with package managers + autoconf/automake. It was only once it became super-trivial to do from the programmer side, that the growth curve started. I’ve literally had trivial projects pull in thousands of dependencies recursively, because it’s easier to do that than to take literally one hour implementing a little modified-file watcher function or something.

        •  CameronDev   ( @CameronDev@programming.dev ) 
          link
          fedilink
          arrow-up
          10
          ·
          5 months ago

          Its certainly more painful to collect dependencies with cmake, so its not worth doing if you can hand roll your own easily enough.

          The flip side is that by using a library, it theoretically means it should be fairly battle-tested code, and should be using appropriate APIs. File watching has a bunch of different OS specific APIs that could be used, in addition to the naive “read everything periodically” approach, so while you could knock something together in an hour, the library should be the correct approach. Sadly, at least in rust land, there are a ton of badly written libraries to wade through… 🤷

          •  PhilipTheBucket   ( @PhilipTheBucket@piefed.social ) 
            link
            fedilink
            English
            arrow-up
            9
            ·
            5 months ago

            Yeah. I have no idea what the answer is, just describing the nature of the issue. I come from the days when you would maybe import like one library to do something special like .png reading or something, and you basically did all the rest yourself. The way programming gets done today is wild to me.

            •  CameronDev   ( @CameronDev@programming.dev ) 
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              5 months ago

              I’m not sure its a problem in of itself, but i agree it definitely enables a problem. Between “is-even” and vibe coding, modern software engineering is in a very sorry state.

              •  PhilipTheBucket   ( @PhilipTheBucket@piefed.social ) 
                link
                fedilink
                English
                arrow-up
                4
                ·
                5 months ago

                Yeah. I feel like in a few years when literally nothing works or is maintainable, people are going to have a resurgent realization of the importance of reliability in software design, that just throwing bodies and lines of code at the problem builds up a shaky structure that just isn’t workable anymore once it grows beyond a certain size.

                We used to know that, and somehow we forgot.

      •  BehindTheBarrier   ( @BehindTheBarrier@programming.dev ) 
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        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.

        •  CameronDev   ( @CameronDev@programming.dev ) 
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          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.

    •  katy ✨   ( @cupcakezealot@piefed.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      also applicable to “installing modern drupal via composer”.

  •  unalivejoy   ( @joyjoy@lemmy.zip ) 
    link
    fedilink
    arrow-up
    3
    ·
    5 months ago

    Also C programmers using glibc

  •  QuantumTickle   ( @QuantumTickle@lemmy.zip ) 
    link
    fedilink
    arrow-up
    3
    ·
    5 months ago

    I should check Go’s pkg folder…

    •  goatinspace   ( @goatinspace@feddit.org ) 
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      Rust is like nodejs

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 304 users / day
  • 1.72K users / week
  • 4.1K users / month
  • 8.27K users / 6 months
  • 448 local subscribers
  • 28.1K subscribers
  • 1.17K Posts
  • 19.1K Comments
  • Modlog
  • mods:
  •  Feyter   ( @Feyter@programming.dev ) 
  •  adr1an   ( @anzo@programming.dev ) 
  •  BurningTurtle   ( @BurningTurtle@programming.dev ) 
  •  Pierre-Yves Lapersonne   ( @pylapp@programming.dev ) 
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code