Top

Welcome

Please Login to your account to join the conversation.

IT - Computers  - Software

  Improve programming skills.

Posted by 

1 Replied | 261 Views

    How do I improve my software coding and programming skills.

Get this answer in Social Media

Have something to add? We’d love to hear it!
You must have an account to participate. Please Login In Here, then join the conversation.

Responses

  Venkat S  

Replied on 09-Oct-18

Code should be efficient, fast, bug-free, easily debuggable and easily maintainable in order to perform enhancements and modifications later. Keep these as the key objectives. Some tips below:

  1. Try to write code that is as crisp as possible. Sometimes there may already be a pre-existing function in teh language to take of the logic that you are struggling with and wasting time writing lines and lines of it. Efficient pieces of code for common scenarios are also available on the internet. 
  2. Follow standard nomenclature, indentation if you want to be a real good programmer. Variables names like 'i', 'j' will never allow you to improve.
  3. After a few months of writing code, sometimes the developer himself/herself finds it hard to understant complicated logic that he/she had written. Others who take over find it much harder. Comments at right places are the no.1 most useful facility to cut down such discovery time. It helps in maintenance and production support too.
  4. Break the code logically into as many functions/procedures and into as many code modules as possible. This makes it easy to modify a piece of code with least impact on other parts of the program/application.
  5. Check for loops within loops that can be avoided.
  6. Test your code thoroughly. Don't just dump the application on Testers to come back. A good developer always tests to the best of his/her knowledge.
  7. Understand business logic, validations and rules to the maximum extent possible. Business and programming are not independent. Keep validating your code against the required business logic periodically. Programmers most of the times don't understand the business domain which causes a lot of obvious logic (with respect to that particular domain) to be missed out. This is a regular issue. Customers see this as missing common sense !!!
  8. Object oriented methodology is to be adapted to the best possible extent that the software provides for.
  9. Avoid hardcoding of any data. Use code tables, master tables, error tables or configuration files to get all such data. Sometimes even complicated business rules are better picked up from a properly designed database rather being coded directly into the program. 
  10. Whenever code changes are made, make a comment/note with current date at that place to indicate a change of logic from original requirement. This is very useful to remember why an application behaviour had changed.
  11. Be careful with variable names, their span/range and risk of mixup between global and local variables. Good quality naming standards should take of these.
  12. Always end a switch case type of statement with a clause to take care of all the cases that dont satisfy the mentioned cases. Programs can behave unpredictably otherwise if some scenarios are missed out from swtich/if etc constructs.
  13. Keep debuging points bookmarked for easy check during errors. Ensure all procedures have error traps. Dont allow anhy program to crash due to errors. Programs should always exit smoothly.
  14. Follow version control rules very diligently to avoid version clashes that can spoil your hard work.
  15. Watch your expert colleagues write good code and learn from it. There is nothing wrong in learning good methods from others.