samedi 19 novembre 2016

Commenting every line of code.. Good Practice?

Is it a good practice to comment every line of code despite of their importance on the code like this?

/* Display an error message */
function display_error_message( $error_message )
{
    /* Display the error message */
    echo $error_message;

    /* Exit the application */
    exit();
}

/* -------------------------------------------------------------------- */

/* Check if the configuration file does not exist, then display an error */
/* message */
if ( !file_exists( 'C:/xampp/htdocs/essentials/configuration.ini' ) ) {
    /* Display an error message */
    display_error_message( 'Error: Configuration file not found. Application has stopped' );
}




Aucun commentaire:

Enregistrer un commentaire