2 added 304 characters in body
source | link

Commenting out a function is always a good choice in my opinion.

First and foremost you can actually understand what the function does without having to look deep into the code. This way your code will be easier to understand for other people. You can then need to use less comments for single lines of code, which may result in out of date code (bad documentation is far worse than no documentation at all).

Secondly, you can implement a function contract (see "Design by contract" approach). Design by contractDesign by contract is a good practice that will give you a glance of a function not function properly, not doing what it's supposed to do.

Additionally, a correctly formatted comments can be used to automatically create documentation for all your function in no time, and can be used to track down functions versions and revisions for version-control needs.

You should follow all possible way of having a self-explaining function, starting from the name of the function, to the name of the variables, methods, etc... All these things help other people better understand your code, and help save lot of time in debugging.

Write comments before the function is one of those good practice I advise you to follow.

Commenting out a function is always a good choice in my opinion.

First and foremost you can actually understand what the function does without having to look deep into the code. You can then need to use less comments for single lines of code, which may result in out of date code (bad documentation is far worse than no documentation at all).

Secondly, you can implement a function contract (see "Design by contract" approach). Design by contract is a good practice that will give you a glance of a function not function properly, not doing what it's supposed to do.

You should follow all possible way of having a self-explaining function, starting from the name of the function, to the name of the variables, methods, etc... All these things help other people better understand your code, and help save lot of time in debugging.

Write comments before the function is one of those good practice I advise you to follow.

Commenting out a function is always a good choice in my opinion.

First and foremost you can actually understand what the function does without having to look deep into the code. This way your code will be easier to understand for other people. You can then need to use less comments for single lines of code, which may result in out of date code (bad documentation is far worse than no documentation at all).

Secondly, you can implement a function contract (see "Design by contract" approach). Design by contract is a good practice that will give you a glance of a function not function properly, not doing what it's supposed to do.

Additionally, a correctly formatted comments can be used to automatically create documentation for all your function in no time, and can be used to track down functions versions and revisions for version-control needs.

You should follow all possible way of having a self-explaining function, starting from the name of the function, to the name of the variables, methods, etc... All these things help other people better understand your code, and help save lot of time in debugging.

Write comments before the function is one of those good practice I advise you to follow.

1
source | link

Commenting out a function is always a good choice in my opinion.

First and foremost you can actually understand what the function does without having to look deep into the code. You can then need to use less comments for single lines of code, which may result in out of date code (bad documentation is far worse than no documentation at all).

Secondly, you can implement a function contract (see "Design by contract" approach). Design by contract is a good practice that will give you a glance of a function not function properly, not doing what it's supposed to do.

You should follow all possible way of having a self-explaining function, starting from the name of the function, to the name of the variables, methods, etc... All these things help other people better understand your code, and help save lot of time in debugging.

Write comments before the function is one of those good practice I advise you to follow.