Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I'm stuck updating other people's code at work. It's bad, bad code, and as such, it's hard to understand. It's not uncommon for me to stare at it glaze-eyed for several minutes before realizing that these 15 lines are just checking if a file exists.

So that gave me an idea. It sure would be nice if, once I figure out what a particular chunk of code does, I could somehow hide it from view, replaced by a one-line comment on what its function is. Then I could collapse the code one piece at a time, and when I'm all done, I'll have nothing but a big page of pseudocode explaining the whole process. Even better, if I could take those collapsed bits of pseudocode and collapse them together into a higher level of abstraction, and so on. In effect, I'd be generating the kind of comments that should have been placed there by the original programmer to begin with.

So I'm wondering. Does anything out there already do this? I can't see how it'd be useful for coding from scratch, but it'd be invaluable for making sense of legacy code, especially in big projects. Anybody know of such a beast?

---
I'm too sexy for my .sig.


In reply to Can your editor do this? by Sprad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2023-09-27 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?