Well, we all know the features of OOPS – it serves a lot of advantages for a complex system – Code reuse, Security, and many more…
But does just writing/implementing the module with OOPS complete your job? No. It should also be meaningful when you define a variable/method for the Class.
Keep the following points very clear when you write a code in OOPS.
- Make use of the real features of OOPS – Method Overloading, Data Encapsulation and Inheritance.
- Understand OOPS principle here – Code Reuse Principle.
- Give meaningful name for any variables/methods used in the class.
- Make sure that when anyone looks at your code they should not have any doubts/questions except for the business requirements.
A good naming convention is more than a nicety. It lets you write program that don’t need to be told about the relationship among variables and methods. Talking about coding convention reminds me one thing which helps understand the purpose of the script, called File/Method Description.
- Give brief introduction about the script/method.
- Add any example which will help the reader to understand the syntax (if any) better.
- Add the date of the script when it is created.
- Give author name along with EMail ID – this helps if the reader/developers needs to clarify any doubts.
- Give @Copyright message if any.
- Give the design pattern if applicable.
help me extend this….
Have a happy coding!