Code discipline – Rules for my codes.

I remember how many mistakes I made when I started to write programs and the times I was trying to be a programmer. That was a really tough time. Like every other programmer, we all suck in the beginning. Also we all learn, with practice and experience we write better code and understand difficult algorithms. I never stopped learning and becoming a better programmer. I still do so many stupid things. But from all those mistakes I learn something. Sometimes I know how it should be done but even then I don’t use what I know, maybe because of laziness or because I just don’t care. However I don’t wanna do it anymore. I decided to set some rules for myself when I write code next time.

My rules , My code

  • Always document my code, Comment. Comment. Comment.
  • Don’t write ninja code. Write human readable code.
  • Don’t follow the trend.
  • Prevent Deep Nesting.
  • Don’t push broken code
  • Write maintainable code.
  • Use less media queries and write media queries only when you need.
  • Use Appropriate Naming Convention for css.
  • Use JS Lint.
  • Use Flexbox and Grid in the future.
  • Follow a Proper Coding Standard.
  • Always handle errors.
  • Use DRY Approach.
  • Create something valuable and helpful to others.

For now this is it. But I will update this list again when I notice something I should do.

Thank you for reading guys, I recently did an experiment with content load animations like facebook. you can take a look here. Also press that star button ;).