Categories
Programming

Why I moved to Yarn for dependency management as soon as it was released

This article is spot on in terms of the reasons why I moved all our dependencies at Sparta to Yarn as soon as it was released:

Yarn addresses issues such as indeterminate dependencies, network issues/npmjs being down, and parallel downloads in order to provide more value over npm.

Source: https://circleci.com/blog/why-are-developers-moving-to-yarn

UPDATE:

NPM 5 brought a ton of improvements and they seem to have fixed a lot of things.

Categories
Programming

Proper Counter Cache Migrations in Rails

A lot of people are doing a lot of heavy lifting in their database migrations when deploying. That might work well for people when their data set is ~1 000 records, but when you are working with 500 000+ records, that’s just not feasible.

There’s a lot of bad advice in terms of counter_cache and Rails so I wanted to make sure this one got some extra visibility.

http://ryan.mcgeary.org/2016/02/05/proper-counter-cache-migrations-in-rails/