A flowchart paranoid (a story about source code documentation)
- abu
-
Topic Author
- Offline
- Senior Member
-
- Posts: 47
- Thank you received: 18
I've always been very curious about how LinuxCNC code works, and I participated in translating the documentation into Spanish when it was at version 2.8. Now I'm looking for opinions in a forum about a need some of us might have (I suppose): documentation of the source code itself.
I love images. A flowchart is a treasure for me. Yes, I know: code is the best documentation... but sometimes it's a real headache (we all know that, right?).
That said, let's get down to business!
I've prepared the PDF attached to this post. First of all, apologies: some of it is in Spanish (mainly the descriptions), but that doesn't obscure the general idea.
The document relates to the halcmd_completion.c file and is just an example. It only took me half a day to prepare, and the flowcharts haven't been proofread. I insist: I'm asking for your opinions on my vision, not for technical corrections.
This isn't the time to discuss the file itself, but rather to share my idea for documentation. I believe any "novice LinuxCNC coder" can find guidance with this type of "document".
I'm also aware that this is a user forum, not a developer meeting place, but... what about "high-end" users?
Thanks in advance for your comments.
J.M. Garcia a.k.a. Abu
Attachments:
Please Log in or Create an account to join the conversation.
- ErrickW
- Offline
- New Member
-
- Posts: 18
- Thank you received: 8
I like the the idea. To me it looks a bit cleaner than I get from doxygen (or may be I do not know how to use it). I am not a developer but I am constantly digging thru source code to see what makes things work (or not).I believe any "novice LinuxCNC coder" can find guidance with this type of "document". I'm also aware that this is a user forum, not a developer meeting place, but... what about "high-end" users
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 19752
- Thank you received: 4584
There are so many layers and abstractions (not all of which seem necessary)
Oh, and a clear indication where the switch to realtime happens in this flow would be helpful too.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
- Posts: 11557
- Thank you received: 3877
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4613
- Thank you received: 2042
What would be really useful (including to me) would be a flowchart that tracks a simple G-code command (like coolant-flood) from the Interpreter to the HAL pin.
There are so many layers and abstractions (not all of which seem necessary)
Oh, and a clear indication where the switch to realtime happens in this flow would be helpful too.
Yes, the biggest hurdle when working on an issue is figuring out which parts of the source code are involved in the first place. I have used Sourcetrail and Doxigen but what I really lack is a bigger picture.
- what happens in case of a program abort
- what is involved when the feed override value changes
....
That probably is the greatest loss when a long term contributor retires from the project.
Documentation of such trans code 'paths' would also likely be less prone to become outdated as the source code evolves.
Please Log in or Create an account to join the conversation.