DEV Community

Lior Gutweter
Lior Gutweter

Posted on • Originally published at yearn2learn.netlify.com on

Weekly Links #216

Articles

When I follow TDD

  • When you have a bug to solve, you should first write a test that covers it.
  • You should try TDD for complex utility pure functions.
  • Testing Library tools enable you to write TDD because you don’t have to know implementation details.

The Double-Bang (!!) Operator And A Misunderstanding Of How JavaScript Handles Truthy / Falsy Values

  • Avoid casting to boolean during condition statements.
  • Avoid casting to boolean in Array’s filter method.
  • Cast to boolean only if you need a strict boolean value or you need to send it to an API that you don’t have control about.

A deep dive into queues in Node.js

  • There are multiple callback queues, not a single one.
  • There is an order when each queue is running.
  • When the call stack is empty, the event loop picks up a callback from a callback queue and add it to the call stack.

News

Launching docs.github.com

Tooling.Report

  • A report that compares build tools.
  • There are a lot of tests on a variety of features. You can check your current tool or which tool has a specific feature.
  • Overall, Rollup has a slight advantage over Webpack, while Browserify and Parcel are behind.

New in Chrome: CSS Overview

  • New experimental feature in Chrome Developer Tools.
  • It contains a summary of the number of elements, external stylesheets, inline style elements, media queries, and selectors on the current page.
  • Each kind of data has its own section with more details.

Top comments (0)