Decomplexification - making #curl use simpler code
daniel.haxx.se/blog/2025/05/29…
Decomplexification
(Clearly a much better word than simplification.) I believe we generally accept the truth that we should write simple and easy to read code in order to make it harder to create bugs and cause security problems.daniel.haxx.se
Mathias Hasselmann
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Mathias Hasselmann • • •Generalize for any repo by jericson · Pull Request #16 · curl/stats
GitHubWilliam Salmon
in reply to daniel:// stenberg:// • • •That said I have found that while having complexity in code is bad, it's also hard to reduce and one way that some people try to reduce it is to "hide" it across many simple looking functions.
I once got my pen and paper out and found that to get from one function at the high level to the low level equivalent the path was through 5 lays of inheritance and 3 different branches
William Salmon
in reply to William Salmon • • •daniel:// stenberg://
in reply to William Salmon • • •poleguy looking for lost tools
in reply to daniel:// stenberg:// • • •My insight from that experience is that what really matters is that the complexity of the code is as low as possible considering the complexity of the problem. But the complexity metrics do not consider the problem complexity. I would rather see all the code for a complex problem in one place.
sammypanda
in reply to daniel:// stenberg:// • • •Maage
in reply to daniel:// stenberg:// • • •