Cult I Mean Group
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Jeena@piefed.jeena.net to Programmer Humor@lemmy.mlEnglish · 9 months ago

1 hour in Java

piefed.jeena.net

message-square
102
fedilink
711

1 hour in Java

piefed.jeena.net

Jeena@piefed.jeena.net to Programmer Humor@lemmy.mlEnglish · 9 months ago
message-square
102
fedilink
  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    9 months ago

    Some languages are just worse to work with. like JavaScript. Console.log is like sure I’ll log your object but I’ll tell you what it is now, not what it was when you logged it.

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      8 months ago

      deleted by creator

      • jjjalljs@ttrpg.network
        link
        fedilink
        arrow-up
        3
        ·
        9 months ago

        I’ve never had a complaint about logging stuff in python. It generally does what I expect.

        “Create a copy of your object and print that” is what I ended up doing, but I don’t think most people would say that’s intuitive. I expect if i print something at a particular time, I get what it is at that point in time.

        • Skull giver@popplesburger.hilciferous.nl
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          8 months ago

          deleted by creator

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        I’d just like to highlight what you mention below: Logging it as an object allows you to inspect it in the browser console, presumably with some JSON tree representation, rather than just a dumb string.

        It’s described in the “Outputting a single object” example here: https://developer.mozilla.org/en-US/docs/Web/API/console#examples

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.

  • 383 users / day
  • 528 users / week
  • 1.8K users / month
  • 10.4K users / 6 months
  • 1 local subscriber
  • 35.6K subscribers
  • 1.7K Posts
  • 34K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org