Varun Barad

This website is going under a redesign slowly



🐳 Starting docker on demand
How to avoid not having docker running when you run docker or docker-compose commands

📝 PostgreSQL: Mark a column non-nullable after creating it
TIL: How to add a not null constraint to an existing column in a PostgreSQL table

📝 PostgreSQL: Make a column unique after creating it
TIL: How to add unique constraint to an existing column in a PostgreSQL table

⚖️ Wracker Dev Log #003
Adding a graph and moving away from django

⌨️ Paragraph performance summaries
I added a chart to show your progress over time

📝 Avoid .DS_Store files on removable media
TIL: Settings change on Mac to avoid having .DS_Store files being created on USB and Network shares

📝 Recursively remove .DS_Store files
TIL: Shell command to recursively remove .DS_Store files

⌨️ Showing historical statistics
I added a chart to show your progress over time

🎬 Movie rating system
A simple heuristic to rate movies based on their viewability and enjoyment

⚖️ Wracker Dev Log #002
My experience making a usable form and working with HTML <table> for the first time

📝 Custom 404 in Express
TIL: How to return custom response for a 404 in Express on NodeJS

⌨️ Typractice
A simple website to practice your typing

📝 Using emoji as a favicon
TIL: How to write a simple SVG which renders an emoji as a favicon

⚖️ Wracker Dev Log #001
How I headbutted with Django setup the whole day for it to finally click around midnight

📝 Save dependency list of your python project to a file
TIL: How to do for python what we get with `dependencies` in npm `package.json`

Group posts by year in Jekyll using Liquid
You can use the `group_by_exp` filter in Liquid to group posts by year

📝 Map an array of ids in postgres to matching data from another table
TIL: How to map an array in postgres to other data

📝 Counting days between 2 dates in PostgreSQL
TIL: You can use the extract function to find difference in days between 2 dates

📝 Find the first entry in each group
TIL: How to get the first entry from each group given a sort order

📝 Navigate to a path in Mac Finder
TIL: How to navigate to a given system path without clicking through folders

Contacts Calendar
A website which lets you export a calendar of important dates from your Google Contacts

Cheatsheet - ffmpeg
A cheat-sheet for ffmpeg

📝 Most used commands
TIL: How to view your most used terminal commands on a Mac

📝 wget with custom filename
TIL: How to download a file with wget to a custom filename

📝 Taking a heap-dump from a running JVM process
TIL: How to take heap-dump from a running JVM process


📝 Figma styles not present in the API response
TIL: Why Figma returns empty styles in API and how to fix it

Office Pranks
A list of simple and safe pranks you can pull on your colleagues.

📝 Authentication with wget
TIL: How to provide username and password for simple authentication when downloading files using wget

📝 How to make non-capturing groups in RegEx
TIL: What are non-capturing groups and how we can use them

Useful fonts
A list of useful fonts which can be used.

📝 India's national aquatic animal
TIL: India has a species of dolphin as its national aquatic animal.

Safe alphanumeric password base
Collection of readable characters to make alphanumeric passwords out of


Improvement Roll
A tiny website to suggest you useful things to do in down-time

📝 List files updated in a git commit
TIL: How to see a list of files updated in a git commit

📝 Centering elements with CSS
TIL: How to center (horizontally and vertically) elements with CSS.

Cheatsheet - ImageMagick
A cheat-sheet for ImageMagick

📝 Resizing images from command-line
TIL: Resizing images from command-line while centering them and adding a transparent background.

Cheatsheet - YouTube-DL
A cheat-sheet for YouTube-DL CLI

📝 Comparing two BigDecimal instances
TIL: Turns out that 7.5.toBigDecimal() and 7.50.toBigDecimal() are not equal

Windows Symlink
How to create a Linux-like symlink on Windows

500 Million, But Not a Single One More
My first attempt at recording a voice-over of an awesome article

📝 Castle Under Threat
TIL: You cannot castle your king in chess if king's path is under threat

📝 Ugh fields
TIL: What are "ugh fields" and why everyone should atleast know about them.

📝 Opening current terminal command in $EDITOR
TIL: Ctrl+X followed by Ctrl+E opens the command you are currently editing in your $EDITOR program

Cheatsheet - PostgreSQL
A cheat-sheet for PostgreSQL database

Tips when building a PC
A friend asked me what to look out for when building a PC and this is the list

📝 Google gives refresh token only once
TIL: Google doesn't return refresh token on subsequent authentication after the first one.

📝 JavaScript can "throw" the table
TIL: JavaScript can throw anything

📝 CSS support for browser dark-mode preference
TIL: How to support dark-mode preference of browser via CSS

Why you should own your email address?
My write-up on reasons why it is better for you to own your email address.

Challenge Update: Two and a Quarter Books
Update on my 2020 year-end reading challenge

