Good Coding Habits

If you’re feeling down about yourself while learning to code, this might cheer you up.

I just spent the last 45 minutes trying to overwrite a parent-theme’s function in WordPress, only to discover I didn’t have the child-theme activated in my local development environment. 🤦‍♂️

Sometimes it helps to take a step back and ask yourself what, outside of what is right in front of you, could be causing the issue.

Often times it can be something simple and unrelated to the code that you’re writing. Taking frequent breaks to clear your mind can also help with these kinds of situations.

Coding is a lot easier and more enjoyable when you practice good habits that keep you relaxed and focused.

When you make mistakes, like I did in the story above, it helps to reflect on what you did wrong, what you could have done better, and maybe even write it down. For me, it would have been helpful to step back early on and double check that the theme I was editing was active instead of trying different lines of code over and over for 30+ minutes.

Solutions aren’t always this straight forward or easy to come by, but writing and re-writing code over and over will just make you crazy.

Form good habits now, and save yourself time and energy later! 😁

Do you have some good coding habits that you use on a regular basis? Please share them with us in the comments.

Leave a comment

Your email address will not be published. Required fields are marked *