DEV Community

Cover image for Code habits
Strahinja Babić
Strahinja Babić

Posted on

Code habits

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('https://fonts.googleapis.com/css?family=Tajawal');
/*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?

Top comments (2)

Collapse
 
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.

Collapse
 
straleb profile image
Strahinja Babić

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 🙂👍