A 30+ Marketing Guy Learning to Code in Public | Backend Engineering, Machine Learning, AI & More

I’ve spent years in growth marketing, shipping campaigns, analyzing funnels, and scaling products. But I wanted to get closer to the code to build, break, and learn things myself. Code by Night is a running log of that journey. It’s where I document what I’m building, how I’m thinking about it, and what it’s teaching me.

Churn Is Not a Data Science Problem

My old churn analysis capstone post has somehow become one of the most popular posts on this blog over the last year. I did not expect that. At the time, churn looked like a neat data science problem to me. You get a dataset, clean it, engineer some features, train a model, check the metrics, maybe explain feature importance, and then recommend a few retention ideas. It is a good project shape. Business problem, dataset, model, metric, interpretation. Very neat, if I may call it that. Very portfolio-friendly. ...

June 17, 2026 · 8 min · Shivam Chhuneja

My Machine Learning master’s degree made AI feel less magical, and the hype harder to trust

I finished my data science and machine learning master’s a week ago. That sentence feels strange to write because its been a crazy 2 years. Classes, assignments, tests on the weekends and full on work and family life through the week. It feels great to have my weekends back after 2 years. I should probably have a cleaner feeling about it. Relief, pride, maybe a very professional LinkedIn post with a certificate photo and a stupid caption about growth. Maybe I will do just that after finishing this article. Anyways, I do feel proud, obviously. It was a lot of work. Doing a master’s while working full time is not exactly what I would call a chill hobby. ...

June 17, 2026 · 9 min · Shivam Chhuneja

Marketers Must Evolve Into Marketing Engineers To Survive The AI World

So I was watching a video from this creator I follow and something felt off about it. His lips weren’t syncing right. Not a huge thing, but enough that I noticed. So I went and checked his profile. Turns out he hadn’t actually shown up in any of his own videos for like six or seven months. The whole feed was Heygen. Or something like it, I’m not totally sure which tool. ...

April 19, 2026 · 5 min · Shivam Chhuneja

Why You Should NOT Use an AI Browser Today

AI Browsers Are Here. But Should You Trust Them? Everyone’s racing to launch their own browser. It’s like last month we had 3 or 4 main browsers in the market and today there are 10,000 and to be honest 9,995 of those are AI browsers. ChatGPT Atlas. Perplexity Comet. Gemini(powered) Chrome almost out I guess. They’re trying to become assistants, agents and interfaces you talk to and not just a browser. ...

November 1, 2025 · 4 min · Shivam Chhuneja

You Can’t Lead in AI If You Don’t Understand the Math

Why I’m Picking Up the Math Now I come from product & growth marketing and I’m doing my masters in Data Science and Machine Learning. Most of my work has been about making technical products understandable. Shaping go-to-market plans, writing positioning for AI features, and working across teams to make sure what we build actually makes sense to the people we’re building it for. I’m also on a path to becoming a full-stack machine learning engineer. That means going beyond talking about models. I want to build them. Understand them. Debug them. Know when they’re lying. ...

October 22, 2025 · 4 min · Shivam Chhuneja

From Copy‑Paste to First Principles of Machine Learning

When Copy‑Paste Stops Working In marketing, we live and die by templates. Landing page templates. Ad copy frameworks. Campaign recipes. Machine learning wouldn’t be that different, right? Just plug in your dataset, borrow someone’s notebook from Kaggle, tweak a few parameters, and be done with it. That’s how a lot of people approach it. And to be fair, it kind of works, until it doesn’t. You get a model that runs, a prediction that looks reasonable, a chart that impresses in a meeting. But under the surface, there’s often a gap. You don’t really know what’s going on. ...

September 6, 2025 · 3 min · Shivam Chhuneja

K-Means vs K-Means++: Smarter Centroids, Better Clusters

K-Means++ is a clever upgrade to K-Means that fixes its biggest flaw: random initialization. Instead of picking all k centroids at random, K-Means++: Picks the first centroid randomly from the data points. For each remaining point ( x ), compute its shortest distance ( D(x) ) to the nearest chosen centroid. Choose the next centroid from the dataset with probability proportional to ( D(x)^2 ). Repeat until ( k ) centroids are selected. This spreads centroids out more effectively and leads to: ...

June 30, 2025 · 1 min · Shivam Chhuneja

I Built an Open Source AI Powered SaaS Market Intelligence Tool for Marketing Teams. Here's How

So, the idea for this came from a chat I had with Dhruv, the CEO of Middleware. He pointed out that I should think of myself as a ‘builder-marketer,’ not just a marketer, and that I should build stuff that proves it. I thought about it, and he had a point. So I decided to build a project that would be useful for marketing and growth, but also something I could deploy myself. ...

June 22, 2025 · 7 min · Shivam Chhuneja

ARIMA vs. SARIMA: A Practical Guide to Choosing the Right Time Series Model

When you’re working with time series data, naturally things are going to point towards forecasting. And two of the most reliable classical tools for this are the ARIMA and SARIMA models. To be honest I was quite confused when I first learnt about these a year ago but they do make a ton of intuitive sense once you understand them on a deeper level. The names are similar, and so is their underlying logic, but there is a key difference that more or less decides which one you will pick in what scenario. ...

June 19, 2025 · 6 min · Shivam Chhuneja

Full Code Walkthrough - Reducing Churn in E-Commerce with Predictive Modelling

If you read part 1 of this series, ala Churn Prediction for E-Commerce with Predictive Modelling, you know I recently wrapped up a full end-to-end churn prediction project as part of my postgrad program. That article was the 30,000-foot view – the business problem, the segmentation insights, the high-level model results. With this one I simply walk you through the code. But instead of just dumping code snippets for you to copy pasta, I want to walk you through what I actually did and, more importantly, why it matters. ...

June 18, 2025 · 14 min · Shivam Chhuneja