lemmy.dexlit
  • Communities
  • Create Post
  • 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
45
fedilink
776

print('here1');

lazysoci.al

@sabreW4K3@lazysoci.al to Programmer Humor@programming.dev • 10 months ago
message-square
45
fedilink
  • @xmunk@sh.itjust.works
    link
    fedilink
    49•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
      25•10 months ago

      Did GDB do something bad at some point?

      • @Sphks@lemmy.dbzer0.com
        link
        fedilink
        17•10 months ago

        Yes. It breaks points.

      • @SpaceNoodle@lemmy.world
        link
        fedilink
        3•10 months ago

        No

    • @quink@lemmy.ml
      link
      fedilink
      9•10 months ago

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

      • @alqloe@lemmy.dbzer0.com
        link
        fedilink
        3•
        edit-2
        10 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
        1•10 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
      7•
      edit-2
      10 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
      6•10 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
  • 3.13K users / day
  • 5.82K users / week
  • 9.87K users / month
  • 18.5K users / 6 months
  • 23.7K subscribers
  • 1.45K Posts
  • 51.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org