programming.dev

Venator, to programmer_humor in Infinite Loop

Sometimes a fresh pair of eyes on a code base can reveal some opportunities for big improvements in maintainability 😜

MajorHavoc,

Ahahhahhahha. Ha…ha. Ahem.

Sorry. The idea that any of the opportunities for improvement at my last “job A” code base might need “revealed” struck me as really funny.

Venator,

Sometimes there’s an opportunity to delete it and start again 😜

tkk13909,

Looks like we found the hr employee! Get 'im Bois!

Venator,

Lol, nah I’m a developer.

gregorum, (edited )

Sometimes it takes a new dev coming in for management to give the greenlight for a major overhaul. It’s shitty, but it’s true.

extratone, to programmer_humor in Fitbit Clock Face
@extratone@lemmy.world avatar

Datestamp horror.

AVincentInSpace, (edited ) to programmer_humor in Manager: This task only takes 30 minutes. Why did it take you the whole day?

Every time I commit I have to look through git diff, figure out what the hell I actually did, come up with something intelligent to say about jt, possibly split the commit into multiple commits if I changed multiple things, do some shuffling with git reset and git add

For some reason all my personal projects are all like 4K SLoC with 50 total commits, all of which include apologies for not doing more smaller commits

PoolloverNathan,

^psst,^ ^git^ ^add^ ^-p^

etchinghillside, (edited )

Remind me what -p does.

Edit: never mind - I see it mentioned below.

PoolloverNathan,

Patch add - it shows you particular changes you made, and you choose whether or not to include them in the commit. (You can then use git stash -k to stash only the changes you did not add, so you can test before you commit.)

Anticorp,

There’s a bigger issue than your commit message if you don’t even know what you just coded and are committing.

AVincentInSpace, (edited )

You see, sometimes I code something, go to bed before finishing it, come back, decide not to commit because then I’d have to think of a commit message and I just want to code, start working on an unrelated feature, do that for a couple days, get distracted by life stuff and put the project down for a few weeks/months, rinse and repeat, and then I finally get around to writing a commit message because I’m about to start a huge change and I want a restore point and I’m like. Okay, it’s been like 3 months since my last commit, I’m pretty sure my code can now do something it couldn’t 3 months ago but come on, I can’t even remember what I had for lunch last Thursday

I’m well aware this is terrible practice but I don’t know how to stop doing it

dukk,

Commit more often. Maybe work in a different feature branch, and don’t be afraid to commit your half-working crappy code. If it’s a personal project/fork, it’s totally acceptable to commit often with bad commit names and small unfinished changes: you can always amend/squash the commits later. That’s how I tend to work: create a new branch, work on the feature, rebase and merge (fast forward, no merge commit). Also, maybe don’t jump around working on random features :P

AVincentInSpace, (edited )

but…but new feature shiny

Fr tho this is all excellent advice

ExtraMedicated,

Jumping around to random features is how my ADHD brain works most efficiently.

Slotos,

Good news, TDD is methylphenidate of software development!

adrian783,

you can setup a on-save script to force you to commit when the number of changes is greater than a certain number from the previous commit.

Anticorp,

You can help yourself a lot here by making commits every time you make a meaningful change. A feature doesn’t need to be complete to commit major checkpoints along the path to completion. That’s what feature branches are for. Commit often. It’ll help you think of messages, and it’ll help you recover in the case of catastrophe.

adrian783,

it means you commit too infrequently. your commit messages should be able to describe what u just did within 10 words.

akkajdh999,

I just get too excited about actually implementing/fixing something (random things that I see along the way) more than commit ceremony (nobody will care about it in my project anyway other than one random guy who gave the repo a star)

oce,
@oce@jlai.lu avatar

Nah, I’m that guy, I gave your repo a star for the effort, but I’m not reading your history.

PixxlMan,

I spend much time splitting them up inside visual studio by file and individual lines changed to try and separate my many simultaneous changes into several somewhat usable commits. If I was stupid enough to make some big refactor at the same time I might just have to throw in the towel… It’s really painful after a few weeks to try and pick up the pieces of what I was doing but never commited too lol.

gregorum, (edited ) to programmer_humor in Bug Thread

“So, how did you two meet?”

“He spent 2 years on a linux support forum helping me fix and nVidia driver issue. we’ve been married for 6 years this March.”

Dicska,

This Arch

Daxtron2, to programmer_humor in Fitbit Clock Face

Everything’s a string 😢

lseif,

Everythings an object 😰

Daxtron2,

lua tables all the way down

Haagel, to memes in People who do know
Xariphon,

What the fuck did I just put in my brain

SendMePhotos,

A fucking gem.

sverit,

Oh my, I thought the beginning was already the parody, but that shit was real? Oof.

DarkMessiah,

Yeah, I got to “What’s in the box?” before I cringed out. Love to see people taking the piss out of bad commercials.

Odo, (edited )

I preferred the more subtle parody.

AmosBurton_ThatGuy, to memes in Appreciate all the content though
@AmosBurton_ThatGuy@lemmy.ca avatar

That person is one of the few usernames I consistently recognize here on lemmy as well, consistently has high quality comments and great arguments. Definitely a great person to have here on lemmy, thanks Flyingsquid!

Thermal_shocked,

