DEV Community

loading...
Cover image for Programming habits for a not smelling code
Code Inspector

Programming habits for a not smelling code

leslysandra
Enthusiastic Learning! Teaching/Learning about Coding and Machine Learning πŸ€– Travel - Hacks - Tech
・Updated on ・1 min read

Let's start talking about "programming habits" πŸ‘©πŸ½β€πŸ’», what are your top three? πŸ˜…
What were your habits when you started to code and what your habits are now? 🧐

Let me start with one... β€œI’ll fix it later” πŸ€ͺ
I know sometimes we are tired about one issue or bug while coding and maybe with few ideas on how to fix it! Take a break, "fix it later" but not too late! not for other dev! not after production!

So, what about "code smell" and "programming habits"?
Alt Text

What makes a code smell?

  • Making pointless optimizations when "fixing" your code
  • Using names that don’t add information (meaningless)
  • Using the wrong tool for the job (have you tried enough tools?!)
  • Hardcoding values instead of making them configurable
  • Not taking the time to learn how things really work
  • Reinventing the wheel all the time and not exploring different options
  • Blindly copy/pasting code 😱 please no!
  • Ignoring the nonfunctional requirements πŸ™„
  • Not making enough time frequently to keep learning about new technologies and trying them out πŸ€“
  • Not planning code reviews πŸ“
  • Not planning code refactor in your team πŸ“‹

Aim to change your coding story for your own projects and/or your company! share your enthusiasm about writing great code, making general reviews, use automation tools, and so!

And remember, as we used to do when learning coding, think think think, solve the problem, before writing the code 😹

Alt Text

Discussion (0)