this post was submitted on 06 Jul 2024
1532 points (99.4% liked)

Programmer Humor

19589 readers
572 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
you are viewing a single comment's thread
view the rest of the comments
[–] Johanno@feddit.org 48 points 4 months ago (4 children)

I write such comments because I have to.

Company policy.

Also we have to specify every line of code and what it should do.......

[–] jas0n@lemmy.world 55 points 4 months ago

Lol leave. That is so many levels of braindead.

[–] explodicle@sh.itjust.works 24 points 4 months ago (1 children)

I would smash everything into a handful of overly-complicated lines.

[–] MystikIncarnate@lemmy.ca 11 points 4 months ago (1 children)

I loved doing this is school, just trying to mess up my teachers.

[–] jaybone@lemmy.world 5 points 4 months ago (1 children)

Sometimes I think after i retire, I should teach. In the hopes that i could inspire people to write good code, instead of a lot of the garbage i see in the industry. This comment makes me sad.

[–] MystikIncarnate@lemmy.ca 2 points 4 months ago

I just want to be clear, this was like highschool cs classes. I took things a bit more seriously in college.

I never wrote messy code or illogical code, or any code that didn't work. We were learning C++ in those days and if you know anything about C++, you can basically cram an entire program into a single line. You can also do some shorthand stuff for calculations and updates to variables... So while the class was instructed to use whitespace and comments and update variables like "var = var + #" I would do var += #.... I wouldn't comment it, mainly out of hubris.

I was pretty good at it but I was lazy as all hell with it.

[–] jaybone@lemmy.world 8 points 4 months ago (1 children)

// this line increments the value of i by 1

i++;

[–] AdNecrias@lemmy.pt 3 points 4 months ago (1 children)

I hope they get paid per line of code.

[–] jaybone@lemmy.world 1 points 4 months ago (1 children)

I hope i never have to work with you.

[–] AdNecrias@lemmy.pt 1 points 4 months ago

It's fine, I wouldn't want to work with someone who enjoys being forced to comment every line.

[–] ulterno@lemmy.kde.social 4 points 4 months ago (1 children)

I feel like I am going to have to do the same thing in the end, to get my hand-over accepted.
Should I just copy the line of code and make a comment next to it with:

// It does <paste line of code>

CC BY-NC-SA 4.0

[–] VOwOxel@discuss.tchncs.de 13 points 4 months ago (1 children)

Do you license every comment of yours? If yes, why? Tbh i'm just curious

[–] ulterno@lemmy.kde.social 7 points 4 months ago (2 children)

Not every. The quick, very-low effort ones, I just leave.

Why:
I saw another post with "Anti Commercial AI License", then wen on to read the license and went, "Neat!".

  • It makes it easier for anyone to decide what to do if they want to use my comment/post (in cases where it actually has something useful)
  • It makes life just a bit harder for people data-mining for AI
    • That way, some data entry worker will probably ask for a raise and probably even get it and maybe some entrepreneur going "AI everywhere!" will think twice.
    • Or there will be a chatbot spouting "Anti Commercial AI License" or "CC By-NC-SA" in their answer text, which would be hilarious.

CC BY-NC-SA 4.0

[–] communism@lemmy.ml 7 points 4 months ago (1 children)

How are you inserting your signature? is it manually? Do you have some kind of keyboard shortcut to insert it?

[–] ulterno@lemmy.kde.social 7 points 4 months ago* (last edited 4 months ago)

For now, I have just saved it in my clipboard application, so I copy-paste.
When it goes out of history, I just open a file, where I have saved it and copy from there. So it's pretty crude.

I was hoping that either the KDE Social web interface would add a "Signature" feature or I would pick some Lemmy application that would allow that, but for now it's just this.

Perhaps, if I feel like it's being too frequent, I may set a compose key for it.

CC BY-NC-SA 4.0

[–] AlexanderESmith@social.alexanderesmith.com 6 points 4 months ago (1 children)

It's cute that you think data miners give a fuck about the license of anything they scrape.

[–] ulterno@lemmy.kde.social 0 points 4 months ago

It's unfortunate that despite explaining as properly as I could, my point was misinterpreted as me relying upon someone caring about licenses.

CC BY-NC-SA 4.0