Tuesday, September 25, 2018

Computer Programming Code of Ethics






A code of ethics defines a specific set of professional behaviors and values to live and act by. All software programmers must act and abide by the code of ethics including confidentiality, accuracy, privacy, integrity. This ensures fair play and fair practice in and around an organization.

The code of ethics is not only intended for professionals in the certain field but also managers, practitioners, educators, supervisors as well as trainees and students related to this field act ethically, behave and make decisions in accordance with the code of ethics.

As of now, we are discussing a programmer/software developer should follow a set of values which are defined in the below ways:
  1. Always write clear code that is understandable and easy to follow using comments in the source code.
  2. Always write accurate documentation that shows the exact function of the website.
  3. Use copyrighted code only after obtaining permissions and or purchasing a proper license. Always indicate a statement of copyrighted material saying where does it belong to.
  4. Acknowledge verbally and in source code comments the work of other programmers on which the code is based, even if substantial changes are made.
  5. Always write bug-free code and avoid suspecting and fixing bugs after the application is complete.
  6. Always write code that is safe and can be used by others programmers too.
  7. Always estimate the exact time constraints for the completion of the project.
  8. Keep track of your work honestly in order to build the reputation of the profession.
  9. Always keep it confidential, the secret reputation of an employer.
  10. Always work for your company avoiding compensation from multiple parties for the same work unless you have permissions to do that.
  11. Always ask for permissions from the employer for the external projects that you may benefit from.
  12. Always be loyal to the employer and respect their knowledge, experience, and abilities.
  13. One should only direct by suggesting the others during their work without by themselves involving in writing the code.
  14. Always seek permissions from the users to install third-party applications and any other software development tools.
  15. One should provide application updates to users only after approval and sharing complete details of the update. 
  16. Always deal fairly and honestly at all times and in all matters – both in business and private life.
  17. Comply yourself with legal and regulatory requirements considering these as minimum standards to be observed.
  18. Always involve everyone in the coaching and development of others.
The above code recognizes that there are mutual obligations and responsibilities not only between the Company and its people but also between each individual to all other colleagues at all levels.

The code also recognizes obligations and responsibilities to people outside the company – to customers, to suppliers and to the communities in which people live and work.

"When your values are clear to you, making decisions becomes easier."
  —Roy E. Disney

Saturday, September 8, 2018

Writing a REUSABLE code.

Any code can be reused in a way or another we call it as reusable code. A programmer should explicitly make the code reusable by taking into account other situations of the code usage.

I would make it a best-practice of my Software Developer career that I will always write a reusable code. The code that helps and minimizes the effort and time which reduces the instances of coding from scratch.

Write the code for other people to read. This means a combination of good names, good comments, and simple statements make code clean and understandable. Sometimes programmers write complex single lines of code that do many things. But instead of writing one line of code that is difficult to understand we should write 5 lines of simple code that people can follow. Because today memory is plenty and cycle times are fast, this would not take more than a minute for executing 5 lines of code.

Reusability is rarely a worthwhile goal in itself. Rather, it is a by-product (secondary product) of writing code that is well structured, easily maintainable and useful. We need to into account that if we start with bare requirements of any project, we will find that the code will be clean, tight and elegant. When we'll work on another project that needs the same functionality, we can naturally adapt our original code. If we need to change something, then we can just create another piece of code, another class, another library, etc... it helps the other developers who are working in the same application.

Comments are more important. everything we write in comments should point to the function of the code and why we are writing that. What it will do? Everything that might be confused when we come back to the code next time will have comments clearly written. We can within no time can figure out what were we doing the last time and save hours of time.

Finally, Programming is performance; we should be aware of who our audience is. "Code as if the person who ends up maintaining our code is a violent psychopath (having a mental disorder) who knows where you live."