Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf to Programmer [email protected] • 1 year ago

Unused variables

sh.itjust.works

message-square
52
fedilink
901

Unused variables

sh.itjust.works

Sjmarf to Programmer [email protected] • 1 year ago
message-square
52
fedilink
  • @[email protected]
    link
    fedilink
    17•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.

    • @[email protected]
      link
      fedilink
      English
      4•1 year ago

      For a second there I thought you might be serious

      • @[email protected]
        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.

        • @[email protected]
          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.

    • @[email protected]
      link
      fedilink
      1•1 year ago

      Ah an avid dreambird user I see

    • @[email protected]
      link
      fedilink
      1•1 year ago

      Spotted the INTERCAL programmer.

Programmer [email protected]

[email protected]
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: [email protected]

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
  • 57 users / day
  • 364 users / week
  • 1.64K users / month
  • 4.3K users / 6 months
  • 3 subscribers
  • 1.54K Posts
  • 54.8K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org