Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
sus ( sus@programming.dev )  to Programmer Humor@programming.dev · 2 years ago

average day in NPM land

programming.dev

message-square
63
link
fedilink
455

average day in NPM land

programming.dev

sus ( sus@programming.dev )  to Programmer Humor@programming.dev · 2 years ago
message-square
63
link
fedilink
  • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
    link
    fedilink
    English
    arrow-up
    13
    ·
    2 years ago

    i think programmers need a self inflicted rule of it being less than 500 lines of code means you need to write it instead of using a pre written package/library.

    On the other hand, we could make the packages like is-number the worst possible way of checking if something is a number, which would be really fucking funny…

    • Kogasa ( kogasa@programming.dev ) 
      link
      fedilink
      arrow-up
      22
      ·
      2 years ago

      I have read programs a lot shorter than 500 lines which I don’t have the expertise to write.

      • Lightfire228 ( Lightfire228@pawb.social ) 
        link
        fedilink
        arrow-up
        10
        ·
        2 years ago

        Shell scripts don’t count

        That’s not a programming language, that’s hieroglyphs

        • SaharaMaleikuhm ( SaharaMaleikuhm@feddit.org ) 
          link
          fedilink
          arrow-up
          6
          ·
          2 years ago

          Skill issue

        • UnbalancedFox ( UnbalancedFox@lemmy.ca ) 
          link
          fedilink
          arrow-up
          4
          ·
          2 years ago

          Amen!

      • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        well obviously shit like wozmon exists, but there definitely needs to be a rule to prevent handicap shit like “is-number”

        the vast majority of programmers have the problem solving capability of a child who took shit apart constantly due to autism.

    • Match!! ( match@pawb.social ) 
      link
      fedilink
      English
      arrow-up
      13
      ·
      2 years ago

      500 is fucking massive maybe try 5

      • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        true, i was giving the benefit of doubt to idiot programmers lol

    • dan ( dan@upvote.au ) 
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      2 years ago

      programmers need a self inflicted rule of it being less than 500 lines of code means you need to write it instead of using a pre written package/library.

      That’s what I do, but then I end up with similar utils across multiple projects (eg some of these array, map, and set utils: https://github.com/Daniel15/dnstools/tree/master/src/DnsTools.Web/ClientApp/src/utils) and wonder if I should create a library.

      Then I end up doing that (https://github.com/Daniel15/jsframework is my most ‘recent’ one, now very outdated) but eventually the library gets outdated and you end up deleting most of it and starting again. (edit: practically this entire library is obsolete how)

      It’s the circle of life.

      • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        i wonder if maybe we just need personal package repos for shit like this, stuff that probably shouldnt be out on the internet and accessible, but that’s also worth packaging for regular use. Like a sort of “code macro” which is something i see people doing a lot for certain boilerplate strings.

    • jonne ( jonne@infosec.pub ) 
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Eh, I can see why you’d want something like that in a language like JavaScript where pretty much all native ways of validating input have weird edge cases. Sometimes you just want the community to figure it out for you instead of reinventing the wheel and finding out you missed something later on.

      A whole package that handles validation of inputs, or a math package would be better than a package that just has one function tho.

      • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        yeah, generally it seems like you want a more broad package, if for something like validating input, it would be comprehensive across all input for example.

        There’s one package on npm called is-even and i think another called is-odd, which according to the author are “learning experiences” which have, considerable amounts of downloads, even though it’s literally just is-even checking. Shit like that should probably get you banned from using keyboards for the rest of your life lol

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.

  • 586 users / day
  • 1.51K users / week
  • 3.32K users / month
  • 7.29K users / 6 months
  • 463 local subscribers
  • 33.6K subscribers
  • 1.53K Posts
  • 25.2K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code