Live data from Hacker News

Ask HN: Is there a tool you use just for reading code?

news.ycombinator.com

11–16 of 16 posts

Re: Ask HN: Is there a tool you use just for reading code?

#13
Not an application but a process:

1) Run it. See what it does.

2) Read it. Identify main function(s).

3) Trace it. Use a debugger w/ breakpoints for this. See if you can follow how it runs.

4) Print it. Review interesting parts that you don't quite understand away form a computer.

Re: Ask HN: Is there a tool you use just for reading code?

#14
post #2

Most of the times I use less in the terminal. Or vi, it's not easy to accidentally make a change and save it. Or the browser in GitHub, Bitbucket or what else hosts the project. I write code with emacs. I could turn a file in read only mode but I prefer not to mix what I'm working on with what I'm only reading.

Have you considered turning to the dark side? You can have vim keybindings in emacs with evil, so you can stay in the normal state like in vi, so accidental changes should than be caught identically as in vi.

But I guess having different tools for reading and writing is valuable in itself, too.

Re: Ask HN: Is there a tool you use just for reading code?

#15

I do code review for legal cases on occasion. When I do, and when possible as sometimes the tools I can use are specified before I get the job, I like to use doxygen ( https://www.doxygen.nl/ ) to convert the code to html. It also creates call graphs. It is nice because it links to function and method definitions where it can, so as I go through the code I open each function I am teaching in a new tab - the open tab…

Hmm I’m familiar with generating documentation for functions with doc strings but how do you convert the code to html and generate the graphs?
Post reply on HN