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.

Pre-Development

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.

Development

  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.

Post-Development

  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?

 

Subscribe To our news letter

Subscribe to our news letter to receive latest blog posts into your inbox. Please fill your email address in the below form.
*We don't provide your email contact details to any third parties
Latest Comments
Related Articles
Streaming protocols ogg, mp3, aac Siva Chittamuru

Audio format is a file format for storing the digital audio data on a computer. The encoding of the audio data is done by the ...

Continue Reading...
Being focused and Productive at your work Vinisha Naladala

Plan your tasks in a smart way to achieve success in your life. Here are some tips to help you work smarter so you can ...

Continue Reading...
Streaming Protocols continued... RTMP, MMS Ashwin Kumar

Streaming is the technique for transferring data at fixed rate in real time between the client and the server. There are many streaming protocols available ...

Continue Reading...