Belowland
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf to Programmer Humor@programming.dev • 1 year ago

Unused variables

sh.itjust.works

message-square
56
fedilink
886

Unused variables

sh.itjust.works

Sjmarf to Programmer Humor@programming.dev • 1 year ago
message-square
56
fedilink
alert-triangle
You must log in or register to comment.
  • @sik0fewl@lemmy.ca
    link
    fedilink
    16•1 year ago

    This is why I always write my methods from bottom to top. This way I’ve always got a return statement and I use my variables before they are even declared.

    • @NightAuthor@lemmy.world
      link
      fedilink
      English
      4•1 year ago

      For a second there I thought you might be serious

      • @ShouldIHaveFun@sh.itjust.works
        link
        fedilink
        2•1 year ago

        I do actually use variables before I declare them most of the time. IDEs make it so easy to then generate the declaration with the correct type.

        • @NightAuthor@lemmy.world
          link
          fedilink
          English
          1•1 year ago

          That’s true, in fact I’ve started doing that myself. Same with methods, instead of going and writing the method and then coming back to use it, I’ll write the invocation first.

    • @N0tTheBees@sh.itjust.works
      link
      fedilink
      1•1 year ago

      Ah an avid dreambird user I see

    • @bitcrafter@programming.dev
      link
      fedilink
      1•1 year ago

      Spotted the INTERCAL programmer.

Programmer Humor@programming.dev

!programmer_humor@programming.dev
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
  • 20 users / day
  • 305 users / week
  • 1.31K users / month
  • 4.4K users / 6 months
  • 2 subscribers
  • 1.54K Posts
  • 50.3K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.18.1
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org