Approach to documenting our know-how #6296
Replies: 2 comments 8 replies
-
@JaroslavTulach is suggesting the view that Pull Requests and Issues are part of the project documentation.
|
Beta Was this translation helpful? Give feedback.
-
In my opinion, the primary place for documentation of code is code itself. Ideally, every non-obvious behaviour of a method (one that is not apparent from the method name and type), should get a note in the method docstring. And every class whose purpose is not obvious should have a note explaining it. If there is a decision that is worth explaining, ideally I think it is good to add a short note about it in the code. IMO it makes it easiest to read the code - because when I look at it, I immediately see any related explanations. They should not be pages long - just short notes explaining the intent or reasons to do something. They should not state the obvious, or stuff that is common knowledge in the team - they should be used for places where it was not clear. If there was a discussion on a PR how to do something - IMO such a discussion suggests that something was not clear and a short note about it is a good idea. The code should be readable and express the intent well and thus need little comments. But sometimes it is not possible due to performance restrictions, or just complex logic - in that case some explanation what is happening helps immensely to understand what was the intention of the person writing it. Some examples from our libraries: (1), (2), (3), (4), (5). And for example from @hubertp's code: (6), (7). For more complex concepts, spanning across many files or projects, we have the I definitely don't want to flood us with documentation, but I think we are lacking it in some places, making onboarding of new developers potentially harder and worsening our 'bus factor'. |
Beta Was this translation helpful? Give feedback.
-
There are some various opinions about how we should approach documenting the knowledge related to our internal libraries, and there was a proposal to start a discussion, so I'm starting one.
I'd like to discuss how we want to approach 'storing' and searching for information related to our internal libraries - mostly internals of the engine/interpreter, but it can probably also apply to deeper internals of the libs (internal Enso helpers, the polyglot Java libs like Table etc.).
Beta Was this translation helpful? Give feedback.
All reactions