If my code works why do I care about maintainability?
Programmers care about writing code which is easy to maintain because..
Here are some ways to make your code easy to maintain. |
Comments
Comments enable programmers to understand the purpose of each section or line of code. To find out how to add comments in C# click here.
Variable naming
Variables should be named sensibly using a noun to describe the values which will be stored e.g. name = "Bart."
Modularity
Code should be broken up into procedures and functions to allow for re-use and to make it easier to test.