Programming Experience Sharing for those solely in software industry #5

Posted on 2011-05-07
Last Modified: 2012-05-11
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?  


Question by:yjchong514
    LVL 9

    Expert Comment

    Same as my answer here:

    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.
    LVL 6

    Author Comment

    Please elaborate more on:
    Create a set of instructions for using it, or documentation of some description.

    LVL 9

    Accepted Solution

    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
    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.

    LVL 6

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Title # Comments Views Activity
    character entities and entity references in XML 17 81
    Specific format 21 105
    mapShare challenge 13 40
    White board coding practice 3 29
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    This is about my first experience with programming Arduino.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now