Tashif Ahmad Khan

Developer taf.sh

Blog

Welcome

tashif.codes shipping 91 projects — 59 of them live
91
18
13,473
165

Blog

18 posts

Refresh blog posts?

Re-fetch titles, excerpts, tags, and reading times from the live blog API. Views, likes, and comments only load on individual post pages.

Last fetchedDec 1, 2026, 4:13 AM
Relative…
Sourceblog

Latest · Open Source & Tools

A College Forked My Open Source Project and Forgot to Change the Analytics Key

Ramachandra College of Engineering rebuilt my MIT-licensed CodeTrace into a placement portal, and shipped it with my PostHog key still inside. Here's the whole story, the evidence, and what the MIT license actually asked of them.

8 min read
Read the post

Data & ML · Web

Run Your ML Model in the Browser: No Server Required (Pyodide vs ONNX)

I took a real XGBoost news-bias classifier and made it run entirely in the browser two different ways: Pyodide unpickling the original .pkl, and ONNX via onnxruntime-web. Same model, same task, wildly different perf. Here's what actually happened, with numbers, the trap that almost broke it, and which one I finally shipped across the whole site.

14 min Read

Web Scraping · Python

'This Website Has No API': Yes It Does, and Here's the No-Browser Way to Scrape It

My friend Amresh was building Pitaara, a live gold-rates app, and needed data from brands that really don't want to be scraped. I've done this dance before, so I helped. Here's the project walkthrough, plus the general guide to scraping sites that swear they don't have APIs.

16 min Read

Data & ML

JSON vs YAML for LLM Output: What the Tokens Actually Cost

A pipeline of mine kept asking an LLM for JSON and kept paying for every brace and quote in the reply. I switched the output format to YAML, then got curious and actually ran both through tiktoken to see what was true and what was just a stat floating around the internet. There's a real saving, and a catch nobody mentions: minified JSON beats YAML on raw tokens.

7 min Read

React & Mobile

Why Your Android Service Keeps Dying (and What to Use Instead)

I was building a run-tracker side project and the GPS updates just stopped the moment the screen locked. Turned out I'd built a background service the way Android used to allow, and the OS doesn't allow that anymore. Here's the full picture: foreground, background, and bound services, the lifecycle that governs all three, and what modern Android actually wants you to do instead.

10 min Read

Data & ML

Prisma Notes: Schema to Query, and Every Trap in Between

I built a tiny shared blog for a few friends and used it as an excuse to actually learn Prisma properly instead of copy-pasting from the docs. This is what happened: the schema file, migrations, relations, and every gotcha along the way, from the include-vs-select trap to pagination that quietly reshuffles itself when you forget orderBy.

13 min Read

React & Mobile · Low Level

Old bridge vs new architecture: why my React Native chat list kept dropping frames

A chat screen with a typing indicator and a fast scroll was enough to make an old-architecture React Native app visibly stutter. The cause wasn't my code, it was JSON crossing a bridge sixty times a second. Here's what the new JSI-based architecture actually replaces, and why the old one had to go.

7 min Read

React & Mobile · Low Level

useRef vs useState: why my countdown timer redrew the whole page every second

I stashed a setInterval handle in useState and watched a simple countdown widget stutter every tick. The fix is one hook swap, but understanding why it works is the actual lesson: which of your values need to repaint the screen, and which are just bookkeeping.

5 min Read

Web

My Frontend Was on :5173, My API Was on :8000: A Field Guide to Every Way CORS Breaks

The first real fetch call I wrote against my own backend died in the console with a wall of red about CORS policy. Here's what an origin actually is, why browsers block it by default, and every real way CORS bites you afterward, in the order you'll actually hit them: preflight, credentials, wildcards, and the errors that follow.

13 min Read

Web

It Ran Fine on My Machine: Chasing Core Web Vitals Across the Full Stack

I pushed a new build of my portfolio, tested it on my laptop over wifi, and it felt instant. Then I ran it through PageSpeed Insights on a throttled connection and watched the largest-contentful-paint number come back embarrassing. This is the walkthrough of fixing FCP, LCP, INP and CLS across a FastAPI backend and Next.js/Astro frontends, with the code that actually moved each number.

6 min Read

Python · Low Level

Why Python Doesn't Have Call by Reference (And What It Does Instead)

I spent longer than I'd like to admit trying to bump a counter inside a function before I actually understood what a Python variable is. Here's the mental model that made it click, and the three ways to get the behavior you actually want.

5 min Read

Python · DSA

How Many Loops Do You Actually Need? Generating N Nested Loops in Python

I was building a tiny combination-lock simulator where the number of wheels was a setting, not a constant, and hit the wall everyone hits eventually: you can't write for i, for j, for k when you don't know how many for's you need. Recursion, itertools.product, and a manual odometer, with real tradeoffs and the one thing you should never do instead.

6 min Read

Python · Low Level

Python's Import System, and the Error That Finally Made Me Learn It

I tried to test one scraper module in isolation and got 'attempted relative import with no known parent package' for my trouble. Here's what that error actually means, how Python's import system really works, and how to structure a project so you stop hitting it.

6 min Read

Python · DSA

I Built a Linked List, Then Spent a Weekend Making It Act Like a Real Python List

I was grinding linked-list problems for interview prep and got sick of writing ll.get_length() and ll.contains(x) by hand for every variant. So I built one general-purpose LinkedList and went through the dunder methods one at a time until list(my_ll), sum(my_ll) and for x in my_ll just worked. Here's every method, in the order I actually hit them, including the one (__del__) that I implemented wrong on the first try.

9 min Read

Python · Low Level

How Python Actually Creates Classes: type, Metaclasses, and the Object Model

I built a plugin loader that was supposed to auto-register every class dropped in a folder, reached for a metaclass instead of a decorator because it felt like the 'proper' way, and then couldn't explain why it worked. So I went and figured out what actually happens when Python hits a class statement, and what type really is underneath it all.

5 min Read

Open Source & Tools · Low Level

Git Doesn't Delete Anything: What's Actually Inside .git

A rebase gone wrong taught me that git never really deletes anything, it just moves pointers around. Here's what blobs, trees, commits, refs, merges and rebases actually are under the hood.

7 min Read

Web · Low Level

From HTML Bytes to Pixels: How the Browser Actually Renders a Page

A scroll-linked animation once pegged a phone's CPU at 100% and dropped it to 12fps. The bug was one line reading offsetHeight inside a loop that also wrote style.top. Here's the full pipeline that made that line so expensive, from HTML bytes to painted pixels.

6 min Read

Web · Low Level

The Rendering Spectrum: MPA, SPA, SSR, RSC, and Islands, in the Order You'd Actually Hit Them

A client's marketing site scored terribly on Lighthouse and painted a blank screen for three seconds. It was a plain React SPA with no server rendering at all. That one bug tour is basically the whole history of web rendering, so here it is end to end: MPA, SPA, SSR, RSC, and islands.

8 min Read
New posts reach the RSS feed first. Subscribe