this post was submitted on 27 Apr 2024
614 points (98.3% liked)

Programmer Humor

19463 readers
14 users here now

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

founded 1 year ago
MODERATORS
 
top 26 comments
sorted by: hot top controversial new old
[–] Repelle@lemmy.world 91 points 6 months ago (2 children)

I always feel like my code is the best in personal projects when I don’t need to conform to whatever style and architecture has been decided on by history and committee.

[–] mathematicalMagpie@lemm.ee 65 points 6 months ago (1 children)

For me it's always, "this is hacky as shit, but it works, and nobody will ever see it but me."

[–] Almrond@lemmy.world 10 points 6 months ago

My most arcane pieces of code (abusing null references to make the garbage collector handle object deletion kind of cursed) are usually posted publicly somewhere... If it works and all that.

[–] ignism@lemmy.world 13 points 6 months ago

Was gonna say, 1st and 2nd should be switched

[–] LostXOR@fedia.io 59 points 6 months ago (2 children)

Gotta review the 5 line PR ten times just to make absolutely totally sure there's nothing wrong with it before submitting it.

[–] perviouslyiner@lemmy.world 37 points 6 months ago (3 children)

And then notice the spelling error.

[–] YIj54yALOJxEsY20eU@lemm.ee 23 points 6 months ago

My spelling errors only come into existence after I commit.

[–] Dhs92@programming.dev 6 points 6 months ago

Just another free PR ;)

[–] Korne127@lemmy.world 5 points 6 months ago (1 children)

Instant commit --amend + push --force

[–] omidmnz@programming.dev 6 points 6 months ago (1 children)

Prefer --force-with-lease. It doesn't make a difference in this scenario, but it's a safer habit/default.

[–] xmunk@sh.itjust.works 3 points 6 months ago (1 children)

There is no reason to force push anymore - force with lease is always preferable. So said, a frequent rebaser.

[–] rufus@lemmy.sdf.org 4 points 6 months ago (1 children)

Wait what is the difference between the two?

[–] xmunk@sh.itjust.works 11 points 6 months ago

Force with lease will send up what your local thinks the most recent commit on the branch was and the host will reject the push if it knows of a more recent commit on that branch. Basically, it saves you from overwriting a commit you didn't realize existed.

[–] SkyeStarfall@lemmy.blahaj.zone 3 points 6 months ago

Don't want to be the cause of a CVE now, do we?

[–] bilb@lem.monster 34 points 6 months ago (1 children)

I have never contributed to an open source project before, so if we exclude the third part this is the reverse of my habits. The stuff I do for work is bare minimum garbage, I freely admit. I really do not like my employer.

[–] ProgrammingSocks@pawb.social 23 points 6 months ago

Aaand here's why production software is so damn buggy. I'm not faulting you personally, just your employer.

[–] feedmecontent@lemmy.world 33 points 6 months ago (1 children)

Nobody can see this -> some people can see this -> anybody can see this

[–] miridius@lemmy.world 1 points 6 months ago

Perfectly described!

[–] Gallardo994@sh.itjust.works 19 points 6 months ago

I'll be honest with ya pal, all 3 of em are pic 1 for the most part

[–] sebsch@discuss.tchncs.de 16 points 6 months ago (1 children)

You saying the code quality of some of my colleagues is even worse on their personal projects? o_O

[–] miridius@lemmy.world 10 points 6 months ago

They probably don't even have personal projects

[–] Kolanaki@yiffit.net 13 points 6 months ago

Hmmm... I comment a lot on Lemmy... Maybe I could be more productive commenting code 🤔

[–] SomeGuy69@lemmy.world 10 points 6 months ago (1 children)

I would like to contribute to open source but I'm not confident enough or understand git properly. As solo dev I only have to fulfill my boss's standards, they seam to be low.

[–] towerful@programming.dev 2 points 6 months ago

Yeh, for me git is a backup system.
My boss gave me a hand on some bits (more, I set up a framework and he could tweak pages). Anyway, I fixed some stuff, tidied some of his shit, then trying to get git to merge that back into his workspace REALLY stretched my knowledge of git LUL.
I'm sure doing that every day would get me up to speed, but ATM commit/push means "backup" to me

[–] umbrella@lemmy.ml 9 points 6 months ago

invert personal stuff and work and its me

[–] victorz@lemmy.world 3 points 6 months ago

That is very noble of you! Hats off.