Manual

536 points · 9 comments · view on lemmy.world

9 Comments

InternetCitizen2@lemmy.world · 77 pts · 1y (1 reply)

When you are reading a math textbook and it says the proof for this theorem is trivial.

Swedneck@discuss.tchncs.de · 33 pts · 1y

this is left as an exercise for the reader

lnxtx@feddit.nl · 30 pts · 1y

My code is self-explanatory

tja@sh.itjust.works · 14 pts · 1y (1 reply)

Yes, I don't see the problem? I don't think I am doing anything wrong?

Xerxos@lemmy.ml · 5 pts · 1y

Yes I had a coworker that commented like that:

i++; // increase i by one

Tells you nothing new - a wasted comment. Everyone who can program know this. A comment that describes what you do.

i++; // increase i to move to the next entry

A better comment, explaining why you do what you do. Always add information in your comments that the code doesn't supply already. If you name your variables and methods well, good code is often self-explanatory. Use comments when it's not.

Of course in this trivial example no comment would be needed.

Oh and use XML comments, when applicable.

eldain@feddit.nl · 5 pts · 1y

I love that this is a photo of a print that has been places. Analog meme.

samus12345@lemm.ee · 4 pts · 1y

FourWaveforms@lemm.ee · 4 pts · 1y
it("does something", () => { /* tbd */ });
M137@lemmy.world · 1 pts · 1y

I've found github pages with seemingly a lot of documentation, commented code etc. But nothing about what the app or whatever is actually for. You gotta sit there and read through it all and kinda make a guess on what it is.