RSSAmplifier

Blog

Technical Ramblings

Recent content on Technical Ramblings

kracekumar.comRSS feed ↗142 posts

Latest posts

Sqlean Stubs

sqlean is a drop-in replacement for SQLite that adds many useful extensions to the SQLite core. The Python package has no type information. LiteCLI uses sqlean when available, if missing, falls back to SQLite. LiteCLI now supports type information for sqlean via sqlean-stubs . 
 How to use sqlean-stubs? 
 
 
 Install sqlean-stubs using uv: 
 uv add sqlean-stubs sqlean.py
 #…

Migrating Litecli From Mypy to Ty

I recently migrated litecli , a Python command-line interface for SQLite databases, from mypy to ty . Here’s what I learned during the process. 
 About the Project 
 
 Litecli is a relatively small codebase with approximately 7,000 lines of Python code. It already had type hints and was type-checked with mypy before the migration. 
 What is ty? Ty is an extremely fast Python…

Setup Mistral vibe in Zed using ACP

Mistral released a new CLI tool vibe to perform coding tasks in the terminal and code editors that support the ACP protocol . 
 Mistral Vibe is a command-line coding assistant powered by Mistral's models. It provides a conversational interface to your codebase, allowing you to use natural language to explore, modify, and interact with your projects through a powerful set of tools.
 You can…

Books

Books I read, writings on literature, and links to my reviews(not exhaustive) starting from 2025. 
 Apr, 2025 
 
 The Trouble With Being Born 
 Samuel Beckett 
 
 Mar, 2025 
 
 In the Margins: On the Pleasures of Reading and Writing , Review 
 Martyr! 
 
 Feb, 2025 
 
 Chronicle of an Hour and a Half , Review 
 
 Jan, 2025 
 
…

News

These are some of the blog posts and links I enjoyed reading in the reverse chronological order
 2025-07 
 
 Does Cursor make developers less effective? by The Pragmatic Engineer 
 Amazon, Google and Vibe Coding with Steve Yegge podcast by Pragmatic Engineer 
 The 10x “overemployed” engineer by Pragmatic Engineer 
 I want to leave tech: what do I do? 
 ‘It’s too late’:…

TIL: SQLean

I was working on LiteCLI to support the fileio extension .
These extensions are not part of the Python SQLite3 standard library. 
 While researching, I came across Sqlean .
This project serves as a drop-in replacement for the SQLite3 library and includes several SQLite extensions. 
 Supported Extensions 
 When Sqlean is installed, it provides several built-in extensions out of…

TIL: Running SQLite Queries from Python Command Line


 Python provides a simple interface to run SQLite queries from the command line. The syntax is straightforward: python3 -m sqlite3 database query 
Here’s an example using a GitHub database with the table repos and a query to return five rows: 
 $python3 -m sqlite3 ../../Downloads/github.db 'select name, html_url from repos limit 5' 
 ( 'dotfiles' ,…

Notes: AI Copilot Code Quality

GitClear published AI Copilot Code Quality 
and discovered it via The PrimeTime YouTube channel. 
 The paper focuses on the less discussed topic of software maintainability,
in contrast to the more frequently discussed discourse on the internet: boosting developer productivity. 
 Abstract 
 
 The data in this report contains multiple signs of eroding code quality.…

ChatGPT Shambles for Gary Marcus Prompt

Gary Marcus recently wrote an article titled ChatGPT in Shambles .
The prompt instructed chatgpt to produce a tabular table of median house hold income across U.S. states . 
 Make a table of every state in U.S., including population, area, median house hold income, sorted in order of median household income.
 
The output contained only twenty states and interrupted. The final row…

Notes on Four Blog Posts on How I use LLM

Over the past few weeks, several top software engineers have published blog posts about how they use AI. Here are a few of the posts I came across in various forums: 
 
 Why I use Cline for AI Engineering by Addy Osmani 
 How I use AI by Nicholas Carlini 
 How I Use AI: Meet My Promptly Hired Model Intern by Armin Ronacher 
 Building personal software with Claude by Nelson…

DeepSeek R1 Aider Benchmark

DeepSeek recently released its R1 model , a state-of-the-art LLM that outperforms all available reasoning models on the market.
The accompanying paper includes a comprehensive comparison across 21 benchmarks in four categories:
 English, Code, Math, and Chinese . 
 
 As a software engineer, I was particularly curious about the Code category and
decided to explore the datasets…

ndjson


 curl http : // localhost : 11434 / api / generate - d '{ 
 'model' : 'llama3.2' , 
 'prompt' : 'Where is Dublin? Answer in a six words' 
 } ' 
 { 'model' : 'llama3.2' , 'created_at' : '2025-01-14T17:48:33.15898Z' , 'response' : 'Located' , 'done' : false } 
 { 'model' : 'llama3.2' , 'created_at' : '2025-01-14T17:48:33.183229Z' , 'response' : ' on' , 'done' : false } 
…

Subtitle Generator Using Whisper

I want to generate the subtitles for the Normal People TV series in my laptop using LLM. After searching a bit, whisper from OpenAI was a proper fit. 
 Step 1: Extracting Audio from Video 
 The first step is to extract the audio from the video file using ffmpeg and store it separately. 
 ffmpeg - i / Users / kracekumar / Movies / TV / Normal . People . S01 / Normal . People . S01E01 .…

Open-webui in personal laptop

In 2024, Large Language Models (LLMs) and Generative AI(GenAI) exploded at an unimaginable rate. I didn’t follow the trend. Currently, there is a news every day on new models. Also, the explosion of models reached a stage where local MacBooks can run a decent enough model. I want to have local model with a decent UI support through web or terminal that provides clean user interface. 
 I…

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…

Python 3.11 micro-benchmark

speed.python.org 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…

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++,…

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…

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…

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…

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,…

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…

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…

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…

TIL - A new site

Quite often, as a programmer, I learn something new. Some are utilitarian; some are philosophical; some are opinions in programming. I want to document these learnings for later use and also to remember. So I’m starting a new site, til.kracekumar.com , to demonstrate this learning. So far, there are six posts . 
 The inspiration comes from Simon Willson’s TIL website . 
 
…

Python Typing Koans

Python 3 introduced type annotation syntax. PEP 484 introduced a provisional module to provide these standard definitions and tools, along with some conventions for situations where annotations are not available. 
 Python is a dynamic language and follows gradual typing. When a static type checker runs a python code, the type checker considers code without type hints as Any . 
 def…

Model Field - Django ORM Working - Part 2

The last post covered the structure of Django Model . This post covers how the model field works, what are the some important methods and functionality and properties of the field. 
 Object-Relational Mapper is a technique of declaring, querying the database tables using Object relationship in the programming language. Here is a sample model declaration in Django. 
 
 class Question (…

Structure - Django ORM Working - Part 1

Django ORM hides a lot of complexity while developing the web application. The data model declaration and querying pattern are simplified, whereas it’s structured differently behind the scenes. The series of blog posts will explain Django ORM working(not just converting Python code to SQL), model declaration, querying (manager, queryset), supporting multiple drivers, writing custom queries,…

jut - render jupyter notebook in the terminal

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. The definition copied from the official website . 
 It’s becoming common…

Five reasons to use Py.test

Pytest library provides a better way to write tests, run the tests, and report the test results. This post is a comparison between the Python unit test standard library and pytest features and leaves out other libraries like nose2. 
 TL;DR 
 
 Single assert statement( assert a == b ) over 40 different assert methods( self.assertEqual, self.assertIsInstance, self.assertDictEqual ) 
…

Build Plugins with Pluggy

Introduction 
 The blog post is a write up of my two talks from PyGotham and PyCon India titled, Build Plugins with Pluggy. The write-up covers a trivial use-case, discusses why a plugin-based architecture is a good fit, what is plugin-based architecture, how to develop plugin-based architecture using pluggy, and how pluggy works. 
 Link to PyCon India 2020 Talk 
 
 Trivial Use…

Render local images in datasette using datasette-render-local-images

Datasette python library lets publishing a dataset as a SQLite database and
inspects them using a web browser. The database can store text, numbers, arrays,
images, binary data, and all possible formats. datasette-render-images
lets you save the image in the database and render the image using data-uris . 
 Sometimes, while publishing the dataset, you may want to store the images…

Tamil 1k Tweets For Binary Sentiment Analysis

To find a labeled data for Tamil NLP task is a difficult task. Some papers talk about Tamil Neural Translation, but the article doesn’t release code. If you’re working part-time or possess an interest in Tamil NLP, you have a tough time finding data. 
 When I was looking for labeled data for simple sentiment analysis, I couldn’t find any. It’s understandable because…

About

I’m Kracekumar, Software Engineer based out of Dublin. Currently, I work at Stripe building Local Payment Methods in Europe. 
 I have deep expertise in backend technologies and proven tracken record of tech leadership.
In the past, I have spoken in various technical conferences like PyCon India, Euro Python, PyGotham, etc… 
 I was the organizer of Bangalore Python User…

Parameterize Python Tests

Introduction 
 A single test case follows a pattern. Setup the data, invoke the function or method with the arguments and assert the return data or the state changes. A function will have a minimum of one or more test cases for various success and failure cases. 
 Here is an example implementation of wc command for a single file that returns number of words, lines, and characters for an…

Incomplete data is useless - COVID-19 India data

The data is a representation of reality. When a value is missing in the piece of data, it makes it less useful and reliable. Every day, articles, a news report about COVID-19 discuss the new cases, recovered cases, and deceased cases. This information gives you a sense of hope or reality or confusion. 
 Regarding COVID-19, everyone believes or accepts specific details as fact like mortality…

“Don’t touch your face” - Neural Network will warn you

A few days back, Keras creator, Francois Chollet tweeted 
 
 A Keras/TF.js challenge: make a model that processes a webcam feed and detects when someone touches their face (triggering a loud beep).“ The very next day, I tried the Keras yolov3 model available in the Github. It was trained on the coco80 dataset and could detect person but not the face touch. 
 
 
 V1 Training…

1000 more whitelist sites in Kashmir, yet no Internet

Kashmir is under lockdown for more than 
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
 200,200,200,200,200,200,200,200,200,200,
…

Capture all browser HTTP[s] calls to load a web page

How does one find out what network calls, browser requests to load web pages? 
 The simple method - download the HTML page, parse the page, find out all the network calls using web parsers like beautifulsoup. 
 The shortcoming in the method, what about the network calls made by your browser before requesting the web page? For example, firefox makes a call to ocsp.digicert.com to obtain…

153 sites allowed in Kashmir but no internet

Kashmir is locked down without the internet for more than 167 days as of 19th Jan 2020 since 5th Aug 2019. The wire recently published an article wherein the Government of India whitelisted 153 websites access in Kashmir. Below is the list extracted from the document 
 
 . The internet shutdown is becoming common in recent days during protests. 
 Anyone with little knowledge to create…

How long do Python Postgres tools take to load data?

Data is crucial for all applications. While fetching a significant amount of data from database multiple times, faster data load times improve performance. 
 The post considers tools like SQLAlchemy statement, SQLAlchemy ORM, Pscopg2, psql for measuring latency. And to measure the python tool timing, jupyter notebook’s timeit is used. Psql is for the lowest time taken reference. 
 Table…

Debugging Python multiprocessing program with strace

Debugging is a time consuming and brain draining process. It’s essential part of learning and writing maintainable code. Every person has their way of debugging, approaches and tools. Sometimes you can view the traceback, pull the code from memory, and find a quick fix. Some other times, you opt different tricks like the print statement, debugger, and rubber duck method. 
 Debugging…

Notes from Root Conf Day 2 - 2017

On day 2, I spent a considerable amount of time networking and attend only four sessions. 
 Spotswap: running production APIs on Spot instance 
 
 Amazon EC2 spot instances are cheaper than on-demand server costs. Spot instances run when the bid price is greater than market/spot instance price. 
 Mapbox API server uses spot instances which are part of auto-scaling server 
 Auto…

Notes from Root Conf Day 1 - 2017

Root Conf is a conference on DevOps and Cloud Infrastructure. 2017 edition’s theme is service reliability. Following is my notes from Day 1. 
 
 
 State of the open source monitoring landscape 
 
 The speaker of the session is the co-founder of Icinga monitoring system. I missed first ten minutes of the talk.-The talk is a comparison of all available OSS options for monitoring,…

Book Review: The Culture Map

The Culture Map: Breaking Through the Invisible Boundaries of Global Business is a book on cultural differences in communication by Erin Meyer. 
 Last year, I spent three months in NYC. Whenever I entered food outlet or made an eye contact, all the conversation started with “How are you doing?”. I replied, “I’m good and how are you doing?”. Most of the times, I didn’t receive a response. It…

Book Review: Software Architecture with Python

The book Software Architecture with Python is by Anand B Pillai . The book explains various aspects of software architecture like testability, performance, scaling, concurrency and design patterns. 
 The book has ten chapters. The first chapter speaks about different architect roles like solution architect, enterprise architect, technical architect what is the role of an architect and…

RC checklist for Indian Applicants

One Sunny Sunday morning one can get up and question their self-existence, or one can ask every few days or few months what am I doing at the current job? The answer will push you to a place you have never been. 
 One can meticulously plan for extravagant programming tour or programmer’s pilgrimage for three months. Yes, that what my outlook of RC is! RC is a different place from a usual…

Return Postgres data as JSON in Python

Postgres supports JSON and JSONB for a couple of years now. The support for JSON-functions landed in version 9.2. These functions let Postgres server to return JSON serialized data. This is a handy feature. Consider a case; Python client fetches 20 records from Postgres. The client converts the data returned by the server to tuple/dict/proxy. The application or web server converts tuple again back…

RFCS We Love


 A simple question can open a door for new exploration. While I was at RC , I tweeted “Is there any meetup group similar to papers we love for discussing RFCS?”. In an interval of nine minutes, Jaseem replied: “Let’s start one :)” 
 Is there any meetup group similar to @papers_we_love for discussing RFCs? — kracekumar (@kracetheking) November 30, 2016 
 
 Above discussion on…

Expose jupyter notebook over the network

What is the Jupyter notebook? 
 
 The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualisations and explanatory text. 
 
 The definition is from the official site . I use IPython/Jupyter shell all time. If you haven’t tried, spend 30 minutes and witness the power! 
 At times, I want to share some code…