Dendarii
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago

===

programming.dev

message-square
76
fedilink
677

===

programming.dev

JPDev@programming.dev to Programmer Humor@programming.dev · 1 year ago
message-square
76
fedilink
  • BaardFigur@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    1 year ago

    deleted by creator

    • schnurrito@discuss.tchncs.de
      link
      fedilink
      arrow-up
      16
      ·
      1 year ago

      by not ever using == and !=, but only === and !==

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      1 year ago

      Typescript :)

      • ByteJunk@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Yep. It’s the only reason I’m still somewhat sane.

        • fidodo@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          I got by without it for years, but not that I have it I have no idea how I did it back then.

    • blackn1ght@feddit.uk
      link
      fedilink
      arrow-up
      10
      ·
      1 year ago

      Because in reality you’re not doing stupid stuff like that in the image. And using Typescript definitely helps.

      However I’m always annoyed that the month parameter when constructing a date object is 0 based. So 1st of Jan is

      new Date(2024, 0, 1)
      
      • BaardFigur@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        1 year ago

        deleted by creator

      • JaddedFauceet@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Looks confusing at first, but I found it nice for accessing a month array.

        const months = ["Jan", "Feb", ...];
        
        months[0] === "Jan";
        
        const label = months[date.getMonth()];
        
    • darcy@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      almost forced to for web front end. why you would use it anywhere else, however, i will never know

      • Turun@feddit.de
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        The same reason people drive their car to buy groceries.

        You bought it for something where it was the only option, driving 30km to work everyday. But ever since you got it, the trip to the super market is kinda too hot in the summer and too cold in the winter and what if you spontaneously need to buy more than expected?

        People learn it for front end dev, and then they use what they know for back end too.

    • JaddedFauceet@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      By banishing the bad part of the language with linter.

      For instance, standard eslint preset has rules that enforce usage of ===, https://eslint.org/docs/latest/rules/eqeqeq

      These rules often come with project starter template

      • fidodo@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 year ago

        And typescript is basically just a linter on steroids

    • FrostKing@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Ikr? English is hard /s

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: [email protected]

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.

  • 1.04K users / day
  • 4.72K users / week
  • 8.59K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 23.1K subscribers
  • 1.26K Posts
  • 39.7K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org