Inverted Tree

Software engineering, systems, programming, architecture, developer tooling.

Using django channels to build real time applications

Table of Contents Introduction Main Concepts asgi Websockets Channel Implementation Chat Testing Final Thoughts This tutorial is for django developers who are comfortable with the primitives and want to build real time applications using django + channels. We’ll be building a minimal intercom clone(backend only) to simulate chat support provided to client websites who embed our widget for website visitors as illustrated Introduction Real time systems differ from traditional systems by the constraint of response time - typically they need to respond to changes in state immediately or within a guaranteed time frame, often dictated by the system’s operation requirements. Unlike traditional request-response systems, real time systems prioritise timely and predictable execution, often at the expense of throughput or flexibility. For ex in a ticket booking website like Ticketmaster, the typical request-response flow comprises of fetching all the available tickets for the user’s search criteria, booking them etc, all of which can tolerate brief delays. Contrast it with a real time system like a trading app where trades have to be executed immediately as soon as a request is made and execution time is a governing factor in the quality and success of this service. ...

April 15, 2025 · 13 min · Navdeep Saini

Lessons from late founding a tech debt ridden online startup

Note: This post was not reviewed/edited/written by any LLM/“AI”. Prelude Prior to joining Widgetic I was a Java/Android developer turned Node.js / backend developer, had worked at a Swiss cryptocurrency startup as a backend/desktop developer, and had built more than a few MVPs in the years prior(mobile apps, electron apps etc but not a full stack application). At this point I was relatively inexperienced with web technologies and wanted to work at a product company to understand how these skills/eager learning attitude translated into the real world, especially in the challenging world of business/startups. I coveted more learning and responsibility, so when an opportunity came along to work at Widgetic, I was more than happy jump on it! ...

April 7, 2025 · 16 min · Navdeep Saini

An adequate neovim config

tl;dr: Neovim has come a long way from an experimental vim fork that it was at inception and is veritably, in my opinion, the hotbed for open source editor innovation currently. However customising it can feel daunting especially since things are changing rapidly. Having lived through vi vs emacs I was a full on emacs person jumping through my ocaml code with the venerable tuareg mode which is loved and maintained to this day. At that time, vim support for ocaml didn’t exist, thus emacs came out on top for me. ...

February 12, 2025 · 4 min · Navdeep Saini

Resolve merge conflicts like a pro with neovim

(screenshot taken from diffview.nvim repository) Over the years, I’ve gone through so many merge tools - kdiff3, meld, beyond compare, Kaleidoscope. Nvim being my editor of choice, fortunately, has a rich ecosystem of plugins where I can set up an uber merge workflow using diffview.nvim and avoid using external tools altogether. Getting started Make sure you have the latest nvim installed (I have v0.10.4). Although I use lazyvim as the base to provide the basic (and some advanced) editor features, I have to set recourse to diffview.nvim to ease my merging process. ...

February 9, 2025 · 2 min · Navdeep Saini

Learning haskell and yaml by building a yaml parser

I’ve been learning haskell for some time now and it has been amazing grappling with pure functional programming concepts. Although it’s not for everyone, I believe its potential is too much in terms purity. The best way for me to learn anything is to just build something and i’m quite infatuated with yaml right now, so I suppose i’ll build a very basic yaml parser to learn about parsing concepts and how haskell helps with its functional prowess. Since the markup language has just data and no instructions, it’s suited for a recursive data definition which Haskell excels in, among other things. ...

October 7, 2024 · 5 min · Navdeep Saini

Command line tools for the productive web developer

In my previous post, I discussed some general purpose command line utilities that help ease your way around the command line. In this post we’ll discuss some command line utilities that are indispensable to my web development workflow, and might come in handy for you too :) pgcli/mycli All web apps depend on a database of some kind. Thus, communicating with a database is one of the most common tasks a web developer has to perform. Although MySQL and PostgreSQL come bundled with their own CLI tools, there are options like pgcli/mycli which provide more powerful interfaces to the same databases, with features like auto completion, command history, syntax highlighting and many more. ...

December 29, 2022 · 2 min · Navdeep Saini

Speeding up my zsh prompt: Part 2

In the previous post I profiled my zsh load to debug the monumental shell load time which is really annoying for me, since I spend all my time in the shell. I think I’m gonna get rid of compinit totally and look at the profiling data. Let’s dive in # autoload -Uz compinit # if [[ -n ${HOME}/.zcompdump(#qN.mh+24) ]]; then # compinit; # else # compinit -C; # fi; Launching the profiler now, the results are- ...

September 26, 2022 · 2 min · Navdeep Saini

Speeding up my zsh prompt - part 1

I’m a big fan of the z shell. I use it with the spaceship prompt and zplug for plugin management. Right now, it takes an uncomfortable amount of time to load up the prompt on terminal emulator launch, which is annoying for me since I like everything to be snappy, at least on the command line. Overview of my zshrc It’s pretty basic, boasts of a zplug installation for plugin management and some attendant plugins. ...

September 19, 2022 · 6 min · Navdeep Saini

Command line tools to make your life easier

If you’re like me, you spend most of your time in the command line, where saving even a few keystrokes can help you become significantly more productive (and happier :). Here are some tools that I’ve found to be incredibly helpful and have augmented my love for the command line through their sheer awesomeness Bat Bat is a successor to the unix cat command that boasts many superpowers, like preview with a pager, syntax highlighting, and even git changes. It supports most of the programming languages out of the box. You could just alias cat to point to bat. ...

March 5, 2019 · 4 min · Navdeep Saini