Nitish Gupta

I code, game and I'm always up for challenges or learning....  
Read more

What Nitish's working on

What Nitish's working on


Aug 11, 2021
Aug 11, 2021
Used Arch BTW

Migrating from Debian to Arch

Messed up the installation process thrice but finally got it set up. 
I've learnt more about Linux while installing this distro than I have in my last 4 years of usage!
It's honestly insane how much hands on learning teaches you. I never thought I'd end up learning about mounts, partitions, daemons, grub, package management, manually fixing underlying issues, understanding how systemd controls the services under the hood. Writing my own startup services, customising login manager to i3wm fonts. After going through hours of content on the Arch wiki I think I still don't know enough.
Aug 01, 2021
Aug 01, 2021
Started a new role at BLKBOX
Excited to join BLKBOX as Software Developer! 🎉
Software Developer, BLKBOX
Jul 23, 2021
Jul 23, 2021
Worked on a side project
Wrote shell script
A very fun problem I ran into while starting my docker containers. 

How does someone execute a second command after running a first command that hasn't completed or maybe it is a never exiting process like running a server?

&& is the typical solution that comes in mind but scripts don't work that way and they rely on return values from previous commands. 
& is something that can be very useful because it runs commands in the background. 
I was stuck because I couldn't just exit the script ad it would kill the container. 
So after hours of searching ways to trigger the functionality I finally had a big brain moment and here's the magic code that did the job. 
Jul 22, 2021
Jul 22, 2021
Worked on a side project
Configured server

Configuring NGINX and Gunicorn servers

Understanding servers in detail has always been on my todos. Finally I had a chance to work on NGINX server. The use case I had was to serve the production build of a React app inside a docker container. On top of this, the backend for the app had to be served using a Gunicorn server which was a fairly easy task compared to static serving. 

The following tasks were achieved in the process 
  • I realised using whitenoise and NGINX on the same Django project makes no sense and "It's equal to saying I'll use 2 knifes to cut the butter". They both do the same task each with different pros and cons. 
  • Learnt how to setup a reverse proxy to an upstream server with load balancing provided by NGINX. 
  • Develop a deeper understanding of how the requests are routed through the block model for NGINX config files work. 
  • Tweak and explore working of different location block patterns to serve endpoint responses for different services based on their URI. 

Jul 20, 2021
Jul 20, 2021
Worked on a side project
Used Docker-Compose
  • Worked on developing standard CD pipelines for the side project MUSE
  • Wrote Dockerfile and integrate containers through docker-compose

The project involves different components communicating with each other so establishing a network between each one of them by writing shell scripts and property initialising environments was challenging.
Jul 19, 2021
Jul 19, 2021
Worked on a side project
Migrated database

Data Migrations

MUSE had a terrible database schema from it's inception.

I say this because
  • There was no relational mapping between the objects
  • No foreign keys or cascading was used when entries were removed
  • The entries for songs were "HARDCODED" as comma-separated string IDs so if a song entry was deleted then it would cause unforseen exceptions on fetching other data which was related to the ID
  • There was no data redundancy measure, so every new request would just dump the songs in the db without checking if it already existed or not.

All of these issues were covered by writing altering the schema by writing migrations for models to develop a new schema that xovered all the issues mentioned above.
During the testing of the app almost 8000 songs and their corresponding lyrics were fetched and scraped so dropping all that was never an option. So I decided to write data migrations to get rid of redundant data and save data based on the new schema.

Setting up the CD pipelines

During the CD setup for production all the data from local development using SQLite had to be ported to PostgreSQL running inside a container which was achieved by dumping and loading data using Django management tools. 
Get your own page like this