There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

bradorsomething , in O of what now

Great, now I’m hungry for apples.

nothacking , in O of what now

Just add a delay that pads it out the execute time to 10 seconds. O(1) ez.

xmunk , in print('here1');

echo __LINE__ . “Moon”;

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 ,

Did GDB do something bad at some point?

SpaceNoodle ,

No

Sphks ,
@Sphks@lemmy.dbzer0.com avatar

Yes. It breaks points.

quink ,

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

lemmesay ,
@lemmesay@discuss.tchncs.de avatar

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

alqloe , (edited )

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.


<span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">trace</span><span style="color:#323232;">({i, list});
</span><span style="font-style:italic;color:#969896;">// {i: 1, list: [0, 1, 2]}
</span>
psud ,

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

I mean, presuming cowsay is unavailable

flying_sheep ,
@flying_sheep@lemmy.ml avatar

dbg!() for Rust users

GammaGames , in print('here1');

And when you need something more complex


<span style="color:#323232;">console.log(1);
</span><span style="color:#323232;">[…]
</span><span style="color:#323232;">console.log(2);
</span><span style="color:#323232;">[…]
</span><span style="color:#323232;">console.log(3);
</span>
mattd ,

More like


<span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(</span><span style="color:#183691;">'shit'</span><span style="color:#323232;">);
</span><span style="color:#323232;">[…]
</span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(</span><span style="color:#183691;">'fuck'</span><span style="color:#323232;">);
</span><span style="color:#323232;">[…]
</span><span style="color:#795da3;">console</span><span style="color:#323232;">.</span><span style="color:#0086b3;">log</span><span style="color:#323232;">(</span><span style="color:#183691;">'ass'</span><span style="color:#323232;">);
</span>
fosho ,

yeah and then you forget about one that makes it into a release and then see it in the console.

arendjr ,

This is the real reason we have linters.

Azzu , in Came back to learn you have job security

The question is, was nothing done because they’re incompetent or because they don’t care about the job and were able to do nothing with a “good” excuse

badcommandorfilename ,

Yes

dafo ,

Or because you forgot one very crucial part?

I had that happen to me as a junior. The other seniors weren’t even able to help, so in the end nothing was done. IIRC it was an old python app which the OG author explained the nonsense logic of, but not how to actually run it, or vice versa. Either who the whole project was fucked up

Azzu ,

Of course, the assumption was that the senior was actually competent and non-malicious, which may of course be false.

0x0 ,

I have a similar story. I started a new job and inherited a ball of mud written in Python while the creator was out for a few weeks. When he got back, he was grumpy about my changes. I guess he preferred it with more bugs 🤷‍♂️

SteveFromMySpace , in print('here1');

I feel kind of bad for shooter on the left just using stuff a lot of competitive shooters use and getting roasted for it incessantly lol

tyler ,

wait she’s getting roasted for it? I haven’t seen that. It just looks like people are making fun comparisons to me.

SteveFromMySpace ,

I guess it feels kind of implied but maybe that’s just me!

lunarul ,

She looks cool af in that pic, I can’t take the comparison as a roast.

eighty ,

Might just be me but I think this looks cool/cute af especially with the little plush

https://lemmy.world/pictrs/image/9b7ffcc0-ae02-4ee0-a723-d2c720b81d1b.jpeg

psud ,

That’s her 5 year old kid’s. Super sweet :)

Gsus4 ,
@Gsus4@mander.xyz avatar

Yea, her demeanour reminds me of Motoko from Ghost in the Shell in that photo angle.

Gsus4 , (edited )
@Gsus4@mander.xyz avatar

Anybody who knows about this: how do those gizmos help? E.g. earplugs are useful without performance-enhancing.

SteveFromMySpace ,

It’s all about directing eyes and blocking distractions

psud ,

High tech blinkers

zero ,

if you look closely you can actually see a literal blinder over her left eye! the reason it helps is because precision shooting is all about repeatability, and both eyes open is a more repeatable position than closing one eye exactly the same way every time

