Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting to know a new web-system that you have to work on/extend

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: Does anyone have any advice on how to understand this system? Has anyone had any similar experiences? Does anyone have a quick way of decompressing the lines?

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

Thanks

EDIT: On regards to the question: - Does anyone have a quick way of decompressing the lines?

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

This is going to be a loooonnngggg project

like image 538
AntonioCS Avatar asked Dec 07 '22 07:12

AntonioCS


1 Answers

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.

like image 120
RichieHindle Avatar answered Dec 10 '22 11:12

RichieHindle