How to develop better software with best practices

Writing good code is a habit that comes from mixing several approaches and changing practices by learning from your own experiences. And mostly its about thinking psemistic. There is no happy programmer because there are infinity ways to break your code, all you need to look for is to cover all the pit falls by following best practices.


This is th crucial part because you have time to think before starting any real coding and it becomes impossible to change the modules if you start in a wrong direction. So, its always better to think a lot before starting. Think end-to-end implementation no matter how small or bit it is. Here is what I do,

  1. Gather all requirements from client regarding the work you need to do.
  2. Prepare requirement as a story to understand better. Don't go to next step until you understand the requirement.
  3. Get domain knowledge to understand the requirement and plan development in better way.
  4. Think of development and server platform: Choose the best fit for the task to be done and be biased when coosing one. Never use what you know or you like, that could e a poor choince in the future.
  5. Thnik of software packages or modules: Choose what is needed for the work and choose good ones but not those with questionable future because it will become though to scale up or maintain.
  6. Prepare mitigation plan: Anything from database to payment gateway may go as discontinued or will release new version by making the old one obslete. You need to plan based on the software, modules and packages you choose to develop with.
  7. Refuse to do poorly designed system unless you get freedom to do it right.
  8. Most importantly, Reject unrealistic timelines: Unlealistic timelines will go bad in several ways as you may need to deliver unfinished or untested or buggy code. Finally it will ruin your reputation and relation with client.


  1. First rule of thumb is to never trust what you get as input: Always valiade data you get as much as possible even if it seems useless. Not only data you get as input, even the data user request for is to be validated thoroughly. Most applications gets hacked because of poor validations.
  2. Never use coding techniques you want to learn and show off. Use whats needed and relevant. For example, my friend was writing all application logic in stored procedure and argued with me that it gives excellent performance boost and he had to write all that again in c# when we wanted to log all code changes.
  3. Write code as simple and readable as possible, this makes it easy to revise and review at a later stage. And you may be praised by developers who continue development after you.
  4. Don't reinvent the wheel, use available software modules, packages.
  5. Always write test cases and those will give you headsup in case of any breaking code changes before your test team identifies.
  6. Last and most important one is to test what you do, test in each and every possible way you can think of to break and hack your app. Trust me this will ake your app rock solid in terms of security.


  1. Review your code for speed, stability, security, and usability.
  2. Monitor application performance.
  3. Monitor Server performance if you have to.
  4. Do rolling releases if you can.
  5. Revisit old code periodically and see what you would've done differently.

Let me know how do you achieve quality programming?

Posted On 27 October 2010 By MicroPyramid

About Micropyramid

Micropyramid is a software development and cloud consulting partner for enterprise businesses across the world. We work on python, Django, Salesforce, Angular, Reactjs, React Native, MySQL, PostgreSQL, Docker, Linux, Ansible, git, amazon web services. We are Amazon and salesforce consulting partner with 5 years of cloud architect experience. We develop e-commerce, retail, banking, machine learning, CMS, CRM web and mobile applications.

Need any Help in your Project?Let's Talk

Subscribe To our news letter

Subscribe and Stay Updated about our Webinars, news and articles on Django, Python, Machine Learning, Amazon Web Services, DevOps, Salesforce, ReactJS, AngularJS, React Native.
* We don't provide your email contact details to any third parties