rmict.nl
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
baatliwala@lemmy.world to Programmer Humor@programming.dev · 8 days ago

Look at the way he writes for loops too smh

lemmy.world

message-square
28
link
fedilink
421

Look at the way he writes for loops too smh

lemmy.world

baatliwala@lemmy.world to Programmer Humor@programming.dev · 8 days ago
message-square
28
link
fedilink
  • JohnAnthony@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    7
    ·
    8 days ago

    Beginner mistake, which is perfectly fine! Just use i-1 inside the loop and i <= values.Length as the condition.

    • ChickenLadyLovesLife@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      My favorite:

      for (int i = myArray.Length; i --> 0; )
      {
          //do something
      }
      

      Perfectly valid in C-style, even if it does look a bit puzzling at first.

      • Gumus@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        4
        ·
        7 days ago

        That should be a war crime.

        • ChickenLadyLovesLife@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          7 days ago

          From the river to the C

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
Visibility: Public
globe

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

  • 881 users / day
  • 3.87K users / week
  • 7.63K users / month
  • 18K users / 6 months
  • 1 local subscriber
  • 31.2K subscribers
  • 1.39K Posts
  • 32.2K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.18
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org