No, he’s a thin skinned mouth breather who can’t look shit up for himself.

rainerloeten,
@rainerloeten@lemmy.world avatar

That’s a bit rude, don’t you think? He’s a person too and reads this comment… How would you feel reading st. like that about you? :/

Thermal_shocked,

Well if I was a thin skin cry baby and somebody called me out on it, well if the shoe fits…

xor,

Because he asked you for a source that one time?

And he’s the thin-skinned one 💀

Thermal_shocked, (edited )

No he made a completely stupid and uninformed comment about guns and when he got corrected he got all pissy. He’s unable to do any research on his own and instead ask for evidence and when it’s presented he gets upset for being dense.

xor,

Nah I read the thread lmao

He said “oh cool could you link those videos you mentioned” and you went “YOURE EVIL AND STUPID AND MEAN AND I HATE YOU AND IM TELLING MY MUMMY”

Rozauhtuno,
@Rozauhtuno@lemmy.blahaj.zone avatar

🍿🍿🍿

xor,

The drama, it calls to me

tubbadu, to programmer_humor in Release notes of an open source app. Someone is pretty mad at Canonical for Snap

What is AFTL? Probably not “Anterior talofibular ligament” as the internet told me

roguetrick,

What's easier to understand: ankle anatomy or Ubuntu publishing.

Teon,
@Teon@kbin.social avatar

Ankle!

lvxferre,
@lvxferre@lemmy.ml avatar

Android File Transfer for Linux. Here’s the release note from the OP.

suy,

Thanks. I should have linked to that myself, perhaps.

casmael, (edited ) to programmer_humor in Programming: The Horror Game

Yeah so you gotta buy the lumafly lantern before you go in that area

minyakcurry,

I never expected a Hollow Knight reference here

youngalfred, to memes in 6÷2(1+2)

Typo in article:

If you are however willing to except the possibility that you are wrong.

Except should be ‘accept’.

Not trying to be annoying, but I know people will often find that as a reason to disregard academic arguments.

wischi,

Thank you very much 🫶. No it’s not annoying at all. I’m very grateful not only for the fact that you read the post but also that you took the time to point out issues.

I just fixed it, should be live in a few minutes.

Iamdanno,

A person not knowing the difference in usage between except and accept sounds like a perfectly reasonable reason to disregard their math skills.

Hiro8811, to programmer_humor in Programming: The Horror Game

But I have an LCD display

pkill,

non-AMOLED devices spreading misinfo by enabling dark mode by default on low battery and it’s consequences…

Hiro8811,

Low battery mode on…computers?

Omega_Jimes,

Yeah. Some folk use portable computers on top of their laps. It’s weird :/

Rosco, to programmer_humor in The Perfect Solution

Probably not a good idea to show your API key to everyone…

worldsayshi,

Yeah encrypt it or at least put on a nsfw tag or something. Gosh. People flaunt their privates like it’s Onlyfans.

Rosco,

Or at least use an environment variable, it’s not a good practice to have it written in plaintext in your code.

voracitude,

What do you mean? I just see asterisks.

assembly,

Same here. I’m pasting my password here and it will encrypt it so no one can see it other than me: *******

MacNCheezus,
@MacNCheezus@lemmy.today avatar

hunter2

jjjalljs,

I understood that reference

thanks_shakey_snake,

Oh cool it works for my password, too.

mrsgreenpotato,

How do you know it’s your password if all you see is astrisks?

yote_zip, to linux in why does the poster image of c/linux have 3.8mb?
@yote_zip@pawb.social avatar

Everyone fully missing the point here. This is the banner image for !linux (that’s not where we are right now for the record), and it has a normal JPEG size of 7.7MB. When it’s served as WebP it’s 3.8MB. OP is correct that this is very stupid and wasteful for a web content image. It’s a triple-monitor 1440p wallpaper that’s used verbatim, and it should instead be compressed down to be bandwidth-friendly. I was able to get it to 1.4MB at JPEG quality 80, and when swapping it out in dev tools and performing A/B testing I can’t tell the difference. This should be brought to the attention of a mod on that community so it can stop sucking people’s data for no reason.

cmnybo,

It could be resized too. 5120x1440 is way too big for a website banner. There’s no reason to go more than double the size it will actually be displayed at. That would bring it down to a couple hundred KB.

juli,

Thank you!

kglitch,

I got it to 47 KB after resizing it to 850px by 239px, heh

SatanicNotMessianic, to programmer_humor in Programming: The Horror Game

TFW when all of your bugs are like cockroaches that run away from the light but hide in the dark where you can’t see them.

ohlaph, to programmer_humor in ifn't

<span style="color:#323232;">aint (something) {
</span><span style="color:#323232;">    somethingElse()
</span><span style="color:#323232;">}
</span>
Facebones,

As a Virginian learning coding, this would make my damn day.

Threeme2189,

<span style="font-weight:bold;color:#a71d5d;">#define </span><span style="font-weight:bold;color:#795da3;">aint</span><span style="color:#323232;">(x) </span><span style="font-weight:bold;color:#a71d5d;">if </span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">!</span><span style="color:#323232;">(x))
</span>
15liam20,

Or maybe

taint(condition) {}

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21078016 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 171

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10502144 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/Resources/views/logs.html.php on line 40