Aug 28, 2021Never use the Dot operator in JavaScript, for DataThe Dot operator is dangerous because if, at run-time, the value of the identifier before it is not what was intended, the program will likely throw an error and probably crash. Firstly, there are of course cases where the dot operator is perfectly…JavaScript6 min readJavaScript6 min read
Feb 22, 2021Automatic Documentation For JavaScript Projects — README, JSDoc & MermaidThis article is a result of some research I did around generating documentation for NodeJS/JavaScript based projects. When using JSDoc to document JavaScript code with doc-strings, the next step is to get this information extracted and presented in a nice, friendly way. In any project, we also always have a…JavaScript11 min readJavaScript11 min read
Dec 22, 2019From OOP to Functional Style (FP) — A JavaScript Pattern ProgressionJavaScript is under the hood a rather different language than many other common programming languages, but it is perhaps not obvious at a first glance. With roots in the Lisp-like language Scheme — functions stand in the very center of how JavaScript operates. The function is in JS what is…JavaScript16 min readJavaScript16 min read
Oct 30, 2019Safer Code with ES6 Destructuring — Explained in One ExampleUncaught TypeError: Cannot read property ‘x’ of undefined Recognize this? Seen this before? It is perhaps the most common error in Javascript. Error prone dynamic data We often deal with dynamic data in complex structures in all web applications (browser + node.js) which, when we try to use that data, might produce unexpected behaviors…JavaScript2 min readJavaScript2 min read
Oct 30, 2019How Promise.race Solved a Problem In Our Async CI TestingJavascript is really a great language when it comes to async programming. But it is not always a walk in the park to test async code. It is a good idea in unit testing to try to test at the highest possible level — focusing on testing of the module’s…JavaScript2 min readJavaScript2 min read