[How to] Reducing Heroku Slug Size

Once a slug size reaches 300 MB, Heroku will warn about larger slug sizes having the potential to cause longer boot times. The best practice is to keep slug sizes as small as possible for fast deploys and other operations. Warning: You slug size (400 MB) exceeds our soft limit…

Eager Load Rails classes during development

Rails 6 comes with Zeitwerk as the new default loader. For most users, when upgrading from the previous version of Rails, not much would change (except some inflections because of the way zeitwerk infers file names based on the constant). For people using Single-Table-Inheritance, Rails upgrade guide already provides a…

Mocking with Jest

Jest provides several different ways to mock out things. Here's an effort to list out the most useful ones in a short post. Manual Mocks The most basic kind of mocking is by providing a __mocks__ directory next to the module you want to mock and provide a mock implementation…

Best React Component Libraries

Material-UI vs Ant Design vs Fluent UI vs Semantic UI vs Grommet vs Blueprint vs Rebass Component Libs Material-UI (website)(github) One of the most popular React frameworks It is fully open source and maintenance is funded by corporate and community sponsors. Material Look based on Google’s Material design…

Multiple html pages with create-react-app app

create-react-app provides a great starting point to start a new react app fully configured with webpack, live reloading, etc. But, sadly, it doesn't provide a way to provide different index files with a different set of entry points. This might not be an issue for many since it is supposed…

Historical Live Data for Android

Let's begin with a quick glance from the docs for LiveData LiveData is an observable data holder class. Unlike a regular observable, LiveData is lifecycle-aware, meaning it respects the lifecycle of other app components, such as activities, fragments, or services. This awareness ensures LiveData only updates app component observers that…