Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 12, 2020 06:52 pm GMT

Tips I've learned over 10 years for maintainability of my code

I've been writing code for over 10 years now, and although I've been doing more management lately, at my peak I was able to write 500+ lines of well-performing code a day. Here are the principles that helped me with this:

  1. Don't over-generalize
  2. Don't optimize your code in advance
  3. Name and group everything that happens correctly
  4. Don't mix algorithms and other technologically complex pieces of code with business logic
  5. Don't use any advanced features of any language
  6. It is worth throwing all OOP out of your head
  7. Use as many asserts, logs and other methods to catch unplanned system state as early as possible
  8. Every extra line of code is evil
Every extra line of code is evil:) Wherever possible, you should not use someone else's code that you have not read and understood

Here I placed just names of my mistakes, but if you are interested here the full version with each point explanations


Original Link: https://dev.to/exceedteam/tips-for-maintainable-code-3ike

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To