• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Programming Experience Sharing for those solely in software industry #5

5. In some environments, the application owner will throw the whole junk of code
   which developed in 3 years time and brief you about the application flow in 3 hours then she quit.
   
   How can I capture the logic to enhance the program or fix the bug for the rest of
   my life in the office?  
 
Thanks.

Rgds,

yjchong514
0
yjchong514
Asked:
yjchong514
  • 2
  • 2
1 Solution
 
VampireofdarknessCommented:
Same as my answer here: http://www.experts-exchange.com/Programming/Misc/Q_27024044.html#a35711584

The easiest answer here is practice.

The only way to get better at something is to practice using it. Plain and simple.

Read through the code, figure out what does what. Set up a test environment (DO NOT USE A LIVE ENVIRONMENT FOR TESTING). Change things and see the outcome. Make notes in the form of comments on the code for reference. Create a set of instructions for using it, or documentation of some description.
0
 
yjchong514Author Commented:
Please elaborate more on:
Create a set of instructions for using it, or documentation of some description.

0
 
VampireofdarknessCommented:
As you're going through the code, make notes on why things are the way they are and how they are called. For example, if you have a function called 'generate' and one called 'process_generation' it could look like

function generate() {
   ... do something and assign to $data
   process_generation($data);
}
function process_generation($data) {
  ... do something else
}

Open in new window


Make notes / documentation for:

  1. Why are these used?
  2. Where are they used?
  3. What do they do?

You could also, at this point, run some benchmarking and create a wishlist:

  1. How fast does the function execute in ms?
  2. Can it be improved? (Remove code, change code so as to not use deprecated functions)

At the end your document will look something like this, but with a bit more flesh:

  To generate reports, you use the generate() function in xxx.php. It calls the process_generation($data) function, in xxx.php. The output is in X format, use for Y page/resource. It requires that yyy.php is included at the top of the script as it uses zzz() function in that document.
 

0
 
yjchong514Author Commented:
Thanks.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now