L E F L I
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@literature.cafe to Programmer Humor@programming.dev · 16 days ago

NPM driven development

lemmy.ml

message-square
22
link
fedilink
19

NPM driven development

lemmy.ml

cm0002@literature.cafe to Programmer Humor@programming.dev · 16 days ago
message-square
22
link
fedilink
alert-triangle
You must log in or register to comment.
  • xangadix@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    16 days ago

    Is this functional programming?

    • anewfox@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      22 hours ago

      deleted by creator

    • kunaltyagi@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      🦋

  • anewfox@lemmy.zip
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    22 hours ago

    deleted by creator

  • Enkrod@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    16 days ago

    condition() is undefined, should be ifCondition()

  • eah@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    16 days ago

    Oh, I’d recognize those parenthesis anywhere. Any sufficiently complicated javascript program contains an ad hoc, informally-specified, bug-ridden, supply-chain-vulnerable, slow implementation of half of Common Lisp.

  • gegil@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    ·
    16 days ago

    There wouldnt be a ram crisis if nobody needed a 32 gigs of ram in their pc just to run a “hello world” web app.

  • [object Object]@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    16 days ago

    And thus, js becomes lisp.

    • Jerkface (any/all)@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      edit-2
      16 days ago

      Those who fail to study Lisp are condemned to reinvent it, poorly.

  • Sandbox@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    16 days ago

    Coding noob here. What am I looking at? I want to laugh too. :(

    • 42yeah@eviltoast.org
      link
      fedilink
      arrow-up
      2
      ·
      16 days ago

      npm, or node js by extension, is famous (infamous?) for having a library for however simple something is to implement. For example a whole library to trim spaces of a string, but only for the left side. Here the joke takes it to the extreme and even import numbers, if conditions, etc., features that are already available in the core language, from external npm libraries, and use that to write a code snippet.

      • Sandbox@lemmy.zip
        link
        fedilink
        arrow-up
        2
        ·
        15 days ago

        That’s…amazing haha thank you for your reply!

      • BradleyUffner@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        16 days ago

        My favorite was IsEven. An entire library to tell you if a number is even. And then IsOdd, that does the opposite, which takes IsEven as a dependenxy.

        • filcuk@feddit.uk
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago

          Only cowards use the NOT operator

    • aldhissla@beehaw.org
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      Everything is from an imported library

      • Sandbox@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        15 days ago

        I for one support local libraries. They’re an invaluable resource for the community and I support them 100%

        • aldhissla@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          14 days ago

          Hehehe, ok.

          Those require lines there, they’re importing code written elsewhere. We call that code a library. Take the first one:

          var zero = require("number-zero");

          defines a variable called zero, imports a library called number-zero (not a real library btw, just a joke), and assigns its value (assumed to be the constant 0) to the variable. Later in line 19, zero is read.

          The joke is that you wouldn’t even write line 2 and use a simple 0 instead of zero in line 19. The code is full of unnecessary imports of basic language components.

  • Sanctus@anarchist.nexus
    link
    fedilink
    English
    arrow-up
    2
    ·
    16 days ago

    Yeah I write clean readable code, how could you tell?

  • flango@lemmy.eco.br
    link
    fedilink
    arrow-up
    2
    ·
    16 days ago

    standard Javascript experience

    • Tartas1995@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      Only if you write bad js.

    • anewfox@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      22 hours ago

      deleted by creator

  • gen/Eric Computers@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    15 days ago

    var and require()? What is this?

    Come over to modern JavaScript or even Typescript, it’s nice here.

  • bitjunkie@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    16 days ago

    Clearly written by some smug [insert language here] dev… Nobody actually working in the JS/TS ecosystem is using var in 2026.

    • undree@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      15 days ago

      Also commonjs imports

  • onlinepersona@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    15 days ago

    Also known as functional programming.

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
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

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

  • 749 users / day
  • 6.34K users / week
  • 7.07K users / month
  • 15.4K users / 6 months
  • 1 local subscriber
  • 34.3K subscribers
  • 2.54K Posts
  • 92.2K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.21
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org