2020: Year in review
A review of the year 2020 for me


Java convert LocalDateTime to Instant using ZoneId
How to convert from LocalDateTime to Instant using ZoneId without ZoneOffset in Java 8 Time APIs

Cheatsheet - Git
A cheat-sheet for git CLI

Challenge Update: The Adventures of Sherlock Holmes
Update on my 2020 year-end reading challenge

Achievement Unlocked: Finished my first exercise challenge
I have taken on many exercise challenges in the past but this is the first time I finished one.

Challenge Update: Around the World in 80 Days
Update on my 2020 year-end reading challenge

Postel's Law
A good yardstick to increase developer sanity

2020 End of Year Reading Challenge
I went to a nearby bookstore this week and now taking on a reading challenge

Check if your request body is compressed
Make sure to know what is the default request body compression setting in your http library is

Techniques to Improve Focus
How to build your focus muscle when it has atrophied over the years

Interesting Stuff - Week 4
My weekly newsletter of things I found interesting

Interesting Stuff - Week 3
My weekly newsletter of things I found interesting

Interesting Stuff - Week 2
My weekly newsletter of things I found interesting

Interesting Stuff - Week 1
My weekly newsletter of things I found interesting

Prevent back navigation to login screen
The guide to correct way of preventing back navigation to login screens once user is logged-in

Foie Gras
Summary of what I know about Foie Gras, whose literal translation from French is Fatty Liver

Immigration Dead Man's Switch
How to protect your data and yourself while passing through customs/immigration check

Keep Android screen on When USB is connected
Use the command `adb shell svc power stayon usb`

Write Custom Android Lint Rule - Manifest File
Writing our own custom android lint rules for verifying AndroidManifest file.

Write Custom Android Lint Rule - Layout Files
Writing our own custom android lint rules for verifying layout files.

Dart Extension Methods
An overview of extension methods in Dart and how they can be useful

P vs NP Algorithm Problem Types
I finally wrapped my head around the differences between P vs NP vs NP-Complete problems


Record Linux terminal session
How to record your linux terminal session to work on later.

Sync git fork with upstream
This is a simple guide on how to sync your fork of a git/github project with upstream changes.

How to add "latest" post redirect to Jekyll site
I wanted to add a URL to my site which will always redirect the visitor to the latest blog post I have published at that time.

JavaScript 30 - Array Cardio 1
Day 4 of JS30 challenge, today we worked with various methods on array and I learned one nifty trick of displaying them in console.

JavaScript 30 - CSS Variables
Day 3 of JS30 challenge where I built an analog clock with CSS and animate its changes using JS and CSS.

JavaScript 30 - CSS Analog Clock
Day 2 of JS30 challenge where I built an analog clock with CSS and animate its changes using JS and CSS.

JavaScript 30 - Building a Drum Kit
I started the JavaScript30 challenge from Wes Bos today and learnt how to build a simple drum-kit.

Switching RxJava schedulers between app code and corresponding tests
A simple way to switch between using appropriate schedulers in app code and using trampoline schedulers for tests.

Make git forget a tracked file
What to do when you are tracking a file with git but then want to remove it from VCS while keeping it in your file system.

Testing Deep-Link URLs using ADB
Simple adb command to help you fire deep-link url in mobile from your console.

HTTP Network Requests on Android Pie
Android Pie only allows HTTPS traffic by default & blocks all HTTP requests. You can enable HTTP communication for your API endpoints once you have configured this little thing.

Don't worry about specializing yet!
What technologies should I be learning, so that they prove helpful in my career?

Show/Hide Layout Bounds in Android
A couple of scripts that help to toggle display of layout-bounds on connected Android device using ADB.

Creating a single-file backup of your git repository
I created a python script which creates a zip-file containing the git-bundle and all the patch-files for different stashed changes in your repository.


How Breathing Works
Ever wondered how our breathing is regulated? Let me take you on a ride down the wind-pipe.

APGAR score
A quick method used to check whether a newborn needs immediate medical care.

How anesthetics work
A post on the different categories of anesthetics and their working mechanisms and differences.

Critical mistakes to avoid in Android development
Charlie Munger has said that avoiding to be stupid is more beneficial when compared to trying to be intelligent. So, let's take a look at some mistakes that we can avoid while walking the path of Android development.

Simplifying User-Experience for rating your Android app
Make it easy for your users to rate your Android app.

Check network connectivity on Android in 10 lines
Let's see how simple it is to show correct feedback to user on whether they are connected to the network or not in Android.

Hiding API keys from your Android repository
Learn how to secure your API keys while keeping the source code for that Android app open-source.


How to Stop Worrying and Start Living
Here are some things I found noteworthy in the book "How to Stop Worrying and Start Living" by Dale Carnegie.