phpmysqlweb-applications

Getting to know a new web system that requires new features


I am going to start working on a website that has already been built by someone else. The main script was bought and then adjusted by the lead programmer. The lead has left and I am the only programmer.

Never met the lead and there are no papers, documentation or comments in the code to help me out, also there are many functions with single letter names. There are also parts of the code that are all compressed in one line (like where there should be 200 lines there is one). There are a few hundred files.

My questions are:

This is my first big break and I really want this to work out well.

Edit

In regards to the question:

I just used notepad++ (extended replace) and netbeans (the format option) to change a file from 1696 lines to 5584!


Solution

  • For reformatting the source, try this online pretty-printer: http://www.prettyprinter.de/

    For understanding the HTML and CSS, use Firebug.

    For understanding the PHP code, step through it in a debugger. (I can't personally recommend a PHP debugger, but I've heard good things about Komodo.)

    Start by checking the whole thing into source control, if you haven't already, and then as you work out what the various functions and variables do, rename them to something sensible and check in your changes.

    If you can cobble together some rough regression tests (eg. with Selenium) before you start then you can be reasonably sure you aren't breaking anything as you go.