architecture - Tips on creating clean, elegant code -


Write a clean, elegant code that makes a coding for me, I'm always exploring more ways to do this. Here are some strategies / strategies:

  • Keep large code blocks in small portions of the routines / methods / classes

  • Be sure that there is a point of exit in every routine, exit the loops with logic at the top of the loop, not with brakes or some kind of "exit loop" keyword.

  • Avoid Global

  • If you have copied / pasted with your code, then this is a regular / square / Library.

... and what I am doing recently:

  • If / branches / select cases with different methods Then try to change

< / P>

/ P>

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -