Skip to main content

Questions tagged [comments]

Questions about writing comments in code.

4 votes
5 answers
429 views

Python and PowerShell use # to denote to the parser that everything after them until the line break is a comment. They even provide block comments for multiline situations. However, there is no ...
RokeJulianLockhart's user avatar
5 votes
12 answers
5k views

With generative AI, you can just ask it to explain the code to you. In my experience, it is reliable and accurate - which cannot always be said about manual comments. I am specifically referring to ...
Evorlor's user avatar
  • 1,563
23 votes
9 answers
7k views

I'm taking another crack at learning Java with the aim of getting a job. As I write code, I sometimes find it quite difficult to navigate my code using the formatting I often see in tutorials. ...
KanagawaPunk's user avatar
18 votes
6 answers
5k views

According to When is a number a magic number?, I know magic number should not exists, so I know the following code about creating a Label from some UI framework and set the color RGB needs to be ...
wcminipgasker2023's user avatar
4 votes
6 answers
667 views

A co-worker of mine is working on project solo but would still like to have other team members review their code upon reaching certain milestones. Unfortunately, they also want to wait until the end ...
user8297969's user avatar
3 votes
2 answers
318 views

My team writes a lot of Python code in PyCharm to do quick simulations and calculations for our mechanical engineering work. Often, we'd like to include a little image (a hand drawn sketch, CAD ...
Emily Conn's user avatar
9 votes
4 answers
667 views

I write code in R, and often find myself attempting to optimize the code for better performance. In a given script that tackles a specific problem, I test different code alternatives and compare them ...
Emman's user avatar
  • 209
1 vote
5 answers
301 views

Sometimes there are elaborate discussions about a subject, and while finally developing the program, you want to refer to a mail ... but then people still continue mailing about the subject, so the ...
Dominique's user avatar
  • 1,844
2 votes
3 answers
2k views

While this might seem more like a piece of an easy task to others, it's honestly not easy for me. At this stage, I find myself wandering how best to version my functions/methods. What does this mean? ...
Wale's user avatar
  • 141
3 votes
4 answers
7k views

I have an Unity project with countless of C# script files and I'm working on it solely. Although nobody else is working on it, I'm aware that some form of code documentation is crucial for my future ...
Junes's user avatar
  • 43
50 votes
6 answers
13k views

I am a home, amateur developer for 25 years and I just had a bright idea regarding comments. Like all such novel bright ideas, someone has probably already done it and there is probably a consensus on ...
WoJ's user avatar
  • 1,661
2 votes
1 answer
197 views

I have asked about the more nebulous 'system' and functions in general, but to explain my question let me just consider a pure function. I think of pure functions as lemma/theorems/what have you. ...
JustSomeGuy's user avatar
4 votes
5 answers
277 views

For code, we know approaches like DRY and we tend to extract common functionality. What approaches are recommended for comments? Perhaps it's a really open question, so I'm going to go with my ...
Gonzalo.-'s user avatar
  • 161
0 votes
2 answers
137 views

When commenting code, which of the two approaches considered good practice? Explain the content of the code, "translate" it to human - readable language, but not provide any explanation ...
avivgood2's user avatar
  • 117
4 votes
5 answers
285 views

I am writing a function that I would not like to get called given a certain context and am wondering how best to convey that to possible users of the function. Assume, for exemplification, I am ...
Ganea Dan Andrei's user avatar

15 30 50 per page
1
2 3 4 5
14