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

Look at the way he writes for loops too smh

lemmy.world

message-square
21
fedilink
380

Look at the way he writes for loops too smh

lemmy.world

baatliwala@lemmy.world to Programmer Humor@programming.dev · 17 days ago
message-square
21
fedilink
alert-triangle
You must log in or register to comment.
  • Lysergid@lemmy.ml
    link
    fedilink
    arrow-up
    82
    arrow-down
    1
    ·
    17 days ago

    TF is this formatting

    • Jumuta@sh.itjust.works
      link
      fedilink
      arrow-up
      51
      ·
      17 days ago

      c for smartphones

      • Lucy :3@feddit.org
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        17 days ago

        just zoom out and go closer to the screen

        • Jankatarch@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          edit-2
          17 days ago

          I read it as if they are calling java “C for smartphones” instead lmao.

          • egrets@lemmy.world
            link
            fedilink
            arrow-up
            14
            ·
            17 days ago

            This is C#, isn’t it?

            • Jankatarch@lemmy.world
              link
              fedilink
              arrow-up
              6
              ·
              edit-2
              17 days ago

              Oh shit, it is. Didn’t notice the “.Length”

    • Quibblekrust@thelemmy.club
      link
      fedilink
      English
      arrow-up
      3
      ·
      15 days ago

      Semicolons belong at the end of lines. No exceptions.

  • ranzispa@mander.xyz
    link
    fedilink
    arrow-up
    34
    ·
    17 days ago

    Clearly Kendrick Lamar started programming in the 70s in Fortran, had a small flirt with MATLAB and ended up using Julia in the end.

    I didn’t know he was so strong in scientific computing.

  • PantaloonMonsoon@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    17 days ago

    This is why he told Drake he better never go to cell block 1 instead of cell block 0.

  • JohnAnthony@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    7
    ·
    17 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
      ·
      17 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
        ·
        17 days ago

        That should be a war crime.

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

          From the river to the C

  • vrek@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    17 days ago
    1. I never mock those who are trying to learn.

    2. Why is he starting with c/c++? Yes they have uses but not as a starter just playing around.

    3. I struggled with this initially too cause I didn’t understand why. Most people would say “give me the first object”. In reality your requesting an offset * size of each item + list start.

    • AirBreather@lemmy.world
      link
      fedilink
      arrow-up
      18
      ·
      17 days ago

      This sure looks like C# to me, not C/C++

      • Sickday@kbin.earth
        link
        fedilink
        arrow-up
        6
        ·
        17 days ago

        It’s K.Dotnet

    • baatliwala@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      17 days ago

      You’re taking a shitpost too seriously mate

  • vala@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    5
    ·
    17 days ago

    He uses lua

    • vocornflakes@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      17 days ago

      Oh but Lua is so much worse than that. Table keys (array is not a thing in Lua) can be whatever you want. Especially even negative, and not like how python does it. 1 is just the convention.

  • mexicancartel@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    17 days ago

    Haha i use fortran

  • Codpiece@feddit.uk
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    17 days ago

    What’s worse, starting at 1 or using AI to write it for you?

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.

  • 904 users / day
  • 2.38K users / week
  • 5.02K users / month
  • 13.2K users / 6 months
  • 1 local subscriber
  • 31.3K subscribers
  • 1.96K Posts
  • 51K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org