lemmy.dudeami.win
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.zip to Programmer Humor@programming.dev · 1 个月前

More code = more better

lemmy.zip

message-square
90
link
fedilink
612

More code = more better

lemmy.zip

cm0002@lemmy.zip to Programmer Humor@programming.dev · 1 个月前
message-square
90
link
fedilink
  • OshaqHennessey@midwest.social
    link
    fedilink
    arrow-up
    57
    ·
    1 个月前
    function myFunction() {
      try {
        x = new Random().nextInt();
        if (x != 10) {
         throw "not 10";
        }
        else {
          return (10)
        }
        catch(err) {
          myFunction()
        }
      }
    }
    
    x = myFunction()
    

    Commit notes: Added error handling

    • firewallfail@lemmy.world
      link
      fedilink
      arrow-up
      58
      ·
      1 个月前

      Returning 10 instead of x when x finally ends up being 10 really ties it together.

      • OshaqHennessey@midwest.social
        link
        fedilink
        arrow-up
        27
        ·
        1 个月前

        I’m glad you noticed. That was my favorite part too.

    • NιƙƙιDιɱҽʂ@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 个月前

      SyntaxError: Unexpected token ‘catch’

      • OshaqHennessey@midwest.social
        link
        fedilink
        arrow-up
        8
        ·
        1 个月前

        Coding on mobile is hard

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.

  • 971 users / day
  • 4.04K users / week
  • 7.79K users / month
  • 17.6K users / 6 months
  • 1 local subscriber
  • 28.6K subscribers
  • 1.89K Posts
  • 64.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.13
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org