Ketan Bhatt

Can your Code Review process be upgraded?

April 29, 2020 programming

Disclaimer: I am not talking about what code reviews are, and how to do them well. There are plenty of good resources for that, eg: link. I am writing about the process a team follows before their code comes for review. For a long time, I thought there was only one way how teams…

Notes: Thinking in Bets

April 18, 2020 self-improvement

I recently finished reading Thinking in Bets, by Annie Duke. The world is in a critical situation 🦠, and what decisions we make in our personal and professional lives right now could be vital in how the future pans out for us. I decided to pick this book up to see if I can…

Build Systems with Speed and Confidence by Closing the Loop First!

February 24, 2020 programming

I re-learnt something recently: the importance of closing the loop on a system you are trying to build, as quickly as possible, and then adding the juicy bits later (Thank you Kesha for helping me with the concept 😊). A completely finished “loop” is when you can provide the…

How do I structure my data? Lists? Dictionaries? List of Dictionaries?

January 25, 2020 programming

You have some data in your database. How should you structure this data when you send it to the frontend, let’s say, or want to work with it in your code? Should you convert the records to a list of dictionaries/hashmaps? Or should you just send them as a list of list? How do you…

Intercom's Interview Process and My Experience

January 01, 2020 programming

I interviewed at Intercom, Dublin, for a “Product Engineer” role in June - August, 2019. I will be starting my Intercom journey on December 2nd, 2019 :D While preparing, I got a lot of help from Glassdoor and I thought of adding my interview experience to the internet too, for…

Avoid breaking habits with help from Economics

May 29, 2019 self-improvement

Recently, while reading “How Will You Measure Your Life?”, I came across the concept of Marginal Thinking and I thought that it could be used as a mental model for motivating people who struggle with building new habits (like this guy I know, me). Aside: I highly recommend…

Why do we make irrational decisions?

January 15, 2019 self-improvement

We often get surprised by the decisions taken by those around us. “But how could you not see that this whole Bitcoin thing was a bubble?”, or “how can you pass on that job opportunity?”, or “did you not know that there are more parts that need to be built here, and so this…

On taking feedback well

December 10, 2018 self-improvement

A colleague and I were discussing how it is difficult to take critical feedback well. The conversation was textual and I ended up writing a lot of thoughts. In a bid to save my keystrokes from dying, I thought I will pen down my thoughts here so that I can share them with peeps…

Deep Work by Cal Newport

October 14, 2018 productivity

I have always been interested in how to do more meaningful work, and get better and better at what I do. This quest sees me read content which is sometimes technical in nature and sometimes talks about how to be a better leader [1, 2]. Sometimes I go a little meta and read about…

Don’t be the Alpha Geek: Your team deserves better

August 12, 2018 self-improvement

Alpha Geek? I recently came across the term “Alpha Geek” in “The Manager’s Path”. The Alpha geek is usually an excellent, effective engineer who is driven to always have the right answers, and solve hard problems. Alrighty! I want to be one! Where do I sign up? He knows exactly…

How I stopped being awful at managing: Leadership lessons from a Dev

May 06, 2018 management

At Squad, we have been following the concept of having small inter-disciplinary teams, which we call Solver Teams (the concept is beautifully explained by Spotify, we took a lot of inspiration from them). As fate would have it, I got to lead a team responsible for building the…

Configure Postgres statement_timeout from within Django

April 02, 2018 programming

“A close-up of white dials on a music mixer” by Alexey Ruban on Unsplash In a bid to prepare ourselves for projected growth, we are at the moment trying to figure out what part of our system will break at what scale, and how. One step towards this was to also define strict…

Custom Sentry Client for more freedom: How to ignore any exception you want

March 08, 2018 programming

We use Sentry for our error reporting, and we love it. It is simple, gives options for a lot of different use cases, and can easily be integrated with Django, over which our backend is built. We recently fixed (or ignored :P) an issue we had for a long time. This article is about…

Two years with Celery in Production: Bug Fix Edition

December 17, 2017 programming

