Everybody has habits. Some habits are tied to something specific about you: your family, your job, your hobby; while others are very behavioural and effervescent, sneaking into almost all aspects of your life.
I’ve got some little habits like most of you as a web developer. Some, you might find bizarre, and some, you could be like,“hey,I do that, too!”
Here we go,
- 🎨 I use CSS named colors
It’s much easier and quicker for me to use CSS named colors than pick a custom colour and use its hex or rgb value. I even have some favourites: crimson, dodgerblue and beige.
- 🧪 I always name the HTML file I’m testing code in as
- 🧹 I format my codes at the end of a day
I can never wrap up my work for the day without arranging my code neatly.
The one with asterisk
/* */, I use for stating the purpose of a function. I use
//for explaining individual lines of code inside a function.
- 🤔 I work out a code in my head first before typing it in the editor
Trying out a code and then deleting and changing it if it doesn’t work tires me out quick. So, I do my best to check if a code fits my logic in my mind prior to using it.
- ✍️ I draw out any complex or lengthy logic before coding it
Sometimes the flow of a code block is too long or complex for me to imagine it seamlessly in my mind, so I draw it out in a form I find easy to understand in (mostly as a flow diagram) before coding it.
- 🖨 I print out stuff too long to read
It could be a long documentation, my audit report, or even code – like this one time I was asked to look into an old code in a very old application – I tend to print them out to read, because it’s much easier to read that way for me than to scroll up and down on a screen (I hate scrolling for long)
- 🐪 I use camelcase
For quick selection.
- 📃 I don’t copy code from websites
Let’s say there’s a block of code in a documentation that I want to test, instead of copying it I always type it out in my code editor.
- 👩🏻🔬 I often use experimental code (with fallback)
If there’s a better or simpler way to do something, even if it’s experimental, I’ll use that method, while adding a fallback if needed.
- 📥 I save the code I’m testing out in the downloads folder
I still don’t know why.
- 🔖 I bookmark online articles I might want to refer later under reference
I also add what programming language the article is focused on first in the name of the bookmark.
- 🖼 I often change the colour scheme of my code editor
However, all of them are dark themes. A bright screen gives me a headache.
- 📦 I use courier new font for my code editors
I rarely like the other monospace fonts.
- 📖 I read programming books
Mostly, when I want to try a new programming language — the books that cover the basics of that language. I like the reading experience with a physical book. I also take notes in a separate small notebook, never scribble on the book itself.
- 🙉 I can’t listen to seminars or podcasts on coding
I try, though. There are a ton of good subjects covered in seminars and podcasts out there, but I quickly lose focus if I just have to listen to people talk and move to something else. I prefer reading – I think we’ve established that very clear by now.
- ❝ I don’t use quotes on HTML attribute values
For instance, like
classvalues. I, however, use the quotes in the sample codes in my online articles to not confuse the format for any new programmers and to keep up with a generic standard, but I don’t actually quote them otherwise.
I also prefer template strings.
forloop or an
ifcondition executes a single line of code, I don’t demarcate that code with curly braces. Again, I might do so, however, in the sample codes in my articles to not confuse readers.
- 🔎 I use
class, for identifying a single element.
- ⌚️ I wait twenty seconds after I’d updated a server before refreshing the browser to see the change.
It works for me every time.
- 📛 I don’t move on with my coding if I’m not satisfied with the variable names
During my early years of programming on job I used to straight up use alphabets to name variables, like x, y, z, n, i… till a senior programmer told me I should take into account that my code will be read by someone else and that it’s my responsibly to make my code as understandable as possible to a pair of eyes looking at them for the first time.
And I should start with meaningful and understandable variable names.
So now I’ve set some guidelines for myself for naming variables and I take them very seriously.
- 🚫 I don’t switch to doing anything else when I’m coding
Like checking my social account or reading news. It’s mostly because, I don’t like to switch windows or tabs.
- 🎧 I prefer a silent environment when I’m working.
But if there’s noise, I’ll put on my earphones and listen to pop songs while coding.
- 👩🏻💻 I do my best not to mentally drift into the coding zone when I’m at workplace and when I’m not alone at home
I don’t like when someone is too involved in something that they don’t respond to an important and pressing matter I might want to tell them, so I do my best not to turn into such a person myself. Any distraction that might come to me while coding in form of a human or a cute dog (other animals are excluded), I take it as a welcoming break.
- 🛋 I can only work in a well-lit environment
Darker places brighten up the screen and in turn gives me headaches. So even if I’m coding at home at night, I’ll keep on all the lights where I’m working.
- 👟 I literally walk away from the computer when I’m not in the mood to work on an application
Usually this happens when I’m still waiting for some feedback or answers from a client regarding their project.
- 🧽 I cleanup code all the time
Not just code – my desktop has nothing on it except the wallpaper. The trash is emptied at the end of the day and I leave no commented out code in my files. Sure, some days it’d gotten me in trouble, still I cleanup pretty ruthlessly. I also tidy up my workspace, and keep my computers clean.
- ⚔️ I don’t use a framework if it’s not a necessity
- 🦖 I mostly use MDN for a quick reference of frontend standards
- 🚨 I still sometimes use
It could be to know a variable’s value or to know at which stage the process is in, I just sometimes prefer the in-your-face alert message than the out-of-your-way console message.
What’s your habit? Tweet with #webdevhabits