For example, here's the causal graph of changes made to git's Makefile:
https://josephg.com/git-makefile.dt.svg
Having a nicer way to render these graphs (and especially show them in the browser) would be delightful!
I always wished I could invent some domain-specific heuristics to lay out the graph automatically but never took the time to.
Manually moving nodes actually worked fairly well for our use case, but it made a mess of text diffs when e.g. nodes were inserted and the position of all subsequent nodes shifted, so as a consequence we had to invent ways to visually diff graphs. Maybe the improved automatic layout would have been easier after all.
However, this algorithm is designed specifically for trees. I'm not sure whether I could manage to make it work on DAGs (Directed Acyclic Graphs). It would require some rewrites of the aesthetic rules and designing a new algorithm.
here's the Json: https://gist.github.com/visualsitemaps/94f88f1ffadea91204eb2...
In few contests that don't give precise input limits, it adds extra challenge. And if your idea for the optimal efficiency is wrong, you have not only wasted time implementing wrong solution, but might also get a penalty score for each failed submission. One of the worst feelings is when you see that your submission got time limit on something like test 87, and you are unsure whether it's due to having wrong asymptotic complexity or whether you have correct algorithm but just implemented it slightly too inefficiently and it only needs a little bit of minor optimizations to pass.
It's beautiful, and you've explained the field of tidy tree generation really well.
I wish I had this to refer to last year when implementing something similar in VBA for Excel and PowerPoint [1]. Perhaps it's time for me to revisit!