1215
Comenting code (lemmy.ml)
submitted 10 months ago by Vordimous@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] essteeyou@lemmy.world 129 points 10 months ago* (last edited 10 months ago)
/**
 * Gets the user
 **/
fun getUser() {
    return this.user;
}
[-] some_guy@lemmy.sdf.org 33 points 10 months ago

I'm sorry, I don't think I understand what's happening here…

[-] essteeyou@lemmy.world 28 points 10 months ago

Let me find the sequence diagram...

[-] jaybone@lemmy.world 12 points 10 months ago

You need the requirements doc from marketing. Then it will all totally make sense for sure. No cap.

[-] lord_ryvan@ttrpg.network 8 points 10 months ago* (last edited 10 months ago)

Okay now I get the joke.
I hate these kind of people.

By the way, your ``` both need to be on their own, separate line

[-] essteeyou@lemmy.world 3 points 10 months ago

It renders correctly in my client (Sync), what are you using? I'll edit it anyway.

[-] lord_ryvan@ttrpg.network 2 points 10 months ago* (last edited 10 months ago)

It renders correctly on the web as well for me.

But the ``` being on their own line is how to write it properly, as stated this website among many others.

This way, you can put the intended programming language on the same line as the first ```, ensuring proper colour coding!

Ex.

echo "Hello $name\n";
echo "Hello $name\n";

EDIT I checked on mobile, it rendered odd on Jerboa for me:

Screenshot of essteeyou@lemmy.world their comment in the Jerboa client before the edit

Now it is fixed:

Screenshot of essteeyou@lemmy.world their comment in the Jerboa client after the edit

[-] essteeyou@lemmy.world 2 points 10 months ago

Yep, I know, but my code isn't in a real language.

[-] lord_ryvan@ttrpg.network 1 points 10 months ago

You can also not do it, it was just an additional comment!

[-] essteeyou@lemmy.world 2 points 10 months ago

Thanks for your code review. :-D

this post was submitted on 28 Sep 2024
1215 points (99.1% liked)

Programmer Humor

37389 readers
24 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS