Ask HN: Better code readability/reviewability

https://news.ycombinator.com/item?id=12905347
by eyer2016 • 10 years ago
1 3 10 years ago

I'm in a situation where several nested functions are used and each of these functions are present in different files (which are in different directories). (I'm sure there's legitimate reason for modularizing code to such an extent).

I'm having trouble reading the code and being able to understand what exactly is happening.

Is there a tool that would comment function calls and replace them with the function body instead so that I can read it better? Also, would it be able to do this on-demand.

For e.g., in ST3, I could call a function that would find the definition of the function in my project and replace it in my file and does not do so for calls made in the replaced function body until I ask it to?

In my context, this is about Javascript, but this is a language-agnostic question.

Alternate question: How the heck do you deal with situations like this?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com