Chatgpt Generate Ruby Code to Check User Exists in Github

On saturday night, I want to work on a side project. To find a name for the project and I wanted to create an Github organization in the same name. I started trying out the name one after the other, all the names were taken and thought about writing small script in ruby. Then from nowhere I decided to let chatgpt to write the code for me. In this blog post, I’ll share some of the code generated by chatgpt for the checking whether a profile name exists in the Github with increasing complexity. [Read More]

Python 3.11 micro-benchmark tracks Python module performance improvement against several modules across Python versions. In the real world, the module level speed improvements don’t directly translate to application performance improvements. The application is composed of several hundreds of dependencies the performance of one specific module doesn’t improve total application performance. Nonetheless, it can improve performance parts of the API or certain flows. When I first heard the faster CPython initiative, I was intrigued to find out, how does it translate to small application performance across various versions since a lot of critical components are already in C like Postgresql driver. [Read More]

Bazel Build System Introduction for Java

You can find the source code of tutorial in bazel-101 branch. What will you learn? Introduction to bazel build system How to build and run Java package? How to add maven dependency to bazel build files? How to add protobuf compiler to bazel build? Introduction Bazel is imperative build system that can build packages for Java, C++, Python, Ruby, Go, etc … The two main advantages of bazel, One build tool can build packages for variety of languages and easier for platform teams to build packages across variety of languages. [Read More]

Notes from Tail Latency Aware Caching Paper by RobinHood

The problem When the web service latency increases, the first suggested technique is to cache. The cache is a good solution when your system is a read heavy system. The common technique is to cache the frequently used objects. The method generally reduces the latency, but doesn’t help much for tail latency (p99). The paper “Tail Latency Aware caching - Dynamically Reallocating from cache rich to cache poor” proposes a novel solution for maintaining low request tail latency. [Read More]
paper  notes 

Dia Duit Dublin, Bye Bengaluru

Dia Duit Dublin, Bye Bengaluru TL;DR: After working for a decade and a year in Bengaluru, I decided to join Stripe in Dublin, Ireland as a software engineer. When I was in final year of college, I had to choose job location preferences over Chennai and Bengaluru. I choose Bengaluru for two reasons - startups and weather. After working a decade and a year in Bengaluru over seven companies, I decided to leave the startup scene, city, and the country. [Read More]

Rafting Raft Workshop

Last week, May 2-6, 2022, I attended Rafting Raft workshop by David Beazley. The workshop focussed on building a raft implementation and it was intense and exhausting. A few folks had asked me about the workshop and how it works. The post focuses on what happens before and during the workshop, so future attendees can decide. Day -43 Someday when you’re contemplating attending the workshop, you register on the website. You get a confirmation email from David Beazley to confirm your availability to attend the workshop. [Read More]

Profiling Django App

TL:DR Pyinstrument is a call stack sampling profiler with low overhead to find out time spent in your Django application. QueryCount is a simplistic ORM query count middleware that counts the number of ORM queries, finds duplicate queries, and prints them in the terminal. Django Silk is an extensive Django profiler that records the entire execution, SQL queries, source of origin, and persists the recordings. The complete Django profiler. 🔬 What’s Profiling? [Read More]

HTTPie and Print HTTP Request

HTTPie is a command-line utility for making HTTP requests with more straightforward syntax(controversial, I agree). The interesting feature is --offline flag which prints HTTP raw request text. The client sends the HTTP request to the server, and the server responds to the request. It’s an alternate to curl. HTTP Syntax HTTP Flow and syntrax from Wikipedia. A client sends request messages to the server, which consist of a request line, consisting of the case-sensitive request method, a space, the request target, another space, the protocol version, a carriage return, and a line feed (e. [Read More]
Python  HTTP  CLI  HTTPie 

Type Check Your Django Application

Recently, I gave a talk, Type Check your Django app at two conferences - Euro Python 2021 and PyCon India 2021. The talk was about adding Python gradual typing to Django using third-party package Django-stubs focussed heavily around Django Models. The blog post is the write-up of the talk. Here is the unofficial link recorded video of the PyCon India talk. Here is the link to PyCon India Slides. The slides to Euro Python Talk (both slides are similar). [Read More]

Pulse Plus

PhonePe recently released Pulse repo from their payment data. It was hard to get an overview of the data without doing some data transformation. The data is eight levels deep, nested, and multiple files for similar purpose data. Hard to do any command-line aggregate queries for data exploration. It’s hard to do any analysis with 2000+ files. So I created an SQLite database of the data using python sqlite-utils. The SQLite database aggregated data and top data in 5 tables - aggregated_user, aggregated_user_device, aggregated_transaction, top_user, top_transaction. [Read More]