Ask HN: What tools do you use to understand big code-base?

You are given a big Java (or another language) project to contribute to. No documentation. How do you start? What tools do you use to understand the high-level structure of the code? Thanks HN!

9 points | by c3c 1863 days ago

4 comments

  • mtmail 1863 days ago
    Some of these old discussions might help. Ignore the answers pointing to documention. I once had to dive into a medium size Java web application without documentation and it took me half a day to even find out where data was stored (in a H2 database) nevermind trying to install it or finding out what changed between the repository and what I found on the live server. Ultimately told the client it will be cheaper for them to find another contractor. Best of luck.

    Ask HN: How to understand the large codebase of an open-source project? https://news.ycombinator.com/item?id=16299125

    Ask HN: Studying large code bases https://news.ycombinator.com/item?id=9060832

    Ask HN: How to dive into large codebase? https://news.ycombinator.com/item?id=12142807

    • c3c 1863 days ago
      I can't believe there are no effective tools for that. Everything looks to be very low-level...
    • in15minutes 1863 days ago
      Extremely useful, thank you.
  • zunzun 1863 days ago
    doxygen turned the classes into hyperlinked web pages for a ginormous complex enterprise code base we worked on, it made understanding the code structure and class organization trivially easy - and we could email code structure links to each other for collaboration! For this purpose I rate doxygen as at least 11 or 12 out of a possible maximum of 10.
    • c3c 1863 days ago
      Does it create call diagrams by any chance?
      • zunzun 1863 days ago
        All method references are hyperlinked, so that you can click through and trace calls.
  • solomatov 1863 days ago
    I would use Intellij. The most important features are:

    * Find usages (Alt+F7)

    * Navigate by hierarchy (Ctrl+U/Ctrl+Alt+B)

    • Adamantcheese 1863 days ago
      I would have to agree. Find usages along with figuring out where/what variables are or used for will get you a long way. You can also go from the entry point and follow execution order, to the extent that you can.
      • in15minutes 1863 days ago
        Is it akin to "open definition" on methods? Does it summarize the call graph for you or just jumps you the calls?
  • _shadi 1863 days ago
    in addition to what was already suggested I use a notebook and a pen to keep track of interesting classes and write notes about them, like sort of an index, and I draw few flow charts.
    • tmm84 1861 days ago
      I used to be this way. I found that working in an editor using asciidoc/markdown is way easier for me. Copy/paste is faster than pen/paper. Also, I can write down notes and snippets of code to make life easier when I am trying to show someone what is going on in the source. Another advantage is I edit things to reflect the current state of the source and not get messed up by older notes/writings.