DEV Community

Cover image for Code habits

Code habits

straleb profile image Strahinja Babić ・1 min read

My habits

One of the main silly habits that I have is always putting the name of the font family that I import in CSS under a comment.

@import url('');
/*font-family: 'Tajawal', sans-serif;*/

Besides CSS, I like to put comments a lot on Javascript code and HTML.

I know that lots of Developers have some habits, so I am curious, what are your Coding Habits?

Discussion (2)

ben profile image
Ben Halpern

I wouldn't call your commenting habits silly so much as an awesome habit as long as it fits the greater style guidelines.

In terms of habits, I have a habit of not wanting the code to be in a non-compile state, even if I'm just working on it. It's just a quirk but I like to keep things in a state where they "work" and not leave that state for very long at a time. I'm not sure I'm describing that right.

straleb profile image
Strahinja Babić Author

Hehe, thank you 😊 most of those habits I got when I started posting on CodePen at the end it stuck with me 😅.

And yeah, don't ask how, but in a way, I do understand what you meant to say 🙂👍

Forem Open with the Forem app