Fanaticus
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@Aijan@programming.dev to Programming@programming.dev • 7 months ago

Self-documenting Code

lackofimagination.org

external-link
message-square
72
fedilink
86
external-link

Self-documenting Code

lackofimagination.org

@Aijan@programming.dev to Programming@programming.dev • 7 months ago
message-square
72
fedilink
Think back to the last time you looked at an unfamiliar block of code. Did you immediately understand what it was doing? If not, you’re not alone – many software developers, including myself, find it challenging to grasp unfamiliar code quickly…
  • @hex@programming.dev
    link
    fedilink
    6•7 months ago

    I mean, boolean short circuit is a super idiomatic pattern in Javascript

    • @arendjr@programming.dev
      link
      fedilink
      7•7 months ago

      I think that’s very team/project dependent. I’ve seen it done before indeed, but I’ve never been on a team where it was considered idiomatic.

      • @hex@programming.dev
        link
        fedilink
        1•7 months ago

        That makes sense.

    • @clutchtwopointzero@lemmy.world
      link
      fedilink
      2•7 months ago

      Because on JS the goal is to shave bytes to save money on data transfer rates

      • @hex@programming.dev
        link
        fedilink
        2•7 months ago

        It’s not that deep. It looks nice, and is easy to understand.

Programming@programming.dev

!programming@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: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 136 users / day
  • 1.05K users / week
  • 2.94K users / month
  • 7.14K users / 6 months
  • 20.1K subscribers
  • 2.18K Posts
  • 33.5K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • @MaungaHikoi@lemmy.nz
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org