kboy101222 ,

Once you’re at this level, you’re looking to get improvements of a fraction of a percentage. I don’t know the specifics cause I’m not a pro shooter despite being American, but from other high level skill people I know, you hit a point where improvements basically plateau and you have to resort to increasingly niche products to obtain non skill improvements. If you want proof of that, check out calligraphy and fountain pen communities. The amount of money some people spend on things I didn’t know existed is wild.

(No bad judgement to those folks, I’ve gotten hard into map making and 3d printing lately, so I’m right behind you)

variants ,

Adjustable frames help keep the lens at the correct angle for your eyes if you tilt your head a certain way from my understanding. So if you tilt your head at a certain angle you can adjust the frame to keep your prescription from getting out of focus at that specific head tilt

virku ,

It is also an adjustable, external retina that allows you to let just enough light through, apparently.

henfredemars , in print('here1');

All the debugging tools in the world doesn’t beat an excellent sense of intuition and putting that print statement exactly where it needs to be.

ryannathans ,

As linus says, if you need to use a debugger your code is too complicated

Theharpyeagle ,

Dude can pry my debugger from my cold, dead hands.

flying_sheep ,
@flying_sheep@lemmy.ml avatar

He works on Linux where he controls the whole stack down to the metal and I love that for him, but other people have to call library code, and them debug that if it doesn’t work as they thought it would.

rbits ,

Well then obviously if you use libraries, your code is too complicated

Traister101 ,

Yep that’s why I refuse to use standard libraries. It just makes my code too complicated…

BleatingZombie ,

Tell that to my employer

zalgotext ,

Right, the amount of times I’ve had to put breakpoints in Django/DRF code to figure out what’s causing that weird undocumented behavior is concerningly large

Cubes ,

The problem is that sometimes it’s not your code that you’re debugging

NigelFrobisher , in Came back to learn you have job security

Generally when you go on holiday and do a detailed handover to another dev, you find the team spent the week fighting some crazy fire in prod or sudden shift in priorities from up the chain. Don’t think I’ve ever had them actually complete my work.

pkill , in print('here1');

tfw I recently worked on a side project where I was too lazy to change the log level but not sloppy enough to use raw printf so I’d just throw stuff into info and then remove the statements once I solved my issue

veganpizza69 ,
@veganpizza69@lemmy.world avatar

[[[[[[[[[ TEST ]]]]]]]]]

noproblemmy ,

After all, that’s why git is there, to help me remember the shit I put all over the place. (Ok, it might have some other uses.)

GBU_28 , in print('here1');

Beep

Boop

Gloop

Glorp

Yeet

Yo

sheepishly ,

That's me..... I do that...................

Aabbcc ,

“Hello worl” if I need something quick

“AAAAAAAAAAAAAAAAA” if I’m lazy and don’t want to have to hunt the output logs for it

pimeys , in print('here1');

dbg!(1) all the time…

FooBarrington , (edited ) in Came back to learn you have job security

I once had to go on a longer medical leave, couple of months. In preparation, I documented everything - pages upon pages answering all questions in easily searchable formats. For more than a month, any questions I got were answered with links to specific sections in the documentation, so people would know where to find everything. I put the links everywhere, in total there were at least 200 links to various sections of the documentation throughout all our communication mediums, as well as all information repositories.

After I came back from leave, most of the things I was responsible for were turned off. When I asked why, the response was “we didn’t find your documentation”.

I no longer care whether things keep working.

ChickenLadyLovesLife , in Came back to learn you have job security

You kids today. In my day we used Visual Source Safe and would accidentally leave a critical file checked out when we went on vacation and nobody else could get anything done until we came back.

LavenderDay3544 , (edited ) in Came back to learn you have job security

This is the result of so called tribal knowledge in software development. It’s even worse when the senior citizen who understands everything retires, goes senile, or dies.

Klear , in print('here1');

This is why I find shaders scary as fuck

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines