D•Scribe
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
sabreW4K3@lazysoci.al to Programmer Humor@programming.dev · 10 months ago

print('here1');

lazysoci.al

message-square
42
fedilink
777

print('here1');

lazysoci.al

sabreW4K3@lazysoci.al to Programmer Humor@programming.dev · 10 months ago
message-square
42
fedilink
  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    50
    arrow-down
    1
    ·
    10 months ago

    echo __LINE__ . "Moo\n";

    Honestly if you’re not including the LoC in your debug statement I don’t even fucking understand you.

    But yeah, senior devs know the power of breadcrumb debugging (because most of us were deeply scarred by gdb).

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      25
      ·
      10 months ago

      Did GDB do something bad at some point?

      • Sphks@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        17
        ·
        9 months ago

        Yes. It breaks points.

      • SpaceNoodle@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        10 months ago

        No

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

      That’s console.trace() for all you JS devs out there.

      • alqloe@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        9 months ago

        I always combine that with objects with the shorthand notation. So you always know what variable has what value without having to remember in what order you printed the variables.

        console.trace({i, list});
        // {i: 1, list: [0, 1, 2]}
        
      • lemmesay@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        9 months ago

        I also use group and groupend to nicely collapse different logs. and table when i’m feeling funny.

    • psud@aussie.zone
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      9 months ago

      Don’t you want it to look a little nicer? echo __LINE__ . “: Moo!”;

      I mean, presuming cowsay is unavailable

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      9 months ago

      dbg!() for Rust users

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.

  • 1.19K users / day
  • 4.09K users / week
  • 8.23K users / month
  • 17.9K users / 6 months
  • 9 local subscribers
  • 23.2K subscribers
  • 1.27K Posts
  • 40.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: unknown version
  • BE: 0.19.9
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org