RSSAmplifier

Blog

Sapan Diwakar

Notes on software engineering by Sapan Diwakar — Elixir, Rails, mobile development, and the occasional adventure.

sapandiwakar.inRSS feed ↗132 posts

Latest posts

Absinthe for Large Elixir Applications

Patterns for structuring and scaling Absinthe in large Elixir applications.

An Introduction to Absinthe

An introduction to building GraphQL APIs in Elixir with Absinthe.

Under the Hood of Ecto

Ecto is a toolkit for mapping database objects to Elixir structs and provides a unified interface to manipulate that data.

Scaling Ruby on Rails Applications

Strategies for scaling Ruby on Rails applications to larger workloads.

Get Started with Hotwire in Your Ruby on Rails App

How to add Hotwire interactivity to a Ruby on Rails application.

A Guide to Event-Driven Architecture in Elixir

A guide to designing responsive, decoupled event-driven systems in Elixir.

Delayed Job vs. Sidekiq: Which Is Better?

A comparison of Delayed Job and Sidekiq for Ruby background processing.

Authorization and Policy Scopes with Elixir/Phoenix

A pattern for authorization and policy scopes in Phoenix contexts and Ecto schemas.

STOMP over a WebSocket client in Elixir

How to implement a STOMP-over-WebSocket client in Elixir.

Connecting your Infrastructure with Wireguard VPN

How to connect infrastructure securely with a WireGuard VPN.

Interfacing Elixir with Other Languages

How to call Ruby and Python processes from Elixir with ExPort.

Dynamic Retry Configuration for ActiveJob on Rails (Sidekiq/Delayed Job/Resque)

How to configure ActiveJob retries dynamically across Rails job backends.

Rails like console for Node JS (and Node TS)

How to build a Rails-like interactive console for Node.js and TypeScript.

Runtime validation with react-hook-form

How to add runtime validation to React Hook Form fields.

Set up a WebSocket Server on Android with GraphQL-WS Protocol

How to run a GraphQL-WS WebSocket server on Android.

[How to] Reduce Heroku Slug Size

Practical ways to reduce a Heroku slug’s size and improve deployment performance.

Eager Load Rails classes during development

How to eager-load Rails classes during development with Zeitwerk.

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.

Best React Component Libraries

A comparison of popular React component libraries for product interfaces.

Multiple html pages with create-react-app app

How to configure multiple HTML entry points in a Create React App project.

Historical Live Data for Android

How to retain and restore historical LiveData values in an Android app.

Garden

A personal remembrance of gardening with the author’s grandmother.

Something about Nature

A personal reflection on the sensory appeal of nature.

Accessing ViewModel inside Views on Android

How to access Android ViewModel state from custom views.

Life of Hari

A reflective short story addressed to Hari at the beginning of his life.

A Tale of Two Sisters

A short story about twin sisters Ava and Emma facing a dangerous secret.

A review of mobile development frameworks

A comparison of React Native, Flutter, and Kotlin for mobile development.

Custom WebSocket implementation with ActionCable on Electron/Node

A custom ActionCable WebSocket client for Electron and Node with MessagePack compression.

Custom WebSocket extension for Rails ActionCable

How to add a custom WebSocket compression extension to Rails ActionCable.

Compressing WebSocket/ActionCable frames on Rails with permessage-deflate

How to compress Rails ActionCable WebSocket frames with permessage-deflate.

Stimulus: A modest JS framework

An introduction to Stimulus for adding focused JavaScript behavior to Rails views.

Adding static methods to existing modules using Declaration Merging in TypeScript

How TypeScript declaration merging adds static methods to existing modules.

Unknown is coming to TypeScript 3.0

An introduction to TypeScript 3.0’s safer unknown type.

Displaying an encoded Polyline on Google Maps

How to decode and display an encoded polyline on Google Maps.

Update Localization on Android at Runtime

How to update an Android app’s locale at runtime.

Audio Processing on Android using TarsosDSP

An introduction to audio processing on Android with TarsosDSP.

Fast track Android app deployments with fastlane

How to automate Android builds and Google Play releases with Fastlane.

Fast track iOS app deployments with fastlane

How to automate iOS builds, signing, and App Store releases with Fastlane.

Prague

A travelogue about a long Easter weekend exploring Prague.

Handling Local Music Playlists

How to store and manage local music playlists with Realm on Android.

Creating a global toolbar (mini music player) on Android

How to add a persistent mini-player toolbar to an Android app.

Creating a Music Player UI on Android

How to build an Android music-player interface.

Android Music Player Controls on Lock Screen and Notifications

How to show Android media controls on the lock screen and in notifications.

Playing music in the background on Android

How to keep Android audio playback running with a Service and MediaPlayer.

Media Player basics for Android

An introduction to Android MediaPlayer setup and basic playback.

Building a Music Player App for Android

An Android music-player tutorial covering project setup and playback.

Why I use Kotlin for Android

Kotlin is a statically typed language developed by JetBrains that targets the JVM.

Refresh OAuth access token with Retrofit, RxJava

How to refresh OAuth access tokens after 401 responses with Retrofit and RxJava.

Refresh OAuth tokens using Moya, RxSwift

How to refresh OAuth tokens after 401 responses with Moya and RxSwift.

Realm for Android

Realm is a mobile database: a replacement for SQLite & Core Data that works for both iOS and Android.