lemmy.mkwarman.com
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago

counting

lemmy.world

message-square
7
fedilink
-1

counting

lemmy.world

hairinmybellybutt@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago
message-square
7
fedilink
alert-triangle
You must log in or register to comment.
  • Arthur Besse@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 years ago

    0 ✊

    1 👍

    2 ☝️

    3 👆

    4 🖕

    • xmunk@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 years ago

      Hey, fourck you too, man.

  • maniacal_gaff@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    counting != indexing

  • Destide@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 years ago

    Haaaaaang on is that why we start on 0…

    • macniel@feddit.de
      link
      fedilink
      arrow-up
      0
      ·
      2 years ago

      No. We count start at zero because the array already starts with an element of a specific size. Starting at 1 would always skip that initial element.

      • BorgDrone@lemmy.one
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        2 years ago

        No, we start counting at one. We start indexing at zero.

        An array with one element has an element count of 1, and that element would be at index 0.

        • LaggyKar@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          This is how we end up with off-by-one errors

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

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: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

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

  • 229 users / day
  • 1.06K users / week
  • 3.33K users / month
  • 9.97K users / 6 months
  • 1 local subscriber
  • 37K subscribers
  • 1.48K Posts
  • 20.1K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org