3 ms·
Have you looked at design patterns. some of the more complex code usually uses one of these. you can also look at a finite state machine. UML has interaction d
by sharemywin 4y ago
Have you looked at design patterns. some of the more complex code usually uses one of these.
you can also look at a finite state machine. UML has interaction diagrams and/or state charts.
you can look at black box abstraction, try to separate the internal state from the external interactions.
I've also tried using a table to layout all the variations of the variables and what the output should be with "don't cares" to cut the options down.
you could always have chatgpt document the code and see what it says. it will probably be wrong but you never know.
- sharemywin 4y agomost of the time I just run it in a debugger and step through the code.
- zubairq 4y agoYes, I do go through a debugger, but can be very tough to do sometimes when there are multiple concurrent threads/processes and execution divided between browser and server
- zubairq 4y agoYes, many things here I should be doing more of, thanks: (1) UML is something I haven't been doing much of, I will try to use some sequence diagrams and other things, that could be useful (2) a table to layout all the variations of the variables and what the output should be with "don't cares" to cut the options down - I'll experiment with this (3) black box abstraction - True OO I guess... I'll look into it I've tried ChatGPT extensively, but it never produces anything remotely useful, since mostly I want to document the "why", not the "how" or "what", if that makes sense Thanks for the input!