reading other people's code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MJL

    reading other people's code

    I am working with an open source piece of software that is
    overwhelming me and I was hoping to get some advice.

    It is in some areas simple and others nearly impossible. There are
    many includes and functions scattered among many files in many
    directories. While the code itself is not to hard to follow, there is
    virtually no commenting or documentation.

    I am working on a Windows XP machine, but I am comfortable and have
    access to a Unix machine also (my web host via SSH).

    Are there any recommended methods or tools for figuring this stuff
    out?

    Thanks for any advice. The software, by the way, is OpenEMR, which
    can be found easily through Google.
  • Daniel Tryba

    #2
    Re: reading other people's code

    MJL wrote:[color=blue]
    > It is in some areas simple and others nearly impossible. There are
    > many includes and functions scattered among many files in many
    > directories. While the code itself is not to hard to follow, there is
    > virtually no commenting or documentation.
    >
    > Are there any recommended methods or tools for figuring this stuff
    > out?[/color]

    Never tried it on PHP, but ctags and vim are a useful combo for many
    languages. ctags to build indexes of the code and vim... just the best
    editor ever :)

    Comment

    • Chung Leong

      #3
      Re: reading other people's code

      "MJL" <mail@affordabl emedicalsoftwar e.com> wrote in message
      news:29c5bb08.0 408170800.16877 920@posting.goo gle.com...[color=blue]
      > I am working with an open source piece of software that is
      > overwhelming me and I was hoping to get some advice.
      >
      > It is in some areas simple and others nearly impossible. There are
      > many includes and functions scattered among many files in many
      > directories. While the code itself is not to hard to follow, there is
      > virtually no commenting or documentation.
      >
      > I am working on a Windows XP machine, but I am comfortable and have
      > access to a Unix machine also (my web host via SSH).
      >
      > Are there any recommended methods or tools for figuring this stuff
      > out?
      >
      > Thanks for any advice. The software, by the way, is OpenEMR, which
      > can be found easily through Google.[/color]

      You can attach something like print_r(get_inc lude_files()) to the bottom of
      a page to get a list of files included. Would give you some inkling of
      what's going on.


      Comment

      • steve

        #4
        Re: reading other people's code

        "MJL" wrote:[color=blue]
        > I am working with an open source piece of software that is
        > overwhelming me and I was hoping to get some advice.
        >
        > It is in some areas simple and others nearly impossible. There are
        > many includes and functions scattered among many files in many
        > directories. While the code itself is not to hard to follow, there[/color]
        is[color=blue]
        > virtually no commenting or documentation.
        >
        > I am working on a Windows XP machine, but I am comfortable and have
        > access to a Unix machine also (my web host via SSH).
        >
        > Are there any recommended methods or tools for figuring this stuff
        > out?
        >
        > Thanks for any advice. The software, by the way, is OpenEMR, which
        > can be found easily through Google.[/color]

        I have worked my way thru some serious code. The best approach IMO is
        use a php debugger that can single-step the code. You will soon
        figure out what is going on. There are a number of threads on the
        subject of php debugger or php IDE. If you need them, let me know,
        and I will post them.

        --
        http://www.dbForumz.com/ This article was posted by author's request
        Articles individually checked for conformance to usenet standards
        Topic URL: http://www.dbForumz.com/PHP-reading-...ict140454.html
        Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=470509

        Comment

        Working...