SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
GandhiTheDerg@pawb.social to Programmer Humor@lemmy.ml · 2 years ago

Personally I prefer throw new nullpointerexception

pawb.social

message-square
30
fedilink
414

Personally I prefer throw new nullpointerexception

pawb.social

GandhiTheDerg@pawb.social to Programmer Humor@lemmy.ml · 2 years ago
message-square
30
fedilink
alert-triangle
You must log in or register to comment.
  • nothacking@discuss.tchncs.de
    link
    fedilink
    arrow-up
    32
    ·
    2 years ago

    Linux: kill

    • Chris@lemmy.ml
      link
      fedilink
      English
      arrow-up
      22
      ·
      2 years ago

      Also Linux: zombies, orphans

      • Mirodir@lemmy.fmhy.ml
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 years ago

        Daemons

        • ℛ𝒶𝓋ℯ𝓃@pawb.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 years ago

          Crypt

      • ehrenschwan@feddit.de
        link
        fedilink
        English
        arrow-up
        9
        ·
        2 years ago

        Meanwhile docker compose: --remove-orphans

      • russjr08@outpost.zeuslink.net
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        Don’t forget fork!

      • dmxk@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Just make sure you don’t panic()

  • dullbananas@lemmy.ml
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    1
    ·
    2 years ago

    explode https://www.php.net/manual/en/function.explode.php

    • epyon22@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      16
      ·
      2 years ago

      This is my favorite. I did php early in my career and for years I would have to Google “<lang> equivalent explode/implode” because it was so memorable

      • TwilightKiddy@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 years ago

        Filthy barbaric PHP developers. It’s Split() and Join().

    • curiosityLynx@beehaw.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      I loved explode back when I frequently used PHP

  • yaniv@lemmy.ml
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    2
    ·
    2 years ago

    I love die()! but PHP has exit(), too, and it does the same thing

  • goodnessme@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    2 years ago

    C++ is actually std::exit(), exit() is C.

    • GandhiTheDerg@pawb.socialOP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Friends explained that to me, yeah. Oh well

  • GrishAix@feddit.de
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    2 years ago

    MS Developers: Kill all children

    • ndguardian@lemmy.studio
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 years ago

      Well I didn’t wake up today expecting to watch a video about task manager, but here I am.

      • GrishAix@feddit.de
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 years ago

        Now watching the Pinball video before going to bed.

  • kr0n@lemmy.ml
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 years ago

    php, the Dark Souls of the programming languages

    • Phoenixz@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      2 years ago

      Because?

      • Dandroid@dandroid.app
        link
        fedilink
        English
        arrow-up
        13
        arrow-down
        1
        ·
        2 years ago

        Y O U D I E D

        • flashgnash@lemm.ee
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 years ago

          I heard the sound when I read this

  • lowleveldata@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    I have never used System.exit() or sys.exit(). What is a use case where you would call these explicitly?

    • niq@discuss.tchncs.de
      link
      fedilink
      arrow-up
      24
      ·
      edit-2
      2 years ago

      For example if you want to set an explicit exit code. Calling python scripts will usually result in an exit code 0 after the script is run. If you want to set a different exit code for example 1 to indicate some error occured you can do that via sys.exit(1).

      Same thing applies to other languages of course.

    • epyon22@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      2 years ago

      Applications where you aren’t using some sort of framework. Usually MVC or other frameworks would handle this or are designed to continuously run.

      • jsveiga@vlemmy.net
        link
        fedilink
        arrow-up
        16
        ·
        2 years ago

        Perl is funnier, as these are valid ways of exiting with an exception:

        readFile() or die;

        die unless $a > $b;

    • ℛ𝒶𝓋ℯ𝓃@pawb.social
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      exit()-ing your step-sys already seems pretty explicit…

  • JebanuusPisusII@szmer.info
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    Libdbus: Trying to remove a child that doesn’t believe we’re it’s parent.

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

    PHP is so bad even PHP wants to die().

  • silenium_dev@etaorion.org
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    Fun fact: there’s a shorter way to throw a NullPointerException:

    throw null;
    

    Because throw throws a NPE if the parameter is null

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.

  • 407 users / day
  • 1.71K users / week
  • 2.41K users / month
  • 10.3K users / 6 months
  • 437 local subscribers
  • 35.7K subscribers
  • 1.73K Posts
  • 38.2K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org