My little habits, as a web developer

entertainment / productivity

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,

  1. 🎨 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.
  2. 🧪 I always name the HTML file I’m testing code in as test.html
  3. 🧹 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.
  4. ✌️ I use the two comment formats in JavaScript for different reasons
    The one with asterisk /* */, I use for stating the purpose of a function. I use //for explaining individual lines of code inside a function.
  5. 🤔 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.
  6. ✍️ 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.
  7. 🖨 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)
  8. 🐪 I use camelcase
    For quick selection.
  9. 📃 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.
  10. 👩🏻‍🔬 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.
  11. 📥 I save the code I’m testing out in the downloads folder
    I still don’t know why.
  12. 🔖 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.
  13. 🖼 I often change the colour scheme of my code editor
    However, all of them are dark themes. A bright screen gives me a headache.
  14. 📦 I use courier new font for my code editors
    I rarely like the other monospace fonts.
  15. 📖 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.
  16. 🙉 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.
  17. I don’t use quotes on HTML attribute values
    For instance, like id or class values. 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.
  18. I use single quotes for strings in JavaScript instead of double
    I also prefer template strings.
  19. {} I don’t use curly braces for a single line code block in JavaScript
    If a for loop or an if condition 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.
  20. 🔎 I use id, not class, for identifying a single element.
  21. ⌚️ I wait twenty seconds after I’d updated a server before refreshing the browser to see the change.
    It works for me every time.
  22. 📛 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.
  23. 🚫 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.
  24. 🎧 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.
  25. 👩🏻‍💻 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.
  26. 🛋 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.
  27. 👟 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.
  28. 🧽 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.
  29. ⚔️ I don’t use a framework if it’s not a necessity
  30. 🦖 I mostly use MDN for a quick reference of frontend standards
    I google the CSS or JavaScript standard I want to look into using its name followed by mdn.
  31. 🚨 I still sometimes use alert instead of console.login JavaScript when I’m working on a code
    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

Advertisements

The Author

Web developer and writer. @rpsthecoder in Twitter.