Well I am enjoying doing some work, maybe making a tiny difference. Fantastic way to learn!adrianinsaval wrote: ↑Tue Apr 19, 2022 10:03 pm someone has to do the work of changing stuff which may not always be trivial.
Coding. style
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 176
- Joined: Wed Mar 09, 2022 3:15 am
- Location: Oz
Re: Coding. style
Re: Coding. style
And that‘s why EVERY! function or method MUST have a short description of What and Why it does something, even the trivial ones. „The code is the documentation“ requires too much mental overhead.FreddyFreddy wrote: ↑Sat Apr 30, 2022 8:23 am Code style and formatting matters! When you're not a rocket scientist at least. Time and again I see "Code is read much more often than it is written"
-
- Posts: 176
- Joined: Wed Mar 09, 2022 3:15 am
- Location: Oz
Re: Coding. style
I 'somewhat' disagree. As Bjarne Stroustrup famously said "Express ideas directly in code". If the code uses natural wording to express meaning, then why do we need comments to further explain, or, Heaven forbid 'documentation' to restate the same thing without adding any understanding. The example I quoted could, I believe, have been better expressed which would have negated any firther documentation requirement. Just my 2c.