Photo by Martin Oslic on Unsplash As mentioned in an earlier post, we rely on Celery for publishing and consuming tasks to/from our RabbitMQ (RMQ) broker. We are very happy with the whole setup and it works reliably for us. But this wasn’t exactly the case up until four weeks…

Leveraging AWS Lambda for Image Compression at scale

September 17, 2017 programming

A lot of problems we solve at Squad deal with images. Images to be tagged, labeled, moderated, transcribed etc. And there is this thing about images, they are generally heavier than text, digitally. And if our contractors (users of our app) spend more money on internet packs…

Why Squad: Second Innings

August 09, 2017 personal

No, I don’t think the world at large is interested in what I am doing with my life. But I needed to write this because this question will get asked often internally and because DRY. For the lazy, here is a tl;dr: I missed the team, and the hustle. Platform team was facing acute…

Vikas Gulati - The Platform behind Squad's Platform

July 27, 2017 personal

As I just get off Whatsapp after talking to VG, I couldn’t stop mentioning it to a friend that this guy is Gold. Platinum. Titanium (now, I am not that good with metals, all I mean is, he is the best). Before I lose this intense passion, I thought I will just document it. Let…

How we built an engineering culture of doing more with less

July 15, 2017 management

Designed by Freepik Sometimes when I tell my friends what we have built in a short span of time, I see there eyes going wide in disbelief. One candidate I was talking to about SquadRun thought we had 10–12 developers in the team, judging by what all we had built. But we are not a…

Blazingly fast querying on huge tables by avoiding joins

May 14, 2017 programming

Tl;dr: Avoid joins on large tables and evaluate parts of queries beforehand to get 100–10,000x performance gains! As mentioned in a previous post, because of some of our tables growing in size, our queries started performing poorly which resulted in a performance hit to our most…

Estimated counts for faster Django Admin change_list

April 19, 2017 programming

Short story of how we reduced the response time of some of our admin pages by 1000x. The Problem One of our tables grew to over 25 million rows. Which, while not a large number, makes the most frequent queries slow. A direct effect it had was on our Admin panel. The form for…

AI and News Flashes: The Observer Pattern

April 27, 2016 programming

The Observer Pattern: Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. Principles: Strive for loosely coupled designs between objects that interact. when will I need it? So there is a…

Preventing Rubber Ducks from Flying: The Strategy Pattern

April 26, 2016 programming

Master: So Grasshopper, should effort go into reuse above maintainability and extensibility? Student: Master, I believe that there is truth in this. Master: I can see that you still have much to learn. - Head First Design Patterns The Strategy Pattern: Define a family of…

Design Patterns Quick Reference: Index

April 25, 2016 programming

So I need to learn about Design Patterns, because we are starting to do some really complex things with our codebase at Squad. We are going to add new features, algorithms, a machine learning layer (that needs figuring out too) but more important than that, we are going to add a…

ElasticSearch, Django and Haystack

April 19, 2016 programming

TLDR; Use and live your life happily. Also always index in batches. Also, read the whole of it. A problem our Operations Team at Squad was facing was how slow the searches on the Admin panel used to work. It wasn’t surprising though. We had around 30 Million to 8 Hundred…

Building Habits, with a lot of help from Github

April 19, 2016 programming

I suck at habits. I start out a dozen different things every week, and I drop them as easily soon after. I needed to do something about it. I have used any.do (irritating), keep, inbox reminders, and many other lists. Nothing works for me. What? I thought I needed something to…

Stream Files to Amazon S3

April 20, 2015 programming

For any SaaS platform it is common to use a 3rd party hosting service for uploading files and serving them through a CDN. Amazon S3 is a common choice. Usually, the file upload from the client side (say, AngluarJS) is sent to the server (node server running on GNU/Linux box…

Git Your B'Day Caps Ready!

April 07, 2015 programming

Introduction posts can wait, but a ten-year anniversary only comes once in a decade. And what better way to kick off your blog than to wish Git a very Happy Birthday? (No, don’t even try suggesting better ways!). But why? Because, for one thing, Git is what has made this website…