JavaScript
- 1 minJavaScript 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.