JavaScript

- 1 min

JavaScript is an extremely popular language despite its shortcomings. As a result of those shortcomings, writing good clean code can be quite challenging. Today I spent a useful part of the day trying to refactor a piece of code that dealt with dates and time, something which can be quite unwieldy. It becomes even more unpleasant when mutable state is involved and it’s not very obvious where it’s happening.

JavaScript like any other language, is merely a tool. A tool can be used well or it can be misused. In my recent experience with JavaScript, writing functions that refrain from changing the whole world around them, ensures that my sanity remains intact.

author selfie

Personal blog of Makis Otman

Get my latest content by email. 100% spam-free.

    rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora