[{"content":"I understand why Prophet gets picked up so often.\nYou give it a date column and a value column, fit the model, ask for the future dataframe, and it gives you a chart that looks like somebody has already put it in a planning deck (I&rsquo;m sure that in the last 30 days you&rsquo;ve met at least 1 person who has done this).\nAnyways, there is a trend, there are changepoints, there are uncertainty bands. It feels much more finished than a lot of time series work feels in the beginning.\nI have definitely looked at those charts and felt like the model had found something important. Then I started spending more time reading about validation and working through forecasting problems, and as you can guess, its outright harder to trust.\nIt&rsquo;s a different kind of high. A forecast line extending past the data does something strange to the brain. It looks like an answer even when it is really just a model pushing its assumptions into a period it has not seen yet.\nThat is more or less why people keep telling you to be careful with Prophet. Or atleast everyone on Reddit does lol.\nI do not think the useful version of that advice is &ldquo;never use Prophet.&rdquo; That sounds like the a rule people make after watching somebody use a tool badly once. I think the more useful question is if the model actually deserves the confidence the chart gives us.\nSo I ran a small backtest. Yes yes, I know one backtest is not enough to go heads on with every self proclaimed senior data scientist with 25 years of experience on Reddit but bear with me for this couple hours of fun work that kept me entertained this last weekend.\nI put one fixed Prophet configuration against seasonal naive and ETS on two public monthly FRED series. ETS won every pooled metric on both series. That sounds clean, maybe too clean.\nWhen I looked at the individual forecast windows, Prophet still had the lowest 12-month MAE once for each series. Then one of the retail windows ran straight into April 2020, and every model made a mess of it. We all know why&hellip;and we shall not write that word because we fear the Google SEO gods.\nThe experiment was deliberately boring I used two monthly US series from FRED: CPI, all items, not seasonally adjusted, and advance retail trade and food services sales, also not seasonally adjusted. They are not supposed to represent every forecasting problem. They gave me two fairly long monthly series with seasonality, and retail sales also gave the comparison a very inconvenient period to work with.\nFor each series, I made forecasts from January 2019, 2020, 2021, 2022, 2023, and 2024. At every one of those origins, the models only received the history available up to that month and forecast the next twelve months. That gave me 72 scored observations per model for each series.\nI kept the comparison small because I wanted the design to stay understandable. Seasonal naive repeats the value from the same month a year earlier. It can sound embarrassingly basic until it beats something more complicated.\nDon&rsquo;t tell me you haven&rsquo;t spent 5 hours on bagging and boosting and what not only to finally settle with a simple regression. Data scientist happy, manager happy, boss happy, client happy.\nAlright, let&rsquo;s move on. The classical alternative was additive damped-trend Holt-Winters ETS, fitted again inside each training window. Prophet stayed on the same configuration across both series and all six origins, with linear growth, yearly seasonality, no holidays, and no external regressors.\nI did not tune settings after looking at the out numbers. A lot of comparisons become a bit silly when somebody spends days carefully tuning the model they like and lets the other one run on defaults, then calls the result an evaluation. Yep, I am guilty of this and I know you are too!\nI also wrote earlier about why I still like ARIMA. ARIMA is not in this test. I wanted a narrower answer: can this one fixed Prophet setup beat a reasonable seasonal baseline and a seasonal ETS model on these two series?\nETS won the table, but the table is not the whole story Here are the pooled errors across the six forecast origins. Lower is better for all three metrics.\nSeries Model MAE RMSE MASE CPI ETS 5.09 6.62 1.94 CPI seasonal naive 10.51 12.37 3.95 CPI Prophet 14.32 18.07 5.22 Retail sales ETS 24,079.29 33,993.04 1.42 Retail sales Prophet 37,383.62 48,859.10 2.14 Retail sales seasonal naive 39,831.57 53,671.23 2.32 ETS had the lowest pooled MAE, RMSE, and MASE for both series in this run. Read the numbers within each series, though. CPI is measured in index points and retail sales are measured in their own dollar units, so an error from one row does not become bigger or smaller in any way beside an error from the other series.\nMAE is the average absolute error. RMSE punishes larger misses. MASE is useful because it scales error against a seasonal-naive in-sample forecast, though mine needs a small warning label. I calculated its seasonal-naive scale separately inside every training window, then averaged the point-level scaled errors across the origins. There is no one shared MASE denominator across all six origins, and I do not want to make it sound more universal than it is.\nETS had lower MAE than the fixed Prophet configuration at every one-to-twelve-month horizon for both series. That is a useful result for this setup, but I would still choose the horizon based on the decision. A model that is fine for next month&rsquo;s plan can be a completely different thing from a model somebody is using for a year of inventory planning.\nThe pooled result did hide the parts I actually wanted to see A pooled score stops me from falling in love with one lucky forecast window. It also turns six different moments in the data into one number which can hide the real truth.\nProphet had the lowest 12-month MAE at the January 2019 CPI origin, with 1.54 against 4.91 for ETS and 4.75 for seasonal naive. It also had the lowest MAE at the January 2020 retail origin, with 25,167.60 against 28,024.09 for ETS and 32,388.33 for seasonal naive.\nThen April 2020 arrived inside that retail forecast window.\nActual retail sales for that month were 401,556. Seasonal naive predicted 496,982, ETS predicted 519,757, and Prophet predicted 515,067. Seasonal naive was closest, with an absolute error of 95,426. ETS missed by 118,201 and Prophet missed by 113,511.\nI do not think this is where we make fun of Prophet or declare seasonal naive the hero of forecasting. All three models had the series history. None of them had a pandemic variable, a policy timeline, or a useful way to know that retail conditions were about to change at that speed. The more interesting thing is that the pooled winner did not solve that problem either.\nThis is why I get uneasy when people talk about model evaluation as if one comparison is all that is needed. The average is good although it does not tell me which months mattered to the person using the forecast, if the model missed a seasonal peak, or if a change in the business made the historical pattern temporarily useless.\nProphet is easy to trust before it is easy to test I think this is where the scepticism around Prophet comes from.\nProphet makes it easy to produce a plausible (probably the first and last time I have used this word) first forecast. That is useful when you are exploring a new series and I would rather somebody make a rough forecast than stare at a spreadsheet for three weeks waiting for enlightenment.\nProphet still makes assumptions about the future. It models trend and seasonal effects. It can put changepoints where the historical trend appears to have moved. It can use holidays and external regressors if we give them to the model. None of that means it knows why the line moved.\nA changepoint in sales could come from a product launch, a price change, a tracking problem, a campaign, or somebody fixing an old spreadsheet mistake. The model sees a change in the numbers. The business still has to work out which story belongs to it. Which btw brings me back to my old article about why each data science problem is a business problem first before it is a DS or ML problem!\nI do not think this is a special problem with Prophet either. ARIMA can be treated like magic. ETS can be treated like magic. A seasonal-naive forecast can be treated like magic if it happens to look good for long enough. Forecasting models only know the data we have given them and the patterns they can pull from it. A nice plot just makes it easier to forget that.\nWhat I would do with a new series now I do not think I came out of this weekend hating prophet. I came out wanting to test forecasting models with a grain of salt in general.\nIf I needed a forecast for a real decision I would start by asking what the decision is and how far ahead it needs to look. Then I would put Prophet beside a baseline that has a fair chance of being useful, along with at least one classical alternative where it makes sense. Every model should get the same history at each origin, the same forecast horizon, and a setup chosen without peeking at the future scores.\nAfter that I would look at the pooled errors but I would also look at the individual forecast windows and the horizons that resemble the actual use case. Promotions, price changes, supply problems, policy changes, and a lot of ordinary business context do not exist in a univariate series unless somebody adds that information and tests whether it helps. A better forecasting model might be useful. Better information can also be the thing the model was missing.\nI would also want to know what a bad forecast costs. MAE, RMSE, and MASE are useful, but they do not know whether it hurts more to order too much inventory or too little, whether somebody can adjust later, or whether one month matters far more than the others. That work has to happen outside the metric.\nThis is still a very small answer The data came from current revised FRED observations retrieved on 20 July 2026, which makes this retrospective. A forecaster making decisions at those historical points would have seen earlier data vintages so this is not a real-time-vintage backtest.\nThe comparison covers two US monthly series, one fixed Prophet configuration, one ETS family, six annual origins, and a twelve-month horizon. I did not compare ARIMA or SARIMA, holidays, external regressors, other Prophet configurations, tuning budgets, or the actual cost of errors for a business.\nSo I cannot use this to say Prophet is broadly worse than ETS, or that ETS is universally better. I also cannot honestly use two series to explain what every data scientist thinks about Prophet. On these two revised FRED series, under this fixed design, ETS won the pooled metrics and Prophet still had a couple of good windows.\nI am wrapping me writing this article with trusting the chart a little less which I think is a decent outcome. A forecast is enough to begin looking at a problem. Before I hand it any real authority I want baselines, a test that respects time and a look at the periods where the data decided to do crazy shit.\n","permalink":"https:\/\/codebynight.dev\/posts\/why-data-scientists-are-skeptical-of-prophet-forecasts\/","summary":"<p>I understand why Prophet gets picked up so often.<\/p>\n<p>You give it a date column and a value column, fit the model, ask for the future dataframe, and it gives you a chart that looks like somebody has already put it in a planning deck (I&rsquo;m sure that in the last 30 days you&rsquo;ve met at least 1 person who has done this).<\/p>\n<p>Anyways, there is a trend, there are changepoints, there are uncertainty bands. It feels much more finished than a lot of time series work feels in the beginning.<\/p>","title":"Why Data Scientists Keep Saying Not To Use Prophet"},{"content":"I have spent around seven years working in e-commerce in one way or another.\nI have worked with brands doing a couple hundred thousand dollars a month. I have helped smaller brands that were barely starting up and just trying to get the foundations right. I have run my own e-commerce stores and I have also worked with high-end fashion brands across five countries.\nMost of my work was as a technical marketer building websites, marketing workflows, funnels and helping brands sell more stuff. The work also involved looking at people who bought once and never came back, people who abandoned carts halfway through, campaigns that pulled in customers who had no reason to stay, and the general pain of trying to make a store feel worth returning to.\nSo churn was never only a data science thing for me.\nThen I did a churn analysis capstone during my master\u2019s in data science. I cleaned the data, looked at the mess, built segments, tried a bunch of models, and got a tuned Random Forest that looked pretty damn good on the metrics.\nAnd I was proud of it. I still am.\nBut I had this slightly unsettled feeling afterwards. I had a model that could flag customers who might churn. Okay, Cool.\nWho was going to do something about it? Yes, I know that was the scope of my project but its not the first time I saw asystem setup to do something like this but without making sure that there are going to be people who would actively leverage it properly.\nA churn score gives you a list I think a churn model makes sense once a store has enough customers that nobody can remember every account. It gives you a list that is hopefully more useful than picking people from a spreadsheet with your eyes closed. It can also point at complaints, short tenure, poor service scores, falling engagement, or whatever else the data has managed to pick up.\nThis can be useful because the model has narrowed down where somebody should look first.\nBut a customer score does not tell you why the person is on that list. It does not know whether the first order arrived late, whether the product disappointed them, whether support ignored them, or whether they only needed the product once. It also does not know if they are waiting for the next discount because the brand trained them to do that.\nSo now a person has to look at the account, see what happened, and decide what should happen next. That could mean support following up, a more relevant offer, a better post-purchase message, or leaving the customer alone.\nThis is more or less where my feelings about churn prediction changed a bit as well. The model can make the problem look very clean, but the work after the score is still people trying to decide what is useful and what is just another sheet in the company&rsquo;s black hole of a shared google drive.\nA discount does not explain why somebody left A generic discount is usually the easiest thing to do with an at-risk list. Build the segment send a promotional email and see if some revenue comes back. I understand why it happens because it is fast and somebody can say they did something about churn before the next meeting.\nThe same discount can be a non-answer to what happened. It does not fix a late delivery or a confusing website or a bad return or a sub-par product or support that made the customer feel like getting help was more work than it was worth.\nThis is why I find retention discussions a little odd sometimes. People talk about predictive models and personalisation while the first order experience is still making customers leave for very normal reasons. I know a churn model sounds more interesting than fixing a mobile checkout or writing less useless email flows, but those boring things are usually closer to the reason somebody comes back.\nWorking with smaller brands made this pretty obvious. There is often plenty to fix before anybody needs a complicated model. The offer needs to make sense, the website needs to work properly, customers need to know what happens after ordering and the emails need to feel useful instead of promotional noise.\nMy capstone had complaints, tenure, cashback dependency, and service score showing up as useful churn signals. I liked seeing that because it gave me something to investigate. At the same time I also think feature-importance charts can make people feel like the answer is clearer than it really is.\nA complaint can mean a broken product, an unresolved issue, or one bad interaction that did not matter much. More cashback might get another order from a customer, but it can also make the whole relationship look like a discount loop. The model gives you a clue then somebody still has to work out what the clue means for this customer.\nI would decide what happens next before building more models I would want to know what the brand can actually do for someone who looks likely to leave. If the only answer is one generic email then a few rules around a bad first order or an unresolved complaint may be enough to get started. A complicated model does not make a generic email feel more personal.\nIt gets more useful when there are real actions available. Support can review an open issue, someone can follow up with a high-value customer, the first-time buyer flow can be changed, or the brand can try a loyalty benefit that does more than offer another coupon.\nThen the model can help decide where limited attention should go. That feels like a better use of churn prediction than treating every customer who crosses a threshold the same way.\nThe result also needs checking afterwards. If a business sends an offer to 1,000 customers and 200 buy again, that number might look great on a slide. It still does not show how many would have returned anyway, how much margin the business gave away, or whether a different action would have worked better. Statisctical Significance!\nA holdout group helps with this. Trying different interventions with similar customers helps too. Even a basic comparison between retained revenue and the cost of discounts, support time, or shipping benefits can stop a team from feeling clever because money came in after an email was sent.\nI wrote earlier that churn is not a data science problem, and I still agree with that. The model can tell you something useful, but it cannot decide what a customer needs or prove that the thing you did afterwards was worth the cost.\nWhat I care about more today The capstone taught me a lot about imbalanced data, segmentation, feature importance, model evaluation, and the ways a decent accuracy score can still be bogus. The e-commerce work taught me something closer to real world. A returning customer often comes from ordinary things going right before they ever appear in a churn model.\nThe website made sense, the product did what it said it would do, the order did not become a problem and the customer had some reason to remember the brand later. None of that sounds like exciting machine learning work but I think it matters more than a lot of retention discussionists want to admit.\nSome customers will leave anyway. They may have been a bad fit, they may have wanted one thing once, or they may cost more to retain than they are worth. Trying to save every customer can turn into a very expensive and slightly desperate way to run an e-commerce business.\nI still think churn prediction is worth doing when there is enough data and somebody can act on the result. I would just start with a few more annoying questions now. What does a healthy customer look like here, what usually goes wrong before they leave, who can do something about it, and how will we know if it helped?\nOnce those questions have proper answers, the model has a much better chance of helping instead of becoming another useless score to please the boss.\n","permalink":"https:\/\/codebynight.dev\/posts\/churn-prediction-reducing-ecommerce-churn\/","summary":"<p>I have spent around seven years working in e-commerce in one way or another.<\/p>\n<p>I have worked with brands doing a couple hundred thousand dollars a month. I have helped smaller brands that were barely starting up and just trying to get the foundations right. I have run my own e-commerce stores and I have also worked with high-end fashion brands across five countries.<\/p>\n<p>Most of my work was as a technical marketer building websites, marketing workflows, funnels and helping brands sell more stuff. The work also involved looking at people who bought once and never came back, people who abandoned carts halfway through, campaigns that pulled in customers who had no reason to stay, and the general pain of trying to make a store feel worth returning to.<\/p>","title":"Churn Prediction Is Easy. Reducing E-Commerce Churn Is Hard."},{"content":"I have been spending a lot of time around AI agents lately.\nAgents that can read files, call tools, update things, research things, write things, and generally make you feel like the computer might be about to become a coworker. Which is exciting. Also slightly stressful if you think about what it has access to for more than 30 seconds.\nThen there is ARIMA.\nARIMA looks like it was named by someone who wanted to make sure nobody accidentally found statistics too exciting. It does not have a chat interface, cannot browse the web and definitely cannot write a follow-up email with \u201cjust circling back\u201d in it. It looks at a sequence of numbers and asks some basic questions.\nWhat happened before?\nIs there a trend here?\nDo the values repeat in a pattern?\nHow much of this is just noise?\nVery boring questions, I guess but I still like them.\nI wrote about ARIMA and SARIMA before, mostly from the perspective of why these models still matter for forecasting. This is a slightly different thing. The more time I spend around AI, automation, and people making crazy claims from nice looking charts, the more I appreciate a model that makes its limitations visible.\nI believe ARIMA is boring in a useful way.\nThe model makes you look at the data first When I was doing time series work during my master\u2019s, I initially treated ARIMA like a model selection problem.\nPick some values for (p, d, q), run it, compare RMSE and then try another combo. Let auto_arima do some searching, look at the forecast plot and of course feel smart for a few minutes.\nThat is probably a normal way to begin.\nBut it can also be a bit silly because those three letters are making claims about the data whether you understand them or not.\nThe autoregressive part says the past may help explain the present. The integrated part says the raw series needs differencing before it behaves in a stable way. The moving average part says past errors can still tell us something about the current value.\nYou cannot really use ARIMA for long without asking whether those claims make sense.\nIf sales keep growing because the company is expanding, raw sales numbers might keep moving upward. If you difference the series, you are looking at the change from one period to the next instead. That can make the pattern easier to model, but it also changes the question you are asking.\nIf your monthly revenue jumps every December, standard ARIMA will not magically understand that Christmas exists. You probably need a seasonal model, which is where SARIMA helps us out. If a pricing change, a product launch, a pandemic, or a competitor doing something weird moved the line, the historical pattern may not be enough anyway.\nThis is what I mean by boring. The model keeps dragging you back to the actual shape of the data.\nSometimes that is annoying because you want to train a model and move on. I get it. But it is better than treating every chart as an opportunity to summon a magical spell.\nThe forecast line is the least interesting part A forecast chart can look very convincing.\nYou have the historical line, a future line in a different color, add a confidence interval around it and the dashboard suddenly has authority to teach billion dollar CEOs.\nI am making fun of this, but I have absolutely been impressed by my own forecast charts before. A line extending into the future just does something to the brain.\nThe issue is that the future line is usually the easy part to look at.\nThe better questions are more irritating.\nDid the model get tested on a period that actually resembles the future decision? How wide is the prediction interval? Did it miss a seasonal pattern that everyone in the business already knows about? Are the errors behaving in a strange way? What happens when an external event disrupts the pattern? A model can have a decent RMSE and still be unhelpful for the thing someone needs to decide. This is part of why I think business ML should start with the decision, instead of treating a decent metric as the finish line. A monthly forecast might look fine on average while being completely wrong during the one month when inventory planning matters. A dashboard can say \u201cforecast is up 8%\u201d while the range around that number is large enough to make the decision obvious only if you look at it properly.\nThis is why I have become slightly suspicious of clean forecast plots. They are not useless. They just make it easy to stop asking questions too early.\nARIMA does not prevent that mistake. But it gives you more places to notice it.\nYou see the residuals, differencing, seasonal order, confidence intervals. You see, at least a little more clearly, that a forecast is an estimate built from a particular view of the past.\nBoring models make uncertainty harder to hide I think the thing I like most about classical time series models is that uncertainty is right there in the output.\nYou can ignore it, obviously. People ignore things all the time when the main number looks good enough for the slide.\nBut the interval is sitting next to the forecast, can&rsquo;t ignore that, can we?\nIf the model says next month\u2019s demand will be 1,000 units, that sounds great. If it says the plausible range is 700 to 1,300, the conversation that you have with your team is going to be a bit different. Maybe the business can tolerate that. Maybe it cannot. Maybe the right move is a smaller inventory bet. Maybe somebody needs to look at context the time series will never know about.\nThat is a much better conversation than pretending the model gave us the future.\nThis is also why I do not think forecasting is really prediction. I think its more like planning with an estimate, a range, and some assumptions you should probably write down.\nVery glamorous and chic.\nARIMA has plenty of ways to disappoint you I do not want to turn this into a \u201cclassical models good, AI bad\u201d thing. That would be boring in the bad way.\nARIMA can be a terrible fit.\nIt can struggle when the data is highly nonlinear. It cannot see a future product launch because it did not happen in the history. It can get confused by structural breaks. It can look better than it is if you validate it badly. It can also make you spend more time than expected wondering if you should difference the series one more time, which is not how I personally want to spend every evening.\nThere are cases where gradient boosted trees, Prophet, neural networks, or a model with external variables will make more sense. There are cases where the right answer is not a better model but better data, or a human who knows why the sales team changed the process two weeks ago.\nThe point is not that ARIMA wins every model comparison.\nThe point is that it makes the comparison more honest.\nYou have to look at the series, define the horizon and decide what \u201cgood\u201d means. You have to check whether the errors are acceptable for the business decision. Those are useful habits even if you eventually use something much fancier.\nI like the model because it does not feel magical Working around AI security and governance has made me care more about the boring parts of systems.\nPermissions. Boundaries. Logs. Inputs. Evaluation setup. All that at times seems secondary until the system is connected to real data and starts doing things you have to explain later.\nARIMA gives me a similar feeling, just with forecasting.\nThe interesting part is not that it produces a number. Plenty of systems can produce a number. The interesting part is whether I understand where that number came from, what it assumes about the past, how wrong it has been, and what I should do when the range is wider than I hoped.\nI think that is why I still like it.\nIt is old. It is limited. It has a deeply unsexy name. It forces you to think about trend, seasonality, error, and uncertainty when you would maybe rather just ask a bigger model to figure it out.\nAnd honestly, that feels like a pretty good deal.\nA boring model will not make forecasting feel magical. i It might make you a little less likely to believe magic when you see it.\n","permalink":"https:\/\/codebynight.dev\/posts\/arima-is-boring-and-that-is-why-i-still-like-it\/","summary":"<p>I have been spending a lot of time around AI agents lately.<\/p>\n<p>Agents that can read files, call tools, update things, research things, write things, and generally make you feel like the computer might be about to become a coworker. Which is exciting. Also slightly stressful if you think about what it has access to for more than 30 seconds.<\/p>\n<p>Then there is ARIMA.<\/p>\n<p>ARIMA looks like it was named by someone who wanted to make sure nobody accidentally found statistics too exciting. It does not have a chat interface, cannot browse the web and definitely cannot write a follow-up email with \u201cjust circling back\u201d in it. It looks at a sequence of numbers and asks some basic questions.<\/p>","title":"ARIMA Is Boring, and That Is Why I Still Like It"},{"content":"I still get excited when I see a boring task and think, &ldquo;I think I can do something about it, I can build something to automate this.&rdquo;\nThat is partly the GTM engineering mindset I&rsquo;ve been in for a while now. And so much of the work is spread across things that do not really belong together. CRM fields, spreadsheets, call notes, dashboards, Slack messages, enrichment tools, random CSV exports, and someone asking for an update five minutes before a meeting.\nIf I can turn two hours of this into ten minutes by spending 10 hours to build something, I am interested lol.\nUp until a couple years ago that was all I thought. Can I automate it? Great. I&rsquo;m on it.\nNow I pause a bit more.\nThis is annoying because I still like automation. I still use AI all the time and I do like getting small scripts working. I like seeing a workflow finally run without giving me some completely useless error. Beautiful. I guess I also like the grind of going through the errors and issues in a script step by step to get to the final point.\nAnyways, my immediate next thought is who is going to deal with this when it does something weird next month?\nI used to treat automation like a shortcut A lot of GTM work makes automation feel very obvious to me. You have an account list that needs cleaning, a few hundred companies that need research, calls that need summaries, fields that somehow need to be updated in three different places, and a report that people suddenly need in 20 minutes because apparently the meeting was always going to happen today.\nSo the manual step starts looking like the problem and you need to make the spreadsheet look less like it was created in a panic at 2 AM.\nSometimes that manual work is genuinely dumb and I think it should disappear. I am very happy to delete a task that is only there because two tools do not talk to each other properly or them talking is behind some stupid $1200 a month enterprise plan.\nBut I have also started noticing that some of the tiring manual work is where the confusion happens.\nA report might take forever because nobody agrees what the number is supposed to mean. A CRM field can be weird because three people use it in three completely different ways. An approval can feel like unnecessary friction until I realise the person doing it is the only one who actually knows the customer context.\nYou can automate all of that and make the process look much cleaner. The same confusion is still there, it is just moving faster now.\nWhich is a very satisfying, feel good way to hide a problem, I guess.\nA workflow running does not mean I am done with it When I finally get a workflow to run after going through the usual errors and weird issues, I want to be done with it almost immediately, especially if I have spent a good amount of time trying to make two tools connect or share outputs with each other. In a couple test runs if nothing has exploded yet my brain immediately starts calling it a success.\nBut getting it to run is only the first part. The uncomfortable part comes later when somebody else starts using it or when the same workflow has to deal with a change I did not think about while I was building it.\nA field might get overwritten even though someone had entered useful context there. An alert might send an update in slack every morning but nobody is really responsible for doing anything with it. An AI summary might drop the one thing an account manager actually needed to see while still looking completely polished and believable. Damn LLMs.\nThat is just real work I guess. Things change, people use systems differently from how I imagined they would use them, and someone eventually asks why it did that.\nThis is why I have started thinking of small workflows differently. They can feel like shortcuts while you are building them but once another person depends on them, they have inputs, outputs, permissions, strange edge cases, and a work outside the local session where they were made.\nI wrote about something similar while working through a small AI agent guardrail. The task was only a path check, but the exact path being checked decided what an agent could touch and edit. Automation has a lot of those details around it and they decide whether a useful workflow stays useful or becomes a hot potato.\nAI makes this easier in a slightly dangerous way AI has made it much easier for me to build the first version of something whether I need a script or a better explanation for an error message. I use AI because it helps me get started quickly and helps me move through the annoying parts of building something. Although I do make it a point to not use any sort of AI when learning and going through my backend course on boot.dev or building the rust project in codecrafters.\nAnyways, the trouble is that the first version can look finished before I have really thought through the actual work. A script has structure and a workflow has nice boxes and arrows, and an output AI summary comes back in complete sentences with headings so it becomes very easy to feel like the thinking is already done.\nSometimes it is done, but sometimes I have just made something that looks like a system without really understanding the process under it. I have started asking myself whether I want to automate a task because I understand it well and can clearly see the boring part or whether I am mainly irritated by the task and want it out of my face.\nBoth feelings are normal but they lead to very different things. The irritation is useful because it points at work that feels bad although it does not tell me what I should build to fix it. I wish it did because that would make life much easier.\nPermissions changed my perspective around all this Working in AI security and governance has made the access angle much harder to ignore. A workflow sounds harmless when I only describe the task like summarising customer calls, updating a CRM field when a lead matches a condition, or sending a weekly report to the team.\nThen I think about what it needs to do those things. It might need call recordings, transcripts, CRM data, support tickets, internal notes, an API token, or browser access. Some of that data may be in a place where people assumed it was only being used by one tool.\nAt that point the small workflow is attached to much more of the business than it seemed in the first sentence.\nThis is probably the biggest thing I took away from working around AI security and governance. I still care whether a tool works because obviously I do, but I also start thinking about what it can read, what it can write, where the data goes, whether it can overwrite something useful, and whether I can still get to the original source when the AI gets something wrong.\nI know this makes me sound like the person who ruins fun by asking about permissions, and maybe I have become that person. I still want the automation but I also want to know what I am giving it access to before I connect it to half the company and call it productivity.\nThe boring things have started mattering more For me logs, ownership, dry runs, smaller scopes, keeping the original data, and making it clear who is supposed to act when a workflow runs all used to feel like the decoration. The interesting thing was the AI, the integration, or the workflow that did the clever little thing that saved time.\nNow I think the boring stuff is probably what keeps the clever part useful for longer than one week. If an automation changes a CRM field, I want to know whether it can overwrite something a human wrote. If it sends an alert I want to know who will actually do something with it. If it summarises a call I want the transcript to stay there so the summary does not become a fake version of the truth that everyone keeps repeating.\nAll of this sounds obvious when I write it down but it is much less obvious when I am 4 hours into setting one of these up and tired. I have definitely wanted to feel clever for a few minutes after getting something to work and I probably still will but I trust that feeling less than I used to.\nSome of the boring solutions are better than the fancy ones The most advanced thing is not always the best thing to build for the problem in front of us.\nA saved query can be enough and a spreadsheet formula can be enough too. A simple rule-based alert can be better than an AI classifier that is trying very hard to sound smart. Sometimes a manual review queue with enough context is the better answer because somebody needs to make an actual call instead of pretending the workflow can decide everything by itself.\nThis is especially true in GTM work because so much of the work is actually somewhere in between structure and judgement. You can automate research, reporting, enrichment, routing, and follow-up, and all of that can help but bad definitions under the system do not become good just because the system runs faster.\nMessy lifecycle stages become messy automated lifecycle stages and unclear ownership becomes unclear ownership with Slack notifications. A CRM nobody uses can become a CRM that is now changing itself while nobody runs it which is its own genre of suffering.\nI keep coming back to the point I made in Churn Is Not a Data Science Problem. The model, dashboard or workflow is only one part of the work. Someone still has to decide what the field means, what action should happen, who owns it, and when a human needs to look at it. A useful automation usually has a very boring answer to those questions and that is probably a good sign.\nLearning backend stuff make me focus on the middle part too I&rsquo;ve been learning backend programming and now I notice state, retries, timeouts, data models, permissions, rate limits, error handling, tokens expiring, weird inputs, field names changing, and a vendor changing an API response because apparently nobody enjoys peace. I do not understand all of this deeply yet because I am still learning but I understand enough now to know that connecting two tools is rarely only about connecting two tools.\nThere is always more going on in the middle and that is where the assumptions are and errors pop up. It is also where I find out whether a workflow can survive someone using it like a normal person instead of the perfect user I had in my head while building it.\nThis has made me more patient with things I used to skip past like naming fields properly, keeping scope small, writing down assumptions, testing weird inputs, preserving raw data, and giving a workflow fewer permissions than it asks for by default. Nobody wants to watch a 40-minute YouTube video called &ldquo;Shivam thinks about field ownership before updating the CRM&rdquo; although maybe there is an audience for that.\nBut that boring stuff is what makes me trust a workflow more.\nThe question is different for me now I still automate things and I still like AI for the text and data chores. I still get excited when I can take some ugly repetitive work and make it easier.\nEarlier I mostly asked whether I could automate the task. Now I also ask whether I am willing to own the little thing I am creating when I do it because that question makes me think about data before the nice demo and permissions before I connect another tool.\nReal work has tradeoffs and I am not trying to become the priest of perfect systems design over here.\nI am just less relaxed about automation now because I understand a little more of what can go wrong after it starts working.\nThe more technical I get the less I want to automate everything. I still want to automate the right things but I want to understand what kind of programme I am building before it decides to make life difficult for me later.\n","permalink":"https:\/\/codebynight.dev\/posts\/more-technical-less-want-automate-everything\/","summary":"<p>I still get excited when I see a boring task and think, &ldquo;I think I can do something about it, I can build something to automate this.&rdquo;<\/p>\n<p>That is partly the GTM engineering mindset I&rsquo;ve been in for a while now. And so much of the work is spread across things that do not really belong together. CRM fields, spreadsheets, call notes, dashboards, Slack messages, enrichment tools, random CSV exports, and someone asking for an update five minutes before a meeting.<\/p>","title":"The More Technical I Get, the Less I Want to Automate Everything"},{"content":"I have spent the last year working around AI security and governance, so I already understood the high level idea behind guardrails.\nAgents should have boundaries. Tools should have scopes. Read access and write access should mean different things. A system that can touch files, APIs, CRMs, Slack, browsers, or internal docs should probably have a stronger plan than &ldquo;hope it behaves nicely.&rdquo;\nOkay, that last sentence already sounds like I am about to sell you a whitepaper.\nAnyways, I was doing a Boot.dev module around building an AI agent and the task was simple: let the agent list files from a working directory, but keep it inside the directory it was allowed to use.\nIt&rsquo;s technically a simple small function that checks if the agent is in the permitted directory, if yes, extract the details of all the items in that directory.\nAnd having worked through that function I came out way more confident in my understanding of what goes behind guardrails, especially when it comes to local file access.\nThe annoying part was a path check The function looked like this at one point:\ndef get_files_info(working_directory: str, directory: str = &#34;.&#34;) -&gt; str: try: working_dir = os.path.abspath(working_directory) full_target_path = os.path.normpath(os.path.join(working_dir, directory)) if not os.path.commonpath([working_dir, full_target_path]) == working_dir: return f&#39;Error: Cannot list &#34;{directory}&#34; as it is outside the permitted working directory&#39; elif not os.path.isdir(full_target_path): return f&#39;Error: &#34;{directory}&#34; is not a directory&#39; else: results = [] for item in os.listdir(full_target_path): full_path = os.path.join(full_target_path, item) if os.path.isdir(full_path): isdir = True else: isdir = False file_size = os.path.getsize(full_path) for item in os.listdir(full_target_path): results.append(f&#34;- {item}: file_size={file_size}, is_dir={isdir}&#34;) return &#34;\\n&#34;.join(results) There is a bug in the listing part here.\nI loop over os.listdir(full_target_path) twice, so the size and is_dir value can get tied to the wrong item. Very elegant. 10\/10 production-grade software lol.\nAnyways, the part that I want to share with you is:\nworking_dir = os.path.abspath(working_directory) full_target_path = os.path.normpath(os.path.join(working_dir, directory)) if not os.path.commonpath([working_dir, full_target_path]) == working_dir: return f&#39;Error: Cannot list &#34;{directory}&#34; as it is outside the permitted working directory&#39; This is the base guardrail.\nThe agent gets a working directory. The user can ask for a directory. The code builds the real target path and checks whether that target still is inside the allowed working directory or not.\nIf the target is outside, the function returns an error.\nSmall thing, very boring, also the whole point.\nI knew the idea, but coding it makes a difference This is where I felt the difference between understanding a concept and implementing it.\nIn my head, the rule was:\nThe agent should only inspect files inside the permitted directory.\nI had to keep track of working_directory, working_dir, directory, and full_target_path. One is the function argument. One is the absolute version. One is what the user asked for. One is the thing the agent might actually inspect.\nThose sound small until you mix them up.\nAnd I did mix them up.\nI passed the wrong thing to abspath. I confused working_directory and working_dir. I had to slow down and understand what commonpath was comparing. I also checked whether something was a directory using the wrong version of the path at one point.\nAll this through the process felt like, &ldquo;why is this test still failing, I swear I understood this five minutes ago.&rdquo;\nBut in hindsight, the mistake was useful because it showed me where the guardrail actually does its work.\nDetails are tehcnically in the boring exact-ness.\nWhich path is allowed?\nWhich path was requested?\nWhich path will the tool actually touch?\nThose three questions have to line up. If they do not, the guardrail thing is out the window.\nThe boundary has to become executable In AI security and governance, we use a lot of clean words.\nControls. Policies. Permissions. Least privilege. Data boundaries. Tool access. Monitoring. Audit trails.\nThese words are useful. I am not making fun of them. Okay, some of them do start sounding like a compliance team discovered a thesaurus.\nBut they are useful.\nThe problem is that the words can stay at a comfortable distance from the implementation.\n&ldquo;The agent should only access approved resources&rdquo; sounds fine.\nThen you write the code and realize the approved resource is a path, the path can be relative, the filesystem has its own perks, and your variable names can be a part of the security model.\nThe boundary eventually has to become executable.\nA function has to say yes or no.\nA tool has to reject the request.\nA path has to be normalized before it gets compared.\nThe model can be instructed but the tool has to enforce.\nA prompt is a request and code has to become the wall You can tell an agent, &ldquo;Only read files inside this folder.&rdquo;\nPrompts matter, obviously. Half of the current AI world is people discovering that words have consequences and then pretending this is a new branch of engineering.\nBut the prompt is still a request.\nThe model can follow it, misunderstand it, ignore it in some edge case, or get pulled away from it by some other piece of text. I am not even saying this in a dramatic jailbreak way. Sometimes systems fail because the input is weird, the instruction is vague, or the person using the tool asks for something the builder did not think about.\nThe tool code is where the request becomes a wall.\nThis was less obvious when I was staring at commonpath and asking myself whether I was comparing the actual path the agent would touch or some nice variable that made me feel safe.\nAnd that is the part that is important when it comes to agents.\nA chatbot can be wrong inside the chat window and irritate you. An agent with tools can read files, call APIs, update records, send messages, browse websites, or run commands. The error gets a body. It can move around inside your system and do things.\nSo when people say &ldquo;we added a guardrail&rdquo;, I now have a much more annoying follow up question in my head.\nWhere?\nIn the prompt? In the tool function? In the permissions layer? In the UI? In some policy doc that everyone agrees with and nobody has implemented properly?\nYes, I have become this person.\nAgents make small engineering details matter This also connects to the automation article I have been writing. (haven&rsquo;t published it yet, will do that soon)\nThe more a workflow touches real data and real systems, the less it feels like a productivity trick. Its a small system someone has to understand, trust, maintain, debug, and then maybe apologize for in a Slack thread that begins with &ldquo;quick question.&rdquo;\nAgents make this more important because the path is less fixed.\nA regular script usually has a shape. And it can still break in absurd ways because computers are deeply committed to comedy, but at least you can usually point to the path through the code.\nWith an agent, the path can be looser. It can choose the tool. It can choose the argument. It can read a file and then decide the next thing to inspect. It can call the right function with the wrong target and look completely normal while doing it.\nThat is where boring engineering starts looking less boring.\nPath checks, allowlists, read-only modes, write confirmations, logs, dry runs, smaller scopes, clear errors.\nI used to think of these things as the furniture around the interesting part.\nNow I think they might be the interesting part.\nThe main work needs to be done before the actual code The path check enforces a boundary, but it does not decide the boundary by itself.\nSomeone has to decide what the agent should be allowed to see.\nThe whole project? One folder? Only source files? Hidden files? Logs? .env? Generated files? Test fixtures? A scratch folder where it can make a mess without ruining anything important?\nThe same question comes up with writing access. Reading a file is one thing. Editing it is another. Deleting it is a separate category of &ldquo;please tell me a human approved this before the agent got crazy.&rdquo;\nThis is where the AI governance side and the software engineering side start becoming the same conversation for me.\nA policy can say the agent should only access approved resources. Good. Very adult.\nThen the code has to decide what an approved resource is at 11:37 PM when a user passes ..\/ into a function.\nThat is the gap I am more interested in now.\nThe governance sentence and the code path have to meet somewhere. If they do not meet, the boundary is mostly vibes, and I have distrust of &ldquo;vibes&rdquo; now.\nWhat I learnt here I did not learn that permissions matter. I already knew that.\nIt was more specific than that.\nI started respecting the gap between agreeing with a guardrail and implementing one.\nBefore writing this function, I could say &ldquo;restrict the agent to the working directory&rdquo; and feel like the idea was clear enough. After writing it, I had to care about the exact path being checked, the exact path being used, and the exact point where the tool says no.\nSlightly more irritating. Probably more useful.\nAnd honestly, this is becoming a pattern in how I learn technical things now. The concept makes sense at the top level, then the code makes me pay attention to the small details where my understanding was still fuzzy. I hate this process during the process, obviously, because I am a normal person. But after the tests pass and the confusion goes down a bit, that annoying detail usually becomes the part I remember.\nIn this case, the thing I remember is simple: a guardrail is only as real as the place where the system enforces it.\nThe small things I care about more There are a few questions I now cannot ignore when looking at agents.\nWhat can the agent read?\nWhat can it write?\nWhere is that enforced?\nCan it touch secrets by accident?\nCan it call an external API?\nCan it write somewhere permanent?\nCan I see what tool calls happened?\nCan I run it in a dry-run mode first?\nWhat happens when it asks for something outside scope?\nWho owns the mess if the agent does the wrong thing successfully?\nA lot of software problems happen because the system did exactly what someone allowed it to do. The risky part is not always failure. Sometimes it is success inside a badly thought out boundary.\nThis is why I am starting to like boring controls more than I expected.\nI still like the agent part. I still like the feeling of giving a system tools and watching it do something useful. I am very much the target audience for this stuff, which is maybe why I am also suspicious of it.\nBecause the useful version and the dangerous version can look weirdly similar in the beginning.\nAnyways, the guardrail was just a path check That is the funny thing.\nThe guardrail was tiny. A few lines around abspath, normpath, and commonpath. It made me scrtch my head at variable names longer than I wanted, which is one of the least glamorous ways to spend your learning time.\nAnd still, it changed how I think about this stuff a little.\nAI agent safety often gets discussed through prompts, evals, jailbreaks, model behavior, and governance frameworks. All of that matters. I work around this world, so I know those conversations are necessary.\nBut once an agent gets tools, safety also becomes ordinary software engineering.\nA function decides what the agent can touch. A check decides whether the request goes through. An implementation detail becomes the difference between a boundary and a suggestion.\nNow, I respect the annoying code behind the guardrails a lot more.\n","permalink":"https:\/\/codebynight.dev\/posts\/ai-agent-guardrails-look-simple-until-you-code-them\/","summary":"<p>I have spent the last year working around <a href=\"\/posts\/one-year-ai-security-governance-see-ai-differently\/\">AI security and governance<\/a>, so I already understood the high level idea behind guardrails.<\/p>\n<p>Agents should have boundaries. Tools should have scopes. Read access and write access should mean different things. A system that can touch files, APIs, CRMs, Slack, browsers, or internal docs should probably have a stronger plan than &ldquo;hope it behaves nicely.&rdquo;<\/p>\n<p>Okay, that last sentence already sounds like I am about to sell you a whitepaper.<\/p>","title":"AI Agent Guardrails Look Simple Until You Actually Code Them"},{"content":"I have been using Omarchy for almost a year now.\nAlmost from the day it came out, which is either a sign of curiosity or a sign that I enjoy experiments. Maybe both.\nBefore Omarchy, I was using Omakub for a few months. Before that, I was using Arch as my OS for about two years, along with a Mac because work exists and sadly companies do not run on my Linux feelings.\nSo this is not my first \u201cI installed Arch and now I have opinions\u201d article. Well, technically this is a video that I&rsquo;m turning into an article too since I wanted to share this here as well.\nif you prefer watching the youtube video instead, you can check it out here.\nBut after a year, I think Omarchy has become one of the best things I have done for my learning setup.\nThat sounds dramatic if I say it like a distro review. I do not mean it that way.\nThe useful thing about Omarchy for me is not that it made me better at Linux. It made Linux boring enough that I could use this machine for the thing I actually care about right now: learning and doing.\nI also changed my laptop btw Right before this laptop, I was using an Asus Zephyrus G16.\nIt had a better GPU(RTX 4050) and the processor was bonkers as well, i9 13th gen. It was powerful, beautiful, and slightly too much laptop for how I actually wanted to use this machine.\nNow I am on a smaller machine (14 inch instead of 16) with an Ada 500 GPU, which I mostly keep off. I use it in integrated mode almost all the time through &ldquo;envycontrol&rdquo; because battery matters more to me here than GPU power.\nThat probably sounds like a downgrade on paper.\nIn practice, it made the laptop more useful and I find myself using it more and more, especially moving around the house with the laptop. Which was tough with a 16 inch one which weighed more than 2kg. I know, I know&hellip;first world problems..boohoo, look at me, how difficult my life is with a premium laptop. But it is what it is, so we deal with it and move on.\nAnyways, this one is lighter, smaller, easier to move around with, and the battery backup makes a real difference. I can sit somewhere else, read, code, take notes, play around with an agent workflow, close the lid, come back later, and continue.\nThat portability changed how I treat the machine.\nIt stopped being a powerful Linux laptop that I occasionally used. It became the laptop I reach for when I want to learn something properly.\nI do not use this as my everything machine I use a Mac for work. I have a PC for gaming, which these days I rarely do. This laptop is mostly my learning machine.\nThat separation helped more than I expected. I recently wrapped up my master\u2019s in data science and machine learning. I work as a GTM engineer in AI security and governance. I am trying to get better at backend engineering. I am reading more around systems, AI security, model evaluation, prompt injection, benchmarking, and whatever else falls into the \u201cI probably need to understand this better\u201d category.\nSo this machine has a specific job.\nIt is where I learn Rust. It is where I do boot.dev. It is where I learn via CodeCrafters projects. It is where I read papers, save notes, track effort, run small agents, try workflows, and break things in a way that does not threaten my work machine.\nThat is the difference between a setup and an environment.\nA setup is what you install.\nAn environment is what your machine makes easier to do repeatedly.\nFor me, Omarchy became useful because it helped the second thing happen.\nRust, backend, and asking GPT to not give me the answer A few days ago I started learning Rust through CodeCrafters.\nI did not start by going through syntax in the cleanest possible order. Maybe I should have. I know there is a correct version of this story where I patiently learn the language fundamentals first and only then touch the project.\nThat is not what I did.\nI jumped into the actual project - to build an interpreter in Rust.\nI have gone through Python. I have gone through JavaScript. I play around with APIs anyway. So I wanted to feel the problem first and then let the syntax become annoying in context.\nThe important part is how I use GPT while doing this.\nI do not want it to just give me the answer.\nI set it up as a Socratic teacher. The instruction is basically: do not solve this for me, guide me toward the answer. If I am stuck, give me a direction. If I am missing a concept, explain that concept. But do not turn the whole exercise into copy-paste code scenario. I&rsquo;ve instructed it to not give me the exact answer unless I ask it 7 times, 7th time is the charm basically.\nThis has worked surprisingly well.\nIt is also where having a dedicated learning machine helps. The terminal, editor, browser, notes, and agent workflows all live in the same place. I can be in the middle of a Rust problem, ask for help, save the thing I misunderstood, log the effort, and keep going.\nMy AI agents are useful because they have boundaries I have a couple of agents running on this laptop.\nNone of them are magical \u201cdo my entire life\u201d agents. I am not connecting them to everything I own and hoping that they don&rsquo;t rack up a $100k bill on my account.\nOne of them is more like a life management and effort tracking agent. I tell it what I worked on, and it logs that into Obsidian. I also use that one for general riffing of ideas etc. And since it uses context as well as my Obsidian vault as memory, it has a ton of context and gets me good enough answers.\nFor example, I can say something like:\n\u201cPlease log 20 minutes of coding through boot.dev on functional programming, enums, sum types, and union types.\u201d\nThen it writes that into my effort tracking notes.\nThe key part is that its not connected to email, messaging, or random accounts. I work in AI security and governance, so I am very careful about where I give access and how much access I give.\nThis is probably the most useful change in how I use AI now.\nA year ago, I mostly cared whether an automation worked.\nNow I also care what it can read, what it can write, where the data goes, and how bad the blast radius becomes if I design something stupid.\nObsidian now is the middle layer of this whole system Most of the learning system eventually lands in Obsidian.\nI have effort logs. I have daily notes. I have reading plans. I have research papers linked out to Zotero. I have goals for the next six to nine months. I have project ideas and reading lists that connect to those goals.\nThis is where the second agent, research helps me out.\nThe research agent looks at my current goals and helps me build reading lists around them. Blogs, specific articles, research papers, and the order in which I should read them.\nRight now that includes AI security papers, prompt injection, benchmarking from a red teaming perspective, and computer systems reading because I am also trying to get better at backend and systems programming.\nI do not want the agent to dump the internet into my notes.\nThe useful part is the back and forth with the agent. It helps me narrow the list, connect it to the projects I actually want to build, and decide what is worth reading now versus what can wait.\nThat is where this whole setup feels to me less like a Linux rice and more like a personal learning loop.\nVery glamorous. Basically a bunch of markdown files and anxiety.\nZotero is still boringly good I have been using Zotero for more than two years now, especially through my master\u2019s to go through research papers and e-books that we had access to from the college library.\nI still use it for research papers.\nThe difference is that the paper topics have changed quite a bit now. Earlier it was more data science and machine learning coursework. Now it is more AI security, governance, prompt injection, evaluation, and red teaming.\nObsidian is where I plan and connect things.\nZotero is where I read and manage the papers.\nI like that split. I do not need one tool to become the center of my entire existence.\nThe Linux laptop is just where all of this come together for me.\nBlogwatcher and reading feeds help me avoid random reading I also use Blogwatcher through Hermes.\nThe basic idea is simple: I add blogs I trust or want to follow, and then use the research workflow to help me pick what actually fits my goals.\nFor example, I like the Netflix engineering blog. But I do not want to read things only because they are new. I want to read things that connect to what I am currently trying to understand.\nThe internet is very good at making everything feel urgent. A learning plan should probably resist that a little.\nSo the agent helps me sift through blogs and papers based on my current goals. Computer systems. Backend. AI security. Benchmarking. Red teaming. Workflow automation. The stuff I am trying to build toward over the next few months.\nThis is one of the places where AI is genuinely helpful to me.\nIt does not replace reading.\nIt helps decide what deserves reading.\nI still want local models, but they are not really there yet I have tried running some of this with local models.\nI want that to work. I like local-first tools. I like knowing where the data is going. I like being able to run things without sending every thought to someone else\u2019s server.\nBut the reality is that this machine is limited.\nIt has 32 GB of RAM, which is decent, but the GPU is not the best for larger local agents. I can run smaller things, and I want to experiment more with smaller models, but for now my main research workflow runs on GPT 5.5 and my daily management-style workflow uses a smaller GPT model.\nThat is the current tradeoff. I prefer local when I can.\nI use cloud models when the quality difference is big enough.\nAnd I try to design the workflow so the model only gets the access it needs.\nThat is not perfect security. Obviously. My laptop is not a temple.\nBut it is better than pretending convenience has no cost.\nThe actual Omarchy part is mostly boring, which is a compliment Most of my Omarchy setup is still close to default.\nI use Neovim. I changed some theme things. I played around with borders and animations. I used Mac-like animations for a while, then removed them. I use Aether to modify the theme.\nThe wallpaper comes from Freepik. Aether can extract colors from the wallpaper, so I used that as the base color theme for the desktop.\nFor coding, I use Rose Pine.\nI like the yellows, pinks, and greens. It works for me. I do not have a deep philosophical reason for this. That is more or less my customization story.\nThe funny thing is that the less I obsess over the setup, the more useful the setup becomes.\nI know this is illegal to say on the internet, but at some point the best Linux setup is the one you stop constantly reconfiguring.\nWhat still annoys me about Omarchy The fingerprint scanner is flaky after hibernate.\nMost of the time I hibernate instead of turning the machine off. I restart once in a while because I am still technically a responsible adult, at least in this one specific category.\nBut with Omarchy, or maybe the specific hardware and driver combination, the fingerprint scanner sometimes stops being recognized after hibernate. It says the scanner has been disconnected and it is not a dealbreaker.\nIt is just annoying at times.\nThere are also the local model limitations I mentioned earlier. I want to run more locally, but I cannot pretend this machine is something it is not. The battery-focused integrated GPU life is great for learning and writing.\nThat is fine.\nA learning machine does not need to be the strongest machine I own.\nIt needs to be the machine I actually use.\nYes, I use Arch by the way There is always a weird debate around Omarchy.\nIs it a distro? Is it a script? Are you a real Arch user if you use it? Did you personally compile your breakfast this morning or are you even allowed to open a terminal?\nI do not care that much.\nYes, I use Arch by the way.\nThere. Happy?\nThe reason I like Omarchy is that it gives me a good Arch-based environment without forcing the setup itself to become the main hobby.\nI have done the Arch thing. I have broken things. I have fixed things. I have spent enough time learning from the pain.\nRight now, I want the machine to support a different kind of learning.\nRust. Backend. Systems. AI security. Reading papers. Building workflows. Understanding how agents fit into a real personal system without giving them absurd permissions.\nOmarchy helps me do that.\nThat is enough.\nAfter one year, the OS is not the main character If I had to summarize my one-year review, it would be this:\nOmarchy became useful when it stopped being the thing I was paying attention to.\nThe first layer is the OS.\nThe second layer is the tools: terminal, Neovim, browser, Obsidian, Zotero, Hermes, Blogwatcher, cron jobs, GitHub backups.\nThe third layer is the habit: read, code, log, reflect, adjust, repeat.\nThat third layer is the actual point.\nA Linux setup can easily become a place to perform technical identity. Themes, screenshots, dotfiles, \u201creal user\u201d arguments, all of that.\nI still enjoy the aesthetic side. I like a nice desktop. I like a good editor theme. I am not above caring about how the machine looks.\nBut after a year, the reason I value this setup is much more practical.\nIt has become the machine where I learn.\nAnd I think that is the best compliment I can give an OS.\nIt got out of the way enough for the work to become visible.\n","permalink":"https:\/\/codebynight.dev\/posts\/one-year-omarchy-learning-os-not-just-linux-setup\/","summary":"<p>I have been using Omarchy for almost a year now.<\/p>\n<p>Almost from the day it came out, which is either a sign of curiosity or a sign that I enjoy experiments. Maybe both.<\/p>\n<p>Before Omarchy, I was using Omakub for a few months. Before that, I was using Arch as my OS for about two years, along with a Mac because work exists and sadly companies do not run on my Linux feelings.<\/p>","title":"1 Year of Omarchy as My Learning OS, Not Just My Linux Setup"},{"content":"I have become the annoying person who asks, \u201cCan I run this locally?\u201d\nThis is mainly because after working around AI security and governance for a year, I have started noticing how easily data leaves the systems we understand and enters systems we barely think about.\nI admit that this is a slightly irritating change in my personality.\nA year ago, if I found a tool that helped me automate something, summarize something, enrich some data, or speed up a GTM workflow, my first question was usually: does this work?\nNow I still ask that. Obviously. I still like useful tools. I probably use AI more than I did before, not less.\nBut there is another question I always ask now:\nWait, what did I just give this thing access to?\nOkay, this was dramatic, I usually ask that question before giving it permissions, but that wouldn&rsquo;t make it that dramatic for this blog, so deal with it.\nAnyways, that question is probably the biggest change.\nI still work in marketing and GTM engineering. This is not a \u201cI left marketing and became an engineer\u201d article because that is not true. But over the last year, I have been working in AI security and governance, building more automations, using AI heavily in workflows, and finishing my master\u2019s in data science and machine learning.\nThat combination changed how I look at AI.\nIt did not make me anti-AI. It made me less impressed by the shiny part and more interested in the so called boring (not so boring for me personally though) questions around it.\nWhere is AI being used? What data is going into it? Who approved the tool? What can it access? Is anything being stored? Can we prove what happened later?\nAnnoying questions, basically.\nI thought AI security would be more about security Before working in this space, I assumed a lot more of AI security would look like security in the obvious sense.\nJailbreaks. Prompt injection. Model abuse. Red teaming. Threats. Demos where someone tricks a chatbot into doing something it should not do.\nAll of that exists and it matters.\nBut one thing I did not expect was how much of the work starts before that.\nA lot of the problem is just discovering where AI is being used inside an organization.\nWhich teams are using ChatGPT? Which browser extensions did someone install? Which SaaS tools added AI features without anyone really noticing? Which copilots are approved? Which ones are not? Which internal workflows are sending company data to an LLM? Which AI tools are connected to Slack, Google Drive, GitHub, Salesforce, HubSpot, Notion, or whatever else the company lives inside?\nBefore you secure AI, you have to find it.\nThat sounds obvious now but I do not think I fully understood it earlier. I had the more dramatic version of AI security in my head.\nIn practice, the model is often only one piece of the mess.\nThe inventory work makes a difference because companies cannot govern or secure something that they don&rsquo;t even know is around them. If employees are using AI tools through personal accounts, random extensions, shadow SaaS, or features bundled into tools they already use, then the company\u2019s AI policy might be very neatly written and still completely detached from reality.\nThis was one of my first big understandings.\nAI security is not only about stopping the weird attack.\nSometimes it starts with asking, \u201cWhere is this even happening?\u201d\nThe real adoption story is daily-use AI The riskiest AI use does not always look dramatic.\nMost people are not sitting there thinking, \u201cToday I will violate policy and create a compliance headache.\u201d\nThey are just trying to finish work.\nA marketer asks an LLM to summarize last week\u2019s campaign data.\nA sales rep pastes customer notes into a chatbot to write a cleaner follow-up.\nSomeone uploads a CSV to make a quick report.\nA support person asks for help summarizing tickets.\nA founder throws meeting notes into a tool because the alternative is reading their own handwriting, which is its own separate threat model.\nThe tasks are small. The intent is normal. The output is useful.\nThat is exactly why it spreads.\nThis is also why the governance problem is hard. If AI only showed up in giant, official, expensive enterprise deployments, it would be much easier to track. There would be procurement, review, onboarding, legal, security, some painful spreadsheet somewhere, and at least a chance that someone thought about the risk before the tool went live.\nBut casual AI does not wait for that.\nIt enters through convenience.\nAnd because the action feels small, the risk feels small too.\n\u201cSummarize this.\u201d\n\u201cRewrite this.\u201d\n\u201cMake this into a table.\u201d\n\u201cExtract insights from this data.\u201d\nI hate that last phrase. It sounds like a dashboard trying to become a LinkedIn influencer. But people do this kind of thing all the time.\nIf you work in GTM, this is especially easy to understand. So much of the work is text, data, context, follow-ups, notes, reports, messaging, positioning, experiments, and half-broken processes stitched together with tools that were definitely not designed to love each other.\nAI helps with that.\nSometimes a lot.\nSo I do not look at casual AI usage and think, \u201cWow, people are careless.\u201d\nI think, \u201cYeah, of course they are doing this.\u201d\nGTM teams are exactly where this whole thing scales Working in GTM probably made this easier for me to see.\nGTM teams are often fast adopters of AI because the pain is obvious. There are campaigns to ship, accounts to research, CRM fields to clean, calls to summarize, customer segments to understand, email drafts to write, landing pages to test, competitor pages to read, internal reports to prepare, and 400 tabs open for reasons nobody can fully explain.\nIf a tool saves time, people will try it.\nThis is not a moral failure. It is incentive design.\nMost teams reward speed, output, and responsiveness. If someone can use an AI tool to prepare a report in 15 minutes instead of 2 hours, they are not going to first sit and read the vendor\u2019s retention policy like a monk studying ancient scripture.\nThey will use the tool.\nHonestly, I probably would too, if I had not become this annoying.\nThis is where working close to AI security and governance changed how I see GTM work. It made me more sympathetic to both sides.\nI understand why security and governance teams worry. A normal-looking workflow can involve customer data, sales data, employee data, product usage data, internal strategy, source code, credentials, meeting transcripts, and other things that should not travel into random systems.\nBut I also understand why GTM teams use these tools anyway.\nThe work can get messy with deadlines looming and the tools are helpful. And a lot of AI risk does not announce itself at the moment of use. It is not like the chatbot flashes a giant red warning saying, \u201cBy the way, this might be a compliance problem.\u201d\nIt just gives you a nice summary.\nThat is the trap.\nProductivity feels immediate. Risk feels abstract.\nUntil it is not.\nBuilding automations changed my instincts The biggest mental shift happened when I started building more AI-assisted workflows and automations myself.\nIt is one thing to talk about AI governance as a concept. It is another thing to connect tools together and realize how quickly the permission graph gets weird.\nAn AI tool connected to nothing is mostly a chatbot.\nAn AI tool connected to Slack, email, CRM, docs, storage, internal tools, analytics, and a browser is a very different thing.\nAt that point, the question is not just \u201cis the model good?\u201d\nThe better questions are:\nWhat can this thing read?\nWhat can it write?\nWhere does the data go?\nIs anything stored?\nCan the vendor use this data for training?\nWho else has access?\nWhat happens if the prompt is bad?\nWhat happens if the output is wrong?\nWhat happens if the tool does exactly what I asked, but I asked for the wrong thing?\nA lot of AI risk is not the machine becoming evil. It is the machine being useful in a system where permissions, context, and judgment are already messy.\nThis is why I now find myself choosing local or self-hosted tools more often when I can.\nAgain, this is not a grand philosophy. I am not pretending local-first is always practical or that cloud tools are automatically bad. Sometimes the managed cloud product is clearly the better option. Sometimes self-hosting something is just a cute way to create a new weekend problem for yourself.\nEarlier, I used to think about convenience first.\nNow I think more about control.\nIf I can run something locally, I know more about where the data is going. If I self-host a tool, I can at least reason about the storage, logs, permissions, and access. It does not magically make everything secure. Obviously not. My laptop is not a sacred temple of perfect operational security.\nBut it changes the default.\nAnd defaults matter a lot.\nEspecially with AI, because these tools are hungry for context. The more useful they become, the more we want to connect them to everything.\nSlack. Gmail. Calendar. CRM. Docs. Tickets. Code. Dashboards. Calls. Browsers.\nEach connection makes the tool more useful.\nEach connection also makes the blast radius more interesting. And by interesting, I mean terrifying if you think about it for more than 30 seconds.\nMy ML master\u2019s made the hype harder to trust In parallel with all of this, I was finishing my master\u2019s in data science and machine learning.\nThat changed my AI bullshit detector too.\nBefore studying ML more seriously, I could look at benchmarks and product claims and understand them at a decent surface level. Model A scored higher than Model B. This system performs well on some eval. This tool claims to improve productivity by whatever percent. This agent can do some impressive task in a demo.\nCool.\nBut after spending time with datasets, metrics, model evaluation, probability, optimization, and the general pain of trying to measure things properly, I find these claims harder to accept.\nAnd I do not want to do the lazy contrarian thing where every metric is fake and only vibes are real. That is not serious either.\nBut a benchmark is not the same thing as your workflow.\nA leaderboard score does not tell me what happens when the input is messy, the user is confused, the data is sensitive, the context is incomplete, the output needs judgment, and the system is connected to tools that can actually do things.\nThat is where real work lives.\nThe master\u2019s made me more interested in the evaluation setup.\nWhat was measured?\nWhat was the dataset?\nWhat was excluded?\nWas there leakage?\nDoes the metric match the thing we actually care about?\nWhat does failure look like?\nIs the model wrong in a harmless way or a dangerous way?\nThese questions are not as exciting as \u201cthis model beat humans at X.\u201d\nBut they are better questions.\nAnd once you start asking them, a lot of AI hype starts feeling too smooth.\nThe benchmark claims. The \u201cLLMs will take every job\u201d claims. The \u201cAI agents will make everyone rich\u201d claims.\nI am not saying all of it is fake.\nI am saying I trust it less quickly now.\nWhich is probably healthier.\nJob replacement claims feel..well..you know how they feel The \u201cAI will take all jobs\u201d conversation feels very different when you spend more time around actual workflows.\nI am not saying AI will not change jobs. That would be a ridiculous thing to say. It already is changing work. I use it constantly. I would be lying if I pretended otherwise.\nBut the clean replacement story feels lazy to me now.\nA lot of real work is not one isolated task.\nIt is context, judgment, permissions, incentives, weird internal systems, customer nuance, follow-up, accountability, and knowing when an output is wrong even though it sounds confident.\nIt is also knowing what should not be automated.\nA demo can make a workflow look simple because demos remove the inconvenient parts. No CRM history. No compliance concern. No unclear ownership. No political context. No customer who said one thing on the call and meant something else. No dashboard field that everyone uses differently. No Slack thread where the actual decision happened 47 replies deep.\nReal work has all of that.\nSo when someone says an AI agent will replace an entire role because it can perform a few tasks inside that role, I now get suspicious.\nMaybe it will replace parts of the work.\nMaybe it will compress some workflows.\nMaybe it will make one person much more productive.\nMaybe it will also create new review work, new governance work, new integration work, new failure modes, and new ways for people to confidently ship nonsense faster.\nAll of these can be true at the same time.\nThat is what the extreme takes usually miss.\nAI is useful enough that ignoring it is stupid.\nAI is messy enough that blindly trusting it is also stupid.\nVery annoying middle position. Unfortunately, it keeps being true.\nThe change is in my judgement not my job title I do not want this article to sound like a career transition essay.\nI still work in marketing. I still work in GTM. I am just much closer to engineering, automation, data, and technical workflows than I used to be.\nThat has made my GTM work sharper.\nI understand the product better. I understand customer anxiety better. I understand why security teams care about things that can sound slow or annoying from the outside. I understand why users bypass policies when the approved workflow is painful. I understand why AI governance is not just a policy problem, and not just a technical problem either.\nIt sits in the middle.\nPeople want speed.\nCompanies want control.\nAI tools want context.\nSecurity teams want visibility.\nLegal teams want compliance.\nLeadership wants adoption without a future incident that becomes a very tense meeting.\nAnd users just want the report done before the day ends.\nThat is the actual shape of the problem.\nAfter one year in AI security and governance, I do not think the most useful question is \u201cis AI good or bad?\u201d\nThat question is too big and somehow also not useful enough.\nThe better questions are smaller.\nWhere is AI being used?\nWhat data is going into it?\nWhat can it access?\nWho approved it?\nCan we prove what happened?\nIs the tool actually helping, or did the demo just look good?\nWhat happens when it fails?\nCan I run this locally?\nSee. Annoying.\nBut I think this is where my thinking has changed the most.\nA year ago, I mostly asked, \u201cCan this help me do the work faster?\u201d\nNow I still ask that.\nBut usually a few seconds later:\n\u201cWhat did I just give it access to?\u201d\n","permalink":"https:\/\/codebynight.dev\/posts\/one-year-ai-security-governance-see-ai-differently\/","summary":"<p>I have become the annoying person who asks, \u201cCan I run this locally?\u201d<\/p>\n<p>This is mainly because after working around AI security and governance for a year, I have started noticing how easily data leaves the systems we understand and enters systems we barely think about.<\/p>\n<p>I admit that this is a slightly irritating change in my personality.<\/p>\n<p>A year ago, if I found a tool that helped me automate something, summarize something, enrich some data, or speed up a GTM workflow, my first question was usually: does this work?<\/p>","title":"What One Year in AI Security and Governance Changed About How I See AI"},{"content":"My old churn analysis capstone post has somehow become one of the most popular posts on this blog over the last year.\nI did not expect that.\nAt 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.\nI still think that kind of project is useful. I am not going to diss on my past self just because I now have slightly better words for the problem. That would be annoying.\nBut I do think my framing was incomplete.\nChurn is not really a data science problem. Or at least, not only just a data science problem.\nIt is an operating problem that sometimes needs data science.\nChurn prediction feels like success The tempting thing about churn prediction is that it feels obviously useful.\nIf a business knows which customers are likely to leave, it can save them. Right?\nWell, kind of.\nA churn model can tell you that an account looks risky. It can show which variables move along with churn. It can rank customers by probability. It can give you a dashboard with red, yellow, and green labels, and suddenly everyone feels like the company has become more serious about retention.\nBut then someone asks the next question.\nNow what?\nWho sees the signal? Sales? Customer success? Product? Support? The founder? Some tableau dashboard that nobody opens after the first week?\nWhat action do they take? Send an email? Schedule a call? Offer a discount? Fix onboarding? Escalate a bug? Do nothing because the account is too small?\nWhen do they act? Immediately? After two bad weeks? Before renewal? After the customer has already emotionally left but is still technically paying?\nAnd how do we know whether the action helped?\nThis is where this churn work starts getting awkward. The model is treated like the finished thing, when it is usually just one piece of a much larger retention workflow.\nA churn score without someone responsible for acting on it is as useless as the tiny pocket inside the big pocket in your jeans.\nCustomers are not rows The other thing I understand better now is that churn is usually a story before it becomes a label.\nIn a dataset, the customer is a row. There is tenure, spend, complaint count, login frequency, payment method, maybe some product usage events. Then there is a target column: churned or not churned.\nThat structure is useful because models need structure. But it hides the main thing.\nA customer may churn because onboarding was weak. Or because sales promised something the product did not really do. Or because the product solved a problem, but not a painful enough problem. Or because the champion left the company. Or because support was slow at exactly the wrong moment. Or because the buyer and the actual user were two different people living in two different realities.\nNone of this fits cleanly into a CSV.\nYou may see clues. Low usage after signup. No teammates invited. No integration connected. Too many support tickets. No return session after the first week. A renewal date coming up with no real engagement.\nBut the clue is not the story.\nI am stressing on this because if you only think in rows, churn becomes a classification exercise. The customer becomes a probability. The business problem becomes a metric. The useful question, which is &ldquo;what would actually help this customer succeed?&rdquo;, gets pushed.\nAnd by then it is often too late.\nThe better question is earlier If I were thinking about churn today, I would not start with &ldquo;who is going to churn?&rdquo;\nI would start with something earlier and more irritating:\nWhat does a healthy customer look like before everyone agrees they are healthy?\nThat question will change how we approach the &ldquo;hey, we need a churn prediction model because retention is cheaper than acquisition&rdquo; statement.\nInstead of waiting for late churn signals, you start looking for early success signals. Did the customer reach the first useful moment? Did they repeat the workflow? Did they invite other users? Did they connect the integration that makes the product harder to remove? Did they move from curiosity to habit?\nThis is where my current GTM engineering brain gets more interested than my old data science student brain.\nThe useful work should beyond modeling churn. It would mean building the pipes around retention:\nproduct events that capture actual usage instead of vanity metrics CRM fields that show lifecycle stage and customer context health scores that combine usage, support, commercial, and onboarding signals alerts that go to the right person instead of rotting in a dashboard playbooks that say what action to take feedback loops that track whether the action worked Some of this can use machine learning. Some of it can be simple rules. Some of it is just getting the data model and ownership right.\nHonestly, a boring rule-based setup with clear ownership might beat a fancy churn model that nobody acts on.\nFrom churn model to retention workflow A useful retention workflow has more moving parts than a model.\nIt needs signals from product usage, support, CRM, billing, and sometimes plain human notes. It needs some way to decide whether those signals mean &ldquo;healthy&rdquo;, &ldquo;needs attention&rdquo;, or &ldquo;something is off here.&rdquo; It needs routing, because &ldquo;this account is at risk&rdquo; is not useful unless someone owns the next step. It needs actual interventions, because prediction without action is just business astrology with nicer charts.\nAnd then it needs measurement.\nDid the customer come back? Did they activate? Did the support issue get resolved? Did the expansion conversation happen? Did the intervention reduce risk or just create more noise for the team?\nThe feedback loop is the part I did not appreciate enough earlier.\nIn project mode, evaluation usually means model metrics. Accuracy, recall, precision, ROC-AUC, F1, whatever makes sense for the dataset. These matter. Especially with churn, where class imbalance can make accuracy look way better than it deserves to look.\nBut in business mode, evaluation also means boring operational questions.\nDid the alert reach the right person? Did they trust it? Did they act? Was the action useful? Did anything about the customer change after that? Did the team learn anything when the system was wrong?\nChurn systems can be wrong in expensive ways. They can waste customer success time. They can annoy healthy customers. They can miss quiet accounts that are on their way to churn. They can overreact to loud signals like complaints and miss silence, which is sometimes the scarier signal.\nThe model is not the system. The system is what people and tools do around the model.\nThis is also why AI systems make me more suspicious now I think working around AI security and governance has made me more sensitive to this pattern.\nA lot of bad AI and data work treats prediction as the finished product. The system produces a score, label, summary, recommendation, or risk rating, and everyone pretends the hard part is done.\nBut the hard part usually starts after the output.\nWho is responsible for it? What context is missing? What happens when the system is wrong? Can a human override it? Is anyone checking what happened after the action was taken? Does the team understand the assumptions, or are they just trusting a clean-looking number because it came from a model?\nChurn is a nice example because the business problem is easy to understand. Customers leaving is bad. Keeping good customers is good. No need to make this sound deeper than it is.\nBut the simplicity is also a trap. It makes you think the goal is to predict churn, when the real goal is to help the right customers succeed early enough that churn becomes less likely in the first place.\nThat is a very different problem.\nWhat I believe now I still think churn analysis is a good data science project. Maybe that is why people keep finding my old post. It has clean ingredients and teaches useful things: exploratory analysis, feature engineering, class imbalance, model evaluation, segmentation, and business interpretation.\nI would still recommend it to someone learning data science.\nI would just add a warning label now.\nDo not confuse the project shape with the real problem.\nIf I were approaching churn today, I would spend less time asking which algorithm predicts churn best and more time asking:\nWhat does success look like for this customer? What signals tell us they are drifting away? Who sees those signals? What action do they take? How do we know if that action helped? The model can still matter. I am not saying otherwise.\nBut churn is not solved when a notebook prints a score. It is not solved when a dashboard goes live. It is not solved when the CMO under the pressure of CEO says &ldquo;we should do proactive retention&rdquo; in a meeting and everyone nods like that sentence means anything by itself.\nIt becomes useful when the business can notice risk, understand what is happening, act at the right time, and learn from the result.\nThat is the part I did not understand properly one year ago. Well, I technically did since I&rsquo;ve been working in marketing but because I had been in a student&rsquo;s project mindeset I did not weight these parts properly.\nChurn is not a data science problem. It is a retention workflow problem disguised as a prediction problem.\n","permalink":"https:\/\/codebynight.dev\/posts\/churn-is-not-a-data-science-problem\/","summary":"<p>My old churn analysis capstone post has somehow become one of the most popular posts on this blog over the last year.<\/p>\n<p>I did not expect that.<\/p>\n<p>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.<\/p>","title":"Churn Is Not a Data Science Problem"},{"content":"I finished my data science and machine learning master\u2019s 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.\nI 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\u2019s while working full time is not exactly what I would call a chill hobby.\nBut the main feeling is a bit weirder than that.\nI feel more confident with AI now. More confident with tech in general, actually. I understand more of what is going on under the hood, and I feel less intimidated by systems I do not fully understand yet.\nAt the same time, I trust AI hype way less than I did before. Maybe some of this also comes from me working in AI Security &amp; Governance and seeing the cluster &ldquo;you know&rdquo; of whatever is happening with AI and LLMs in particular across the world.\nThe degree did not make me anti-AI but made me less patient with stupid and vague AI claims. There is a difference.\nBefore the math, AI was easier to mythologize (is this a real word?) AI is very easy to talk about at the surface. Intelligence. Reasoning. Agents. Autonomy. Disruption. All the usual youtuber, linkedin creator words.\nOkay, I agree some of these words are useful. Some are abused so badly that they almost stop meaning anything. The problem is that when you do not understand the mechanism, the empty space gets filled with vibes. See what I did there? &ldquo;Vibes, as in vibe coding&hellip;as in when you don&rsquo;t understand what is going on&rdquo;\nOkay! I need to stop explaining my jokes.\nAnyways, a demo looks impressive, so the system must be intelligent. A chatbot gives a confident answer, so it must know what it is saying. A model performs well on some benchmark, so the product must be reliable.\nI am not saying I believed all of this blindly. But before going deeper into ML, it was easier to stay at that layer. You can talk about AI products, use cases, workflows, productivity, risk, governance, all of that, without really touching what is happening underneath.\nThe master\u2019s kept dragging me below that layer.\nSometimes willingly. Sometimes very unwillingly. Definitely on the weekend 9AM classes!\nDoing the operations by hand changes something One of the hardest modules for me was Math for AI. It was also probably one of the most useful.\nThere is something genuinely insane about calculating tiny parts of AI systems by hand. Multiplying matrices, working through gradients, following transformations, calculating probabilities like its 10,000 BC and trying to understand how an error turns into an update.\nThen you see that real systems do this at a scale that makes your notebook look like a crayon drawing of a 1 year old.\nIn the moment, it can feel stupidly slow. Like, why am I doing this by hand when libraries exist? Why am I spending this much time on operations that NumPy can do before I finish blinking?\nBut the slowness is the point.\nWhen you calculate it yourself, the abstraction gets taken away a little. Not fully. I am not pretending one math module makes modern AI transparent. But something does fundamentally change in your mind.\nA model stops being one blob called &ldquo;AI&rdquo; and starts getting turned into different pieces fit together with potato glue.\nVectors. Matrices. Parameters. Loss. Gradients. Optimization. Probability. Approximation. Error.\nThe words are not just words anymore. You have suffered through them a bit. That matters.\nMatrix operations made it easier for me to understand how messy real world inputs become numerical structure. Gradients made the idea of machine learning feel less mystical. Probability tells me that a model output is not the whole truth, even if the UI makes it look clean and authoritative.\nI think this is one of those boring forms of confidence that only comes after hours of slogging. And I wouldn&rsquo;t have gotten that without doing all of this stuff by hand.\nConfidence came from seeing the knobs This is probably the biggest change for me. I do realize that this heading feels so AI written. But go with me here for a second please.\nI feel more confident playing around with AI systems now. I do not think I have mastered them. I definitely have not. But I have a better sense of where to poke.\nWhen something behaves the way it shouldn&rsquo;t, I do not immediately file it under &ldquo;AI is weird.&rdquo;\nI can ask better questions now.\nIs this a data issue? Is the metric the truth or just truthy? Is the model overfitting? Is the prompt hiding the actual problem? Is the evaluation setup too convenient? Is the system failing because the input distribution changed? Am I treating a probability as if it is a fact?\nNone of these questions are magical. They are basic, almost annoying if oyu ask me. But that is exactly why they are useful.\nA lot of AI work becomes less confusing when you stop asking whether the system is smart and start asking what happened to the data, the objective, the evaluation, and the assumptions.\nThis has made me more willing to experiment too.\nEarlier, experimenting with models or AI tools could sometimes feel like poking a black box and hoping something interesting happened. Now it feels more like working with a machine whose inner working I partially know about.\nThe AI hype gets harder to trust The more I learned, the less patience I had for claims that treat AI like a magic capability blob.\n&ldquo;AI can do X&rdquo; is not enough.\nUnder what conditions? On what data? With what evaluation? Compared to what baseline? What happens when the input is messy? What happens when the user is adversarial? What happens when the model is uncertain but the interface still sounds confident?\nIt is not that the technology is unimpressive. A lot of it is ridiculously impressive. If anything, studying ML made me respect the field more because I have a better sense of how much work gets done behind a clean interface.\nBut the same understanding makes vague claims harder to accept.\nWhen someone says a model is accurate, I want to know what accuracy means in that context. When someone says an AI system is safe, I want to know safe against what. When someone says an agent can automate a workflow, I want to know what happens when it sees something unexpected, sensitive, malicious, or just badly formatted.\nThis is not cynicism. At least I do not think it is.\nIt is just harder to be casually impressed once you have spent enough time with assumptions, metrics, messy datasets, and failure modes.\nThis matters more in governance than I expected I am not picking up a core data science career right now.\nThat used to make me wonder, at least a little, if I was moving away from the obvious path. You do a data science and machine learning degree, so the clean narrative is that you become a data scientist or ML engineer.\nMy work is closer to AI security and governance and as a GTM engineer as of now.\nBut honestly, that is exactly where the degree helps.\nA lot of governance language sounds clean until it touches an actual system. Risk. Safety. Robustness. Fairness. Explainability. Controls. Monitoring. Audits.\nAll good words. And necessary.\nAlso very easy to turn into checkbox dance if nobody understands what the system is doing.\nTechnical intuition changes the conversation. It helps you ask whether a control means anything. It helps you separate a real mitigation from a nice sentence in a policy document. It helps you question vendor claims without sounding like you are objecting for the sake of objecting.\nThis matters a lot in AI security too.\nIf a model can leak sensitive data, be manipulated through prompts, produce unsafe outputs, or behave differently under distribution shift, those are not just abstract governance concerns. They are technical problems with business consequences.\nThe math does not solve those problems by itself. But it gives me a better nose for them.\nAnd in my daily job, that is useful. I can ask sharper questions. I can spot when a claim is too clean.\nThat last one might be the most useful skill of all.\nThe value may show up sideways I used to think the value of an ML degree would be very direct.\nYou study ML, then you do ML work. Clean pipeline. Nice and simple.\nReal life is messier. And no I will not explain this joke like earlier.\nThe degree gave me technical depth, but its value is showing up in places I did not fully expect. It shows up when I read about a new AI system and do not immediately get hyped up by the demo. It shows up when I am thinking about risk. It shows up when I am trying to understand whether a metric is meaningful.\nIt also shows up in how I learn.\nGoing deeper into the math made me less scared of difficult technical material. That is a big deal for me. If I could survive hand calculating parts of AI systems, I can probably survive a dense systems book, a weird paper.\nI am exaggerating slightly, but only slightly.\nIf someone is starting a similar degree now, I would probably tell them this: do not stay only at the API layer. Learn the math enough to remove some of the magic. Build enough things so the math has somewhere to live. And do not judge the value of the degree only by whether your job title says data scientist at the end.\nThe knowledge can be useful in a sideways way.\nSometimes that is the best kind.\nLess magical, more useful So that is where I am a week after finishing.\nMore confident with AI, but less trusting of vague AI claims.\nMore impressed by the engineering and math behind the systems, but more annoyed when people talk about them like magic objects.\nMore willing to experiment, but less willing to accept a clean demo as proof of anything serious.\nI think that is a good trade.\nThe degree made AI feel less magical to me. That sounds like it should make the field less exciting, but it has had the opposite effect. It feels more usable now. More like something I can question, test, break, understand a little better, and then use with better judgment.\nI do not want to be the person who believes every impressive demo.\nI also do not want to become the person who dismisses useful technology just because the hype around it is annoying.\nSomewhere between those two is probably a healthier place to be.\nFor now, I think the biggest win from the degree is simple: I know how to ask better questions.\nThat feels like a decent place to start.\n","permalink":"https:\/\/codebynight.dev\/posts\/ml-masters-made-ai-less-magical-hype-harder-to-trust\/","summary":"<p>I finished my data science and machine learning master\u2019s 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.<\/p>\n<p>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\u2019s while working full time is not exactly what I would call a chill hobby.<\/p>","title":"My Machine Learning master\u2019s degree made AI feel less magical, and the hype harder to trust"},{"content":"So I was watching a video from this creator I follow and something felt off about it. His lips weren&rsquo;t syncing right. Not a huge thing, but enough that I noticed. So I went and checked his profile.\nTurns out he hadn&rsquo;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&rsquo;m not totally sure which tool.\nAnyways, I wasn&rsquo;t sure if it was just me being weird about it, so I went on Reddit. Lots of people had noticed the exact same thing, and nobody was impressed. It was the opposite. Which is interesting because you&rsquo;d think AI avatars are the kind of thing that sneak past people if they&rsquo;re done well. They don&rsquo;t.\nPlus, if you actually think about what an AI avatar is doing, it&rsquo;s just delivering information with a face on it. Which is fine. But if all you want is info delivered, you can ask Claude directly and save yourself the trouble. The whole point of watching a person is the person. The weird pauses, the off-script stuff, the moments they react to what they just said. That&rsquo;s the thing automation can&rsquo;t fake.\nSo yeah. Automation is bad at presence and trust. It&rsquo;s genuinely good at a lot of other stuff though, which is kind of the point of this post.\nWhat actually is worth automating I think people undersell how much of marketing can actually be automated. A big chunk of it honestly. Data collection, report building, pointing out insights that your dashboards don&rsquo;t flag on their own. The first research pass on a piece of content. First drafts and outlines, if you&rsquo;ve built the workflow and prompts properly.\nThe time you get back from that stuff can make a difference. I&rsquo;ve felt it in my own work.\nBut there&rsquo;s a catch I&rsquo;ve hit enough times to just treat as a rule now. Human in the loop is non-negotiable. If you try to fully automate output, it looks fine for a week and then it starts drifting in ways you don&rsquo;t catch until someone points it out. The workflow does the monkey work, you do the judgment. That&rsquo;s the plan. I ran into the code version of this later while building a tiny AI-agent guardrail: a prompt can ask nicely, but the boundary still has to exist in code.\nMy stack is tools like Clay, n8n, Claude and others in between. And tbh Claude&rsquo;s built-in connectors are underrated. A lot of things people assume need a custom n8n flow can be handled through Claude directly, which saves you a weekend. But some things really do need a proper custom flow and knowing which is which mostly comes from having built a few things and broken them.\nWhere people mess this up The biggest mistake I see, and one I&rsquo;ve made myself, is going into a build without any plan. You don&rsquo;t think about who&rsquo;s actually going to use it, what the usual failures are going to be, what happens when a node dies. You just start building. And you end up with something that has bad UX even as an internal tool, which means nobody uses it. Ten hours in the trash.\nThe other thing is just the technical side. Timeouts are really common, especially with AI nodes doing deep research. The node hangs, times out, flow dies. Connector issues are common too, and those get tough to handle fast if you don&rsquo;t have any engineering background to fall back on. Which is sort of why I think this whole role is changing.\nAlso, and I wish someone had told me this earlier, you don&rsquo;t always need to build the thing. There are tons of tools out there at like $20 a month and a lot of them already solved the UX problem you&rsquo;re about to spend a weekend on. Try one first. Get a feel for what good automation is supposed to look like. Then decide if your own version is worth building. Sometimes it is. A lot of the time it isn&rsquo;t. The rabbit hole of building stuff you didn&rsquo;t need to build takes its toll.\nMarketers are becoming engineers I think marketers are becoming more like engineers and I think that&rsquo;s correct. Not software engineers. But enough technical chops to build things, debug things, read an error message, understand what an API actually does. And of course, because this is marketing, combined with the creative side and the communication side.\nFunny thing is, this shift has been happening for like 7-8 years already. It&rsquo;s not an AI thing. AI is just making the gap show up faster and more obvious. The marketers who were already comfortable with tools and workflows, who already got their hands dirty, are finding this pretty manageable. The ones who weren&rsquo;t are having a harder time.\nI know the hype is a lot and being skeptical is reasonable. CEOs of companies wanting more and more investor money will say their tool is revolutionary. That&rsquo;s just how it is. But the time savings on specific things like manual research, report prep, first drafts, that stuff actually makes a difference. I&rsquo;ve felt it.\nIf you&rsquo;re skeptical and you actually want to test it rather than just sit outside and have opinions, spend 15 or 20 minutes building one tiny workflow for something repetitive you already do. Run it for two months. Iterate. Don&rsquo;t expect a single prompt to give you a finished answer, that&rsquo;s not how any of this works. The ones that work got built and tuned over time.\nHonestly I think this is more interesting work than marketing was five years ago. Less powerpoint. More actual building. I&rsquo;ll take it.\n","permalink":"https:\/\/codebynight.dev\/posts\/marketers-must-become-engineers\/","summary":"<p>So I was watching a video from this creator I follow and something felt off about it. His lips weren&rsquo;t syncing right. Not a huge thing, but enough that I noticed. So I went and checked his profile.<\/p>\n<p>Turns out he hadn&rsquo;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&rsquo;m not totally sure which tool.<\/p>","title":"Marketers Must Evolve Into Marketing Engineers To Survive The AI World"},{"content":"AI Browsers Are Here. But Should You Trust Them? Everyone\u2019s racing to launch their own browser. It&rsquo;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\u2019re trying to become assistants, agents and interfaces you talk to and not just a browser.\nThey can summarize articles, manage tabs, draft replies, even carry out tasks across multiple sites. On paper, this sounds like a dream, the future of browsing. But in reality, the tech as of today is flawed. If you care about privacy, security, or even just having a basic level of control over your browser, you should probably stay away for a bit.\nThe Pitch AI browsers aim to make the internet smarter and less tedious. Instead of copying content into ChatGPT, you can talk directly to your browser tab. Ask for a summary, clean up a draft email, compare products and even tell it to \u201cfind me flights and book a hotel\u201d and it\u2019ll try to follow through.\nAtlas, for example, embeds ChatGPT in every tab. It can read the current page, access your open tabs, and even act on your logged-in sessions if you allow it. The assistant becomes part of your browsing environment able to help in context. In theory, this makes research, shopping, form-filling, and task automation easier. The browser turns into a workspace with built-in help.\nIn some ways, it works. In others, it\u2019s dangerously premature.\nThe Problems (As of today) Prompt Injection Is a Big Deal AI browsers are vulnerable to a simple but dangerous trick: prompt injection. Malicious sites can embed hidden instructions in text, links, or even images. The browser&rsquo;s AI reads these and interprets them as trusted commands.\nSecurity researchers have already been talking about prompt injection at length. A web page can include invisible text that tells the browser to visit another site, download files, or even issue commands inside your email or cloud drive. One demo tricked Atlas into executing commands from a fake URL in the address bar. Others used hidden inputs to redirect users or steal login sessions.\nOnce the AI agent starts acting on your behalf with your credentials the usual browser security rules no longer apply, right?\nPrivacy? What Privacy? By design, these browsers process everything you do. They read the pages you open, they can access the text you type into forms. Some keep a memory of your activity to personalize future responses.\nUnless you explicitly opt out, your web behavior is constantly being parsed and stored. That includes things like which sites you visit, what you click, and what\u2019s inside your emails or docs if the AI is active there. Companies say this is for your benefit, for smarter context, better answers but it\u2019s also a privacy blunder. Especially if you don\u2019t know what\u2019s being stored, where, or for how long.\nIn one actual incident, a user was able to trick Comet into leaking email and calendar data stored in the browser\u2019s memory all through a single prompt. No malware. No downloads. No nothing.\nYou\u2019re No Longer in Control Traditional browsers are built on a simple principle: you click, it acts. With AI browsers, a lot happens invisibly. The assistant might read a page, click a link, follow an action without any clear signal to the user.\nThere\u2019s no activity log and even no audit trail that&rsquo;s easily accessible to the user. Sometimes no confirmation prompt. That means if something goes wrong, you may not even realize it until it\u2019s too late.\nWorse, in early versions of Comet and Atlas, the assistant could pull data from logged-in sessions or perform cross-site actions without explicit approval. Even with updates and toggles, this is a serious gap in transparency and control.\nThe Tech Just Isn\u2019t Ready Even the creators admit it. OpenAI\u2019s own security head called prompt injection an \u201cunsolved frontier.\u201d Perplexity has similar concerns. Security researchers from Brave, NeuralTrust, and LayerX have also flagged major issues.\nSome IT teams are now advising companies to block AI browsers entirely. Especially for employees who handle customer data, financial systems, or sensitive IP. The features might be interesting for a couple minutes, but they\u2019re not safe enough to trust.\nWhat You Can Do (For Now) If you\u2019re still tempted to try an AI browser, use at your own risk, be smart. Don\u2019t connect it to your primary accounts. Don\u2019t let it access work tools or confidential data. Turn off memory and agent modes if they\u2019re optional. Treat it like a prototype because that\u2019s what it is.\nFinal Thought AI browsers aren\u2019t a bad idea. They\u2019re just early. Too early. The save 2 minutes productivity pitch can be tempting but the cost in terms of privacy, security, and trust is too high today.\nUntil these tools are built with better safeguards, better transparency, and real protections against manipulation, they don\u2019t belong in serious daily workflows.\nUse at your own risk. Or better yet, wait it out.\n","permalink":"https:\/\/codebynight.dev\/posts\/why-you-should-not-use-an-ai-browser-today\/","summary":"<h2 id=\"ai-browsers-are-here-but-should-you-trust-them\">AI Browsers Are Here. But Should You Trust Them?<\/h2>\n<p>Everyone\u2019s racing to launch their own browser. It&rsquo;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\u2019re trying to become assistants, agents and interfaces you talk to and not just a browser.<\/p>","title":"Why You Should NOT Use an AI Browser Today"},{"content":"Why I\u2019m Picking Up the Math Now I come from product &amp; growth marketing and I&rsquo;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\u2019re building it for.\nI\u2019m 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\u2019re lying.\nSo I\u2019ve been slowly going back to the math behind machine learning, and I&rsquo;m using pencil and paper.\nRight now I\u2019m working through:\nAn Introduction to Statistical Learning with Python The Elements of Statistical Learning Practical Statistics for Data Scientists Statistical Inference by Casella and Berger Books by David Spiegelhalter on probability and risk Most nights it\u2019s a couple pages, and then on the weekends the goal is to go through a chapter. Sometimes I try to rework a proof. Other times I just sit with a concept until it clicks.\nThis all started a few months ago. I was reviewing a machine learning pipeline for a core project I was working on in my coursework for the masters.\nSomething felt off. We looked closer and found a classic problem: the test set wasn\u2019t independent. Some data leakage had slipped through. A simple mistake, but it went unnoticed because everyone trusted the dashboard.\nI&rsquo;m not sure it connects with the math directly but I simply realized something then: I don\u2019t want to just look at a number and assume it\u2019s right. I want to know how it was calculated. I want to be able to ask: What assumptions are baked in here? What might we be missing?\nPatterns I Keep Seeing Once I noticed that example, I started spotting similar issues elsewhere. Misused p-values. Confusing correlation for causation. Overconfident interpretations of model metrics.\nThe problem for me is abstraction. I&rsquo;ve seen most people though are happy with this abstraction. It makes life easier. Tools do a lot for us, and that makes it easy to forget what\u2019s under the hood. But if you\u2019re working around machine learning, even indirectly, you need to understand enough to catch the gaps. Otherwise, you\u2019re just repeating what the model tells you whether it\u2019s right or not.\nWhat I\u2019m Studying and Why ISL with Python is helping me rebuild intuition especially around linear models, decision trees, and basic inference.\nESL is more in-depth. I\u2019m taking it slow, but it\u2019s already helped me see regularization and overfitting much better.\nPractical Statistics for Data Scientists is a quick bridge between acedemia and real-world decisions.\nCasella and Berger is dense for me, but helpful when I want to understand things like confidence intervals or hypothesis testing more deeply.\nSpiegelhalter\u2019s books are a good reminder that statistics is about making sense of uncertainty not just running calculations.\nNone of this is just for theory. This helps me in my reports, how I explain metrics, how I think about risk when I&rsquo;m explaining an AI security issue for my product marketing work even.\nWhy I Think This Isn\u2019t Optional Anymore You don\u2019t need to be a statistician to work in AI. But if you\u2019re involved in shaping products, guiding strategy, or explaining ML systems to customers, in my opinion the math matters. You need to know when something feels off. You need to be able to ask questions that go beyond the surface.\nThe more AI gets abstracted, the more valuable it is to understand what\u2019s behind the abstraction. That\u2019s where better decisions get made and that\u2019s how trust is earned from your team, your users, and your leadership.\nIf you work in product, marketing, or data and AI is part of your world carve out some time for the fundamentals. It won\u2019t feel urgent. But it\u2019ll pay off. In how you speak, in how you think and in the quality of the questions you ask.\nThis post is part of my ongoing journey into data science, machine learning, and AI engineering. You can follow along here on Code by Night.\n","permalink":"https:\/\/codebynight.dev\/posts\/you-cant-lead-in-ai-if-you-dont-understand-the-math\/","summary":"<h2 id=\"why-im-picking-up-the-math-now\">Why I\u2019m Picking Up the Math Now<\/h2>\n<p>I come from product &amp; growth marketing and I&rsquo;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\u2019re building it for.<\/p>\n<p>I\u2019m 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\u2019re lying.<\/p>","title":"You Can\u2019t Lead in AI If You Don\u2019t Understand the Math"},{"content":"When Copy\u2011Paste Stops Working In marketing, we live and die by templates. Landing page templates. Ad copy frameworks. Campaign recipes. Machine learning wouldn\u2019t be that different, right? Just plug in your dataset, borrow someone\u2019s notebook from Kaggle, tweak a few parameters, and be done with it.\nThat\u2019s how a lot of people approach it. And to be fair, it kind of works, until it doesn\u2019t. You get a model that runs, a prediction that looks reasonable, a chart that impresses in a meeting. But under the surface, there&rsquo;s often a gap. You don\u2019t really know what\u2019s going on.\nIt\u2019s like using a microwave without understanding how it heats food. You press buttons. It beeps. Something comes out hot. But if it breaks or if you need it to do something different, you\u2019re stuck.\nThat\u2019s the part I couldn\u2019t accept. I don\u2019t want to be a microwave user. I want to be the person who understands how it works.\nWhy I\u2019m Going Back to Basics I\u2019ve finished my first year of a master\u2019s in data science. A lot of it was applied\u2014building models, using libraries, working on projects. Some of it coverd math. Enough to get by.\nBut now I\u2019m in the second year. And I want to go deeper. Not just because it\u2019ll make me a better engineer, but because I don\u2019t like the feeling of bluffing my way through a concept I barely understand.\nI\u2019ve started spending time each day revisiting the fundamentals. Reading slowly. Solving problems. Writing code from scratch.\nThe two books guiding me right now are:\nIntroduction to Statistical Learning with Python \u2014 clear, practical, and great for intuition. Mathematics for Machine Learning \u2014 a bit heavier, but it\u2019s giving me the tools I skipped over before: linear algebra, calculus, and probability. It\u2019s not fast, but it\u2019s already changing how I think about problems. By the end of the master\u2019s, I could see more clearly why that slower work made AI feel less magical and the hype harder to trust.\nFrom Marketer to ML Engineer This is more like building a bridge between two worlds.\nMarketing taught me how to spot patterns, think about behavior, and tell a story around data. Machine learning gives me the tools to dig deeper into those patterns\u2014to test them, model them, and make them more than just gut instinct.\nUnderstanding the mechanics matters. I want to be able to write a function and know exactly what it\u2019s doing. Not just trust the output, but trace it. Break it. Fix it.\nThat mindset is shaping how I approach AI, too. Instead of relying on GPT like a magic box, I\u2019m starting to study RAGs, embeddings, and the actual architecture behind language models. It also became much more practical after a year working around AI security and governance.\nWhat This Looks Like (So Far) Here\u2019s the learning path I\u2019m setting up right now:\nRevisiting the math: linear algebra, probability, and calculus, using Mathematics for Machine Learning Applying it to ML: working through ISLR with Python, doing the coding exercises by hand Building basic models from scratch\u2014linear regression, logistic regression, simple neural nets Exploring the foundations of modern AI: transformers, vector search, RAG systems This is a long haul effort. I\u2019m not sprinting. I\u2019m building something I can stand on.\nIf You\u2019re on a Similar Path If you came from a non-technical background and now find yourself deep in machine learning: hi, I know how disorienting it can be. Everyone around you seems to speak fluent numpy and think in eigenvectors.\nYou don\u2019t need to fake it. You can build your way in. That\u2019s what I\u2019m doing right now.\nI\u2019ve got one year of a data science master\u2019s behind me. A couple months into the second. Some foundations are there. But I want more. I want to go beyond the surface. That\u2019s why I\u2019m relearning the math. Writing code by hand. Slowing things down so I actually understand what I\u2019m building.\n","permalink":"https:\/\/codebynight.dev\/posts\/from-copy-paste-to-first-principles-of-machine-learning\/","summary":"<h2 id=\"when-copypaste-stops-working\">When Copy\u2011Paste Stops Working<\/h2>\n<p>In marketing, we live and die by templates. Landing page templates. Ad copy frameworks. Campaign recipes. Machine learning wouldn\u2019t be that different, right? Just plug in your dataset, borrow someone\u2019s notebook from Kaggle, tweak a few parameters, and be done with it.<\/p>\n<p>That\u2019s how a lot of people approach it. And to be fair, it kind of works, until it doesn\u2019t. You get a model that runs, a prediction that looks reasonable, a chart that impresses in a meeting. But under the surface, there&rsquo;s often a gap. You don\u2019t really <em>know<\/em> what\u2019s going on.<\/p>","title":"From Copy\u2011Paste to First Principles of Machine Learning"},{"content":"K-Means++ is a clever upgrade to K-Means that fixes its biggest flaw: random initialization.\nInstead of picking all k centroids at random, K-Means++:\nPicks 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:\nFaster convergence Better clustering quality Fewer bad runs \ud83d\udcd0 Theoretical Works Let:\nj_opt = the optimal value of the K-Means objective function j_init = the expected value after K-Means++ initialization Then:\nE[j_init] \u2264 8(log k + 2) \u00b7 j_opt\nThis means K-Means++ gives a solution not too far from what we would like and of coruse far better than random seeding.\nFor the full math, read &ldquo;k-means++: The Advantages of Careful Seeding&rdquo; by Arthur and Vassilvitskii (2007).\nIf you&rsquo;re clustering anything important try and skip random. Start with ++ and then see where it takes you.\n","permalink":"https:\/\/codebynight.dev\/posts\/kmeans-vs-kmeans++-better-centroid-initialization\/","summary":"<p>K-Means++ is a clever upgrade to K-Means that fixes its biggest flaw: random initialization.<\/p>\n<p>Instead of picking all <em>k<\/em> centroids at random, K-Means++:<\/p>\n<ol>\n<li>Picks the first centroid randomly from the data points.<\/li>\n<li>For each remaining point ( x ), compute its shortest distance ( D(x) ) to the nearest chosen centroid.<\/li>\n<li>Choose the next centroid from the dataset with probability proportional to ( D(x)^2 ).<\/li>\n<li>Repeat until ( k ) centroids are selected.<\/li>\n<\/ol>\n<p>This spreads centroids out more effectively and leads to:<\/p>","title":"K-Means vs K-Means++: Smarter Centroids, Better Clusters"},{"content":"So, the idea for this came from a chat I had with Dhruv, the CEO of Middleware.\nHe pointed out that I should think of myself as a &lsquo;builder-marketer,&rsquo; not just a marketer, and that I should build stuff that proves it.\nI thought about it, and he had a point. A few years later, I would put the same feeling more directly: marketers need enough engineering instinct to build and debug their own workflows.\nSo I decided to build a project that would be useful for marketing and growth, but also something I could deploy myself.\nHonestly, I was also just tired of having ideas and needing to wait on an engineering team. Plus, it was a good excuse to finally learn how to deploy a small full-stack app.\nThat\u2019s what this is.\nAn AI tool to analyze competitor pages and your own site for offer clarity, blind spots, missed opportunities and emotional resonance with your intended ICP and more.\nIt&rsquo;s a selfish project that I&rsquo;m hoping is useful for others too. Hence its also completely open source.\nOn the surface, it&rsquo;s dead simple: You plug in a SaaS homepage URL, pick an analysis mode, either &ldquo;Is our offer clear?&rdquo; or &ldquo;What are our competitors up to?&rdquo; and the tool gives out a structured analysis.\nIt scrapes the site, runs the text through a custom GPT prompt, and gives you the meat.\nThe intended users are marketing teams, product marketing people, SEO people and maybe even CMOs and some CEOs who want to get a quick output analysis of their competitor&rsquo;s pages.\nThe only &ldquo;techy&rdquo; thing that you&rsquo;d need to use this app is to plugin your own OpenAI api key, that&rsquo;s all.\nAnyways, getting this thing to work well? That was a journey.\nHere&rsquo;s a look under the hood at the tool, my thinking, and some minor headaches that almost made me flip a table.\n\u2699\ufe0f So, How Does It Actually Work? From your end, it&rsquo;s a four-step process:\nEnter a SaaS homepage (e.g., https:\/\/vercel.com). Choose your weapon: Offer Clarity Analyzer: Does your homepage make any sense? Competitor Page Breakdown:** What&rsquo;s the competition&rsquo;s game plan, SEO, ICP, offer focus and missed opportunities? Drop in your OpenAI API key: Don&rsquo;t worry, it&rsquo;s only used for this session and isn&rsquo;t stored anywhere. Your key, your business. Hit &ldquo;Run Analysis.&rdquo; The magic happens: Playwright scrapes the live site. The text gets fed to GPT with my special sauce prompt.(the repo is open source, you can just copy pasta it and improve upon it boss) You get a clean, structured breakdown in seconds. \ud83e\udde0 Why These Two Modes? (And Not Another Generic GPT Toy) The world doesn&rsquo;t need another generic &ldquo;Summarize this URL&rdquo; tool.\nI wanted something that solves a real, repetitive task for SaaS marketers.\nI chose Offer Clarity and Competitor Breakdown because I do this stuff manually all the time, especially when I&rsquo;m figuring out a go-to-market strategy.\nOr the alternative is paid tools that charge $49 to even $99 a month!\nI wanted to save time and get more done and the prompts are handcrafted to reflect that.\nThe &ldquo;Offer Clarity&rdquo; Prompt I designed this one to be brutally honest.\nIt answers the questions a first-time visitor would have in their head:\nWhat does this thing even do? Who is this for? What&rsquo;s the actual value here? What&rsquo;s confusing or missing? How would you say it better? The goal is to simulate a sharp product marketer (or a confused prospect) giving your homepage a 15-second scan and telling you what&rsquo;s broken.\nThe &ldquo;Competitor Breakdown&rdquo; Prompt This prompt basically lets you spy on your competitors.\nIt scans a competitor&rsquo;s page and pulls out the info you need for GTM planning:\nTheir core value prop. The ideal customer profile they&rsquo;re targeting. Keywords and product categories they&rsquo;re hitting. Any shots they&rsquo;re firing at other companies. Any mention of pricing. Actionable insights for your own strategy. Any missed opportunities or blind spots strategically that you can exploit It&rsquo;s perfect for quickly sizing up a handful of competitors without spending all day reading their websites.\n\ud83d\udd0d Why I Had to Use Playwright (and not BeautifulSoup) This part was a pain.\nMy first attempt did use BeautifulSoup. I&rsquo;ve used it before and it works, beautifully, lol.\nFor this project too it was fast and simple&hellip; until it wasn&rsquo;t.\nFor a lot of modern SaaS sites built with heavy JavaScript frameworks, it just couldn&rsquo;t get to the content.\nTry scraping a site like mixpanel.com with BeautifulSoup.\nYou&rsquo;ll get a whole lot of empty utensils.\nThe text just isn&rsquo;t there in the initial HTML.\nSo, I switched to Playwright.\nIt&rsquo;s a headless browser that renders the page just like a real user would, then grabs the text.\nYes, it&rsquo;s a bit slower and heavier. But it actually works reliably on the sites that matter.\nLesson learned: If you&rsquo;re scraping modern web apps, a headless browser might not be optional.\n\ud83d\udee0\ufe0f My Simple Backend + Frontend Setup To avoid building a messy project since I&rsquo;m not yet that profienct, I kept the frontend and backend separate.\nFastAPI Backend: A simple API with two endpoints: \/scrape and \/analyze. This is the meat. Streamlit Frontend: The user-facing app with the input fields and buttons. This is your fork and knife. The FastAPI backend is on its own server (I used Render), and the Streamlit app just calls it.\nThis makes it way easier to update one part without breaking the other.\nAlso I used streamlit because I wanted this done within the weekend, react frontend is still an option but for now if it works, let&rsquo;s not break it.\n\ud83d\udea8 My Deployment Headache on Render Okay, this is where I hit a wall.\nI initially deployed the backend on Render&rsquo;s free plan. Seemed like a great deal. It worked&hellip; until someone actually tried to use it.\nHere&rsquo;s what went wrong:\nThe &ldquo;spin down&rdquo;: Render&rsquo;s free instances go to sleep after 15 minutes of inactivity. The first person to hit the app would have to wait 40-50 seconds for it to wake up. The UX was terrible. Timeouts: Sometimes, the cold start was so slow that the frontend would just give up and throw an error. Constant wake-ups: I&rsquo;d test it, drink water, come back, and it would be asleep again. This led to weird frontend errors like Expecting value: line 1 column 1, which basically means the backend sent back an empty response because it was still booting up. I finally gave in and upgraded to Render&rsquo;s paid plan.\nProblem solved.\nThe instance stays warm, and the app feels instant.\nMy advice: Start on the free plan to get things working, but if you want anyone to actually use your app without rage-quitting or breaking their keyboard, pay the few bucks to keep it live.\n\ud83e\uddea A Weird Bug: Local vs. Live I also ran into one of those classic &ldquo;but it works on my machine!&rdquo; issues.\nMy footer, a simple st.markdown() with some HTML, showed up perfectly when I ran it locally but was invisible on the deployed Streamlit app.\nIf you ever need to add a styled link in Streamlit, here&rsquo;s a snippet that works:\nst.markdown( &#34;&#34;&#34;&lt;p style=&#39;font-size: 1rem; color: white;&#39;&gt; Check out more projects on: &lt;a href=&#39;https:\/\/codebynight.dev&#39; target=&#39;_blank&#39; style=&#39;color: white; text-decoration: underline;&#39;&gt; codebynight.dev &lt;\/a&gt;&lt;\/p&gt;&#34;&#34;&#34;, unsafe_allow_html=True, ) \ud83e\udde0 What&rsquo;s Next? Now that the thing is stable, all I need to get within next 15 days is to $5M ARR&hellip;\nAnyways, on a serious note, next steps:\nTweak the prompt to be more strategic, more business focused. Maybe even ask the user their purpose for the analysis and modify the prompt based on that. Scan more than just the homepage: Crawl a few key pages (like pricing and features) for deeper intel. Shareable results: Let users export the analysis as a PDF or share it with a link. I might get to those eventually. For now, it does exactly what I needed it to do.\n\ud83d\ude80 Try It Yourself \ud83d\udc49 Use the live Saas market intelligence tool here \ud83d\udc49 Check out the backend code on GitHub \ud83d\udc49 And the frontend code here \ud83e\uddfe Let&rsquo;s Wrap It Sometimes the best projects are the ones you build for yourself. This was one of them.\nLots to learn and add to my confidence!\nIf you&rsquo;re a marketer or founder trying to get quick insights on your messaging or your competitors, I literally built this for you.\n","permalink":"https:\/\/codebynight.dev\/posts\/building-saas-market-intelligence-tool\/","summary":"<p>So, the idea for this came from a chat I had with Dhruv, the CEO of Middleware.<\/p>\n<p>He pointed out that I should think of myself as a &lsquo;builder-marketer,&rsquo; not just a marketer, and that I should build stuff that proves it.<\/p>\n<p>I thought about it, and he had a point. A few years later, I would put the same feeling more directly: <a href=\"\/posts\/marketers-must-become-engineers\/\">marketers need enough engineering instinct to build and debug their own workflows<\/a>.<\/p>","title":"I Built an Open Source AI Powered SaaS Market Intelligence Tool for Marketing Teams. Here's How"},{"content":"If you are trying to decide between ARIMA and SARIMA, the thing you are really checking for is seasonality.\nARIMA is for a series with a trend or short-term dependence, but no predictable repeating cycle. SARIMA is for when you have that same stuff plus a repeating pattern, like monthly demand going up every December or daily traffic acting differently every weekend. Pretty much.\nThe annoying bit is that seasonality can look like random mess until you actually plot the data. Also, a seasonal model sounds more complete, so it is tempting to throw one at everything. I have done that. Forecasting gets annoying pretty fast when the model is more complicated than the data needs it to be.\nI was quite confused when I first learnt about these models a year ago, but they make a lot more intuitive sense once you see what each one is actually assuming. I also wrote later about why I still like ARIMA precisely because it is boring, which is kind of the larger point behind caring about these differences.\nOkay, so which one? If your data looks like this Start with Why A trend, with no obvious repeating pattern ARIMA It looks at recent values, differencing, and past errors without trying to force a seasonal story onto the data. A trend plus something that repeats every fixed number of periods SARIMA It adds seasonal autoregressive, differencing, and moving-average terms. You are unsure whether the pattern is actually seasonal Compare both on future data A chart can look seasonal and still fool you. Check whether the extra seasonal terms improve forecasts on a held-out future period. So, what separates them, and how do you decide which model fits your forecasting needs?\nThat&rsquo;s what I want to take you through in this post, are you ready? Are you ready??????\nOkay, seems like you are, so let&rsquo;s do it.\nFirst, Let&rsquo;s Look at ARIMA ARIMA, or AutoRegressive Integrated Moving Average, is a model designed to understand and predict future values in a time series.\nBest you didn&rsquo;t know that and this wasn&rsquo;t redundant at all.\nAnyways, it breaks down a series into three components:\nAR (AutoRegressive): This part of the model assumes that future values have a dependency on past values. It&rsquo;s the &ldquo;look-back&rdquo; component. For eg. this month&rsquo;s sales might be influenced by last month&rsquo;s sales. I (Integrated): This is the differencing step used to make the data stationary. In normal human language, many time series models work best when the data&rsquo;s statistical properties (like its mean and variance) are stable over time. Differencing which means subtracting the previous value from the current value is a common way to achieve this stability. MA (Moving Average): This component looks at past forecast errors to improve the current prediction. It helps the model adjust for shocks or randomness that weren&rsquo;t captured by the autoregressive term. ARIMA is at its best when your data has a clear trend but lacks any repeating, cyclical patterns. (Although most business metrics especially sales numbers etc do tend to have some seasonality at least)\nA good use case for ARIMA? Forecasting the monthly electricity consumption for a manufacturing plant.\nThe usage might be steadily increasing as the company grows, but it doesn&rsquo;t necessarily spike in the same month each year.(at least that&rsquo;s the assumption.) Which it might, for eg. AC usage spikes in summer months every year, heater usage spikes in winter months - but manufacturing facility might stay consistent throughout the year to maintain temperatures either ways.\nSo, cut me some slack, its difficult to find good examples!\nAnyways, this is a classic trend-based pattern, making it a perfect time series data set for an ARIMA model.\nWhat Happens When There is Seasonality in Our Time Series Data? This is where SARIMA enters the picture.\nIf your data has predictable, repeating patterns over a fixed period, you&rsquo;re dealing with seasonality, and a standard ARIMA model might think of these cycles as noise.\nSARIMA, or Seasonal ARIMA, extends the base model by adding a seasonal component.\nAR, I, and MA remain exactly the same but it applies them to the seasonal patterns as well.\nSARIMA = ARIMA (for the trend) + A Seasonal Layer (for the cycles)\nThe model doesn&rsquo;t just look back at the last few data points (like t-1, t-2); it also looks back at seasonal intervals (like t-12 for yearly data or t-7 for weekly data).\nWhen would you use it?\nWell, think a business forecasting monthly sales for wine (my project that I did for time series forecasting).\nYou&rsquo;d almost certainly see a massive spike in sales during the summer months and another smaller peak around the holidays.\nAn ARIMA model might capture the general upward or downward trend, but it would likely miss these seasonal peaks. SARIMA is built to pick on them and forecast them properly.\nA Quick Example for SARIMA Let&rsquo;s say your data looks something like this, showing a clear yearly pattern:\nMonth Sales Jan 30 Feb 28 Mar 40 &hellip; &hellip; Dec 80 Jan 32 Feb 27 &hellip; &hellip; An ARIMA model would process this as a general trend with some random fluctuations.\nA SARIMA model will identify the repeating 12-month cycle as a primary signal for making predictions.\nReal-World Scenarios for SARIMA vs ARIMA Choosing between them often comes down to the nature of your data.\nScenario Best Fit Rationale Forecasting monthly website visits for a B2B SaaS product ARIMA Data is mainly driven by a clean, non-cyclical trend. Predicting daily ice cream sales SARIMA Sales will most probably have strong seasonal peaks in summer. Estimating weekly foot traffic for a grocery store SARIMA Captures both weekly cycles (weekends) and holiday spikes. Projecting the annual depreciation of a piece of equipment ARIMA Follows a slow, steady trend without seasonal cycles. Okay, Let&rsquo;s Look at the Code The difference is also clear in the code.\nIn Python&rsquo;s statsmodels library, you&rsquo;ll see a separate argument for the seasonal component in SARIMA.\nARIMA Model: The order parameter (p,d,q) is for AR, I, and MA terms.\nfrom statsmodels.tsa.arima.model import ARIMA # For non-seasonal data model = ARIMA(data, order=(2,1,2)) result = model.fit() forecast = result.forecast(steps=12) SARIMA Model:\nHere, we add the seasonal_order parameter (P,D,Q,m), where m is the length of the seasonal cycle (e.g., 12 for yearly seasonality on monthly data).\nfrom statsmodels.tsa.statespace.sarimax import SARIMAX # For seasonal data model = SARIMAX(data, order=(2,1,2), seasonal_order=(1,0,1,12)) result = model.fit() forecast = result.forecast(steps=12) When to Use Which? The decision is quite straightforward:\nUse ARIMA when your time series data shows a trend but has no obvious repeating, seasonal patterns. Use SARIMA when the data exhibits clear and predictable seasonal cycles. auto_arima is useful, but do not blindly believe it If you are unsure whether a seasonal component helps, pmdarima has an auto_arima function that can try a bunch of model configurations for you. It is useful when you are still learning what the parameter space even looks like.\nI used it alongside diagnostics for my own project. It saved some time, but I would not treat the first model it suggests as the answer either.\nSet seasonal=True and give it the seasonal period m, like 12 for monthly data with a yearly cycle. Then compare a seasonal and non-seasonal candidate on future data that you held back. The important part is that the test period comes after the training period. Time series gets weird if you let future data leak backwards.\nThink Grid Search for ML hyperparams, but with a timeline you cannot mess around with.\nimport pmdarima as pm # Search seasonal ARIMA candidates for monthly data with a yearly cycle model = pm.auto_arima(data, seasonal=True, m=12) # Inspect the fitted model, then compare forecasts on held-out future data print(model.summary()) AIC is a useful clue, but it is not the whole decision. Check the forecast errors at the horizon that actually matters too. A model can look great one month ahead and still be useless for a six-month inventory decision.\nLet&rsquo;s Wrap This Up The machine learning landscape is filled with complex models like LSTMs and Transformers, ARIMA and SARIMA imo are still quite useful.\nThey are workhorses for a reason: they are fast to train, their results are highly interpretable, and they perform exceptionally well on datasets that aren&rsquo;t massive enough to require deep learning.\nAnd as data scientists I believe our job is not to make the best model but to make the best model that solves the business problem while taking care of resource constraints. (time, effort &amp; money)\nFor setting up a solid baseline forecast in a business context, these models are going to be the perfect place to start.\nLet the data make the choice for you, and you&rsquo;ll have a strong and sensible model.\n","permalink":"https:\/\/codebynight.dev\/posts\/arima-vs-sarima-practical-guide-to-choosing-the-right-model-for-time-series-analysis\/","summary":"<p>If you are trying to decide between ARIMA and SARIMA, the thing you are really checking for is seasonality.<\/p>\n<p>ARIMA is for a series with a trend or short-term dependence, but no predictable repeating cycle. SARIMA is for when you have that same stuff plus a repeating pattern, like monthly demand going up every December or daily traffic acting differently every weekend. Pretty much.<\/p>\n<p>The annoying bit is that seasonality can look like random mess until you actually plot the data. Also, a seasonal model sounds more complete, so it is tempting to throw one at everything. I have done that. Forecasting gets annoying pretty fast when the model is more complicated than the data needs it to be.<\/p>","title":"ARIMA vs. SARIMA: Differences and When to Use Each for Forecasting"},{"content":"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 &ndash; the business problem, the segmentation insights, the high-level model results.\nWith this one I simply walk you through the code.\nBut 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.\nThis is especially important if you&rsquo;re learning data science like me and want to move past simply &ldquo;running a notebook&rdquo; to actually &ldquo;building useful solutions.&rdquo;\nWith me?\nAlright, let&rsquo;s go.\n\ud83e\uddf1 1. The Barebones Setup: Getting Started with Libraries First things first, importing your go-to libraries. Everyone does this, and these are more or less the main ones.\nimport pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns Here is what each one does:\npandas is your table wrangler. It&rsquo;s how you handle, clean, and manipulate tabular data like spreadsheets or database tables. numpy is your math person. It&rsquo;s for numerical operations, especially with arrays and matrices. (highly beneficial with deep learning too) matplotlib.pyplot and seaborn are your default visualization libs. Patterns, distributions, and relationships etc. You can&rsquo;t understand what&rsquo;s going on without visualizing it. \ud83d\udce5 2. Loading and Peeking at the Data: The First Handshake Right after importing, the very next step is always to load your data and take a quick look.\ndf = pd.read_excel(&#34;\/content\/Customer Churn Data.xlsx&#34;, sheet_name=&#34;data for churn&#34;) print(df.head()) Output:\nAccountID Churn Tenure City_Tier CC_Contacted_LY Payment Gender 0 20000 1 4 3.0 6.0 Debit Card Female 1 20001 1 0 1.0 8.0 UPI Male 2 20002 1 0 1.0 30.0 Debit Card Male 3 20003 1 0 3.0 15.0 Debit Card Male 4 20004 1 0 1.0 12.0 Credit Card Male ... What to note:\nYou&rsquo;re not just checking if the file loaded correctly here.\nYou&rsquo;re starting to build a mental model of the dataset.\nWhat are the column names?\nWhat kind of values are in the first few rows?\nAre there any immediate red flags?\nThis quick check sets the stage for the whole project more or less.\n\ud83d\udccf 3. How Big Is This? Getting the Lay of the Land Once you&rsquo;ve had a quick look, the next question is scale.\nHow many rows?\nHow many columns?\nprint(&#34;Dataset Shape:&#34;, df.shape) Output:\nDataset Shape: (11260, 19) What to note:\nOkay, over 11,000 accounts with 19 different pieces of information each.\nThat&rsquo;s a decent size.\nSmall enough that you can probably work with it comfortably on a standard laptop, but large enough to feel like a realistic business dataset.\n\ud83d\udd0e 4. What&rsquo;s Missing? And What&rsquo;s Weird?: The Data Audit Now, let&rsquo;s get serious about inspecting the data.\nprint(&#34;Missing Values and Data Types:&#34;) print(df.info()) Output (not sharing the full output, but you&rsquo;d see the full output in your notebook):\nTenure 11158 non-null object City_Tier 11148 non-null float64 Payment 11151 non-null object ... Login_device 11039 non-null object This is usually where you hit your first real &ldquo;uh oh&rdquo; moment.\nTenure is showing up as object (meaning Python thinks it&rsquo;s text) when it should be numbers?\nSame for Account_user_count.\nThat means they&rsquo;re likely strings with some hidden characters or mixed types.\nWe&rsquo;ll definitely need to convert those.\nPlus, a bunch of missing values across several columns.\nThis output is very close to what real datasets look like.\nDirty, inconsistent, and full of specific things.\nIf your data looks perfect after df.info(), you&rsquo;re probably working with a toy dataset or someone else has already done the hard work for you.\n\ud83e\uddf9 5. Light Data Cleaning Before Modelling Data cleaning and preparing is the best habit to build to get really good outcomes.\nfrom sklearn.impute import KNNImputer knn_features = [&#39;rev_per_month&#39;, &#39;cashback&#39;, &#39;Tenure&#39;, &#39;City_Tier&#39;, &#39;Service_Score&#39;, &#39;Account_user_count&#39;, &#39;CC_Agent_Score&#39;, &#39;Complain_ly&#39;, &#39;rev_growth_yoy&#39;, &#39;coupon_used_for_payment&#39;, &#39;Day_Since_CC_connect&#39;] df_knn = df.copy() knn_imputer = KNNImputer(n_neighbors=5) df_knn[knn_features] = knn_imputer.fit_transform(df_knn[knn_features]) print(df_knn[knn_features].isnull().sum()) What to note:\nIn this specific dataset, I found no duplicates but there were a few missing values which I packed with KNN imputer before plotting the churn.\nIs it optimal? Not really but since I used KNN imputer and slightly off data would not cause major business issues I did that instead of discarding the missing values.\nIf you&rsquo;re building data pipelines, including this step becomes even more important for data integrity.\n\ud83d\udcca 6. Let&rsquo;s Talk Class Imbalance Before jumping into features, it&rsquo;s important to understand your target variable.\nIn churn prediction, this means looking at the distribution of &ldquo;churned&rdquo; vs. &ldquo;not churned&rdquo; customers.\nsns.countplot(x=&#39;Churn&#39;, data=df) plt.title(&#34;Churn Distribution&#34;) plt.show() Output:\nObservation:\nOnly about 17% of the users in this dataset had actually churned. The vast majority were still active customers.\nTeaching moment:\nThis is a classic case of an imbalanced classification problem.\nThis means you need to be extremely careful using basic accuracy as your main metric.\nWhy?\nBecause a model that simply predicts &ldquo;not churned&rdquo; for every single customer would still be about 83% accurate!\nThat sounds good on paper, but it would be completely useless for a business trying to identify and retain at-risk customers.\nThis is why we&rsquo;ll need to focus on other metrics later.\n\ud83d\udcc8 7. Exploratory Data Analysis But Beyond Just Plotting EDA is more than just making pretty charts.\nIt&rsquo;s about finding relationships and insights that directly help you make up your mind about the modeling and business recommendations.\nNow I did distribution, heatmaps, boxplots, histograms - you name it.\nVisualization is something that if done more than needed still doesn&rsquo;t hurt.\n# Distribution across numerical columns numerical_cols = df_knn.select_dtypes(include=[&#39;int64&#39;, &#39;float64&#39;]).columns plt.figure(figsize=(15, 12)) for i, col in enumerate(numerical_cols, 1): plt.subplot(4, 4, i) sns.histplot(df_knn[col], kde=True, bins=30) plt.title(f&#34;Distribution of {col}&#34;) plt.tight_layout() plt.show() Let&rsquo;s now try and understand the correlation across our key columns.\n# Heatmap to understand the correlation if any numerical_df = df_knn.select_dtypes(include=[&#39;number&#39;]) plt.figure(figsize=(12, 8)) sns.heatmap(numerical_df.corr(), annot=True, cmap=&#34;coolwarm&#34;, linewidths=0.5) plt.title(&#34;Correlation Heatmap&#34;) plt.show() Now, we plot churn against other numerical columns in a boxplot.\n# Box plot of churn vs other items numerical_cols = [&#39;rev_per_month&#39;, &#39;cashback&#39;, &#39;Tenure&#39;, &#39;City_Tier&#39;, &#39;Service_Score&#39;, &#39;Account_user_count&#39;, &#39;CC_Agent_Score&#39;, &#39;Complain_ly&#39;, &#39;rev_growth_yoy&#39;, &#39;coupon_used_for_payment&#39;, &#39;Day_Since_CC_connect&#39;] plt.figure(figsize=(15, 10)) for i, col in enumerate(numerical_cols[:6], 1): plt.subplot(2, 3, i) sns.boxplot(x=&#39;Churn&#39;, y=col, data=df_knn, palette=&#39;coolwarm&#39;) plt.title(f&#34;Churn vs {col}&#34;) plt.tight_layout() plt.show() And finally bar charts of churn against categorical columns.\n# Bar charts of churn against categorical columns categorical_cols = [&#39;Payment&#39;, &#39;Gender&#39;, &#39;account_segment&#39;, &#39;Marital_Status&#39;, &#39;Login_device&#39;] plt.figure(figsize=(15, 8)) for i, col in enumerate(categorical_cols, 1): plt.subplot(2, 3, i) sns.countplot(x=col, hue=&#39;Churn&#39;, data=df_knn, palette=&#39;coolwarm&#39;) plt.xticks(rotation=45) plt.title(f&#34;Churn by {col}&#34;) plt.tight_layout() plt.show() Output:\nAs you can see, ton of work when it comes to visualization and btw I skipped a couple more images since I felt this one point would get too long.\nNow, what to note:\nCustomers with lower revenue per month seem to be more likely to churn.\nThis makes intuitive business sense.\nBut I think this is also a good moment to talk about why feature engineering needs domain context and critical thinking.\nRevenue might look predictive, but what if it&rsquo;s highly skewed, or volatile, or heavily influenced by seasonality?\nSimply using raw rev_per_month might not capture the full story.\nThis is why, I also explored more nuanced behavioral markers like year-over-year revenue growth, the number of complaints filed, and cashback usage.\nMetrics like these tell you more about a customer&rsquo;s opinion about the brand, their overall sentiment than just a raw amount.\nIt&rsquo;s about finding features that capture behavior and trends, not just static values.\n\ud83d\udcf2 8. Devices Matter When it Comes to User Behaviour Sometimes, EDA throws you a curveball.\nMaybe an insight you didn&rsquo;t expect, but that opens up new lenses for understanding the problem.\nI&rsquo;m talking about plotting churn by device type, check the images above and you&rsquo;ll notice that the last bar chart is churn by login device.\nSurprise Insight:\nSurprisingly, desktop users in this dataset were more likely to churn than mobile users.\nAt first glance, this might seem odd.\nBut it doesn&rsquo;t hurt to then ask questions like:\nCould it be related to the user experience on desktop vs. mobile?\nAre desktop users a different demographic: maybe older users who aren&rsquo;t as &ldquo;sticky&rdquo; with the platform?\nThis is why EDA isn&rsquo;t just about crunching stats.\nIt&rsquo;s where a data scientist learns to think about product management, data analysis, and design in an intersection.\nAn insight like this isn&rsquo;t just another data point.\nIt&rsquo;s a potential feedback or prompt you can share with other teams to look into.\n\ud83e\uddea 9. KNN Imputer for Missing Values I know I already talked about the imputer but it deserves it&rsquo;s own section.\nAnd I&rsquo;m sure you might have noticed the wonky order of things in this project, but you do you boo.\nWhy KNN?\nTraditional methods like simply using the mean or median to fill missing values (df.fillna(df.mean())) are fast, but they can distort the relationships within your data.\nKNN (K-Nearest Neighbors) imputation is a bit smarter. It imputes missing values based on the values from the n_neighbors most similar rows.\nThis helps save the underlying data relationships much better, especially important in datasets that track customer behavior.\nIt assumes that customers who are &ldquo;alike&rdquo; in their known features will likely have similar values for their missing features.\nIt&rsquo;s a more nuanced way to fill in the blanks.\n\u2696\ufe0f 10. Handling Class Imbalance with SMOTE (and When Not To) You saw how imbalanced our churn data was. If I just train a model on this skewed data, it might get &ldquo;lazy&rdquo; and just predict the majority class (non-churn).\nTo work through this, we often use techniques like SMOTE.\nfrom imblearn.over_sampling import SMOTE X = df_knn.drop(columns=[&#34;Churn&#34;]) y = df_knn[&#34;Churn&#34;] categorical_cols = X.select_dtypes(include=[&#34;object&#34;]).columns label_encoders = {} for col in categorical_cols: le = LabelEncoder() X[col] = le.fit_transform(X[col]) label_encoders[col] = le X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y) smote = SMOTE(random_state=42) X_train_smote, y_train_smote = smote.fit_resample(X_train, y_train) from collections import Counter print(f&#34;Class distribution before SMOTE: {Counter(y_train)}&#34;) print(f&#34;Class distribution after SMOTE: {Counter(y_train_smote)}&#34;) Another Teaching moment:\nSMOTE isn&rsquo;t a clean shot btw, and it&rsquo;s definitely not a &ldquo;free win.&rdquo;\nIt works by creating synthetic examples of the minority class (churned customers) to balance the dataset.\nIt can work well, especially with simpler, more linear models.\nHowever, you need to be cautious.\nFor tree-based models like Random Forests or XGBoost, SMOTE can sometimes introduce noisy, unrealistic data points that those models might get drunk on, leading to overfitting or worse performance than if you hadn&rsquo;t used it at all.\nAlways compare your model&rsquo;s performance with and without resampling techniques.\nThere&rsquo;s no one-size-fits-all solution for imbalanced data.\nSometimes, different evaluation metrics or cost-sensitive learning (where you tell the model that misclassifying a churner is &ldquo;more expensive&rdquo; than misclassifying a non-churner) are more effective.\n\ud83c\udf32 11. Model Training: Building the Predictor After all that data wrangling and prep work, it&rsquo;s finally time to train the model.\nFor this project, a Random Forest Classifier gave me a good output compared to the other models.\nCheck the other blog post to see the results table against all other models.\nHere is a quick overview still:\nresults_list_smote = [] for name, model in models.items(): model.fit(X_train_smote, y_train_smote) y_train_pred = model.predict(X_train_smote) y_test_pred = model.predict(X_test) y_train_prob = model.predict_proba(X_train_smote)[:, 1] y_test_prob = model.predict_proba(X_test)[:, 1] test_accuracy = accuracy_score(y_test, y_test_pred) test_precision = precision_score(y_test, y_test_pred) test_recall = recall_score(y_test, y_test_pred) test_f1 = f1_score(y_test, y_test_pred) test_auc_roc = roc_auc_score(y_test, y_test_prob) train_accuracy = accuracy_score(y_train_smote, y_train_pred) train_precision = precision_score(y_train_smote, y_train_pred) train_recall = recall_score(y_train_smote, y_train_pred) train_f1 = f1_score(y_train_smote, y_train_pred) train_auc_roc = roc_auc_score(y_train_smote, y_train_prob) overfitting = &#34;Yes&#34; if (train_auc_roc - test_auc_roc) &gt; 0.05 else &#34;No&#34; results_list_smote.append({ &#34;Model&#34;: name, &#34;Train Accuracy&#34;: round(train_accuracy, 4), &#34;Test Accuracy&#34;: round(test_accuracy, 4), &#34;Train Precision&#34;: round(train_precision, 4), &#34;Test Precision&#34;: round(test_precision, 4), &#34;Train Recall&#34;: round(train_recall, 4), &#34;Test Recall&#34;: round(test_recall, 4), &#34;Train F1-score&#34;: round(train_f1, 4), &#34;Test F1-score&#34;: round(test_f1, 4), &#34;Train AUC-ROC&#34;: round(train_auc_roc, 4), &#34;Test AUC-ROC&#34;: round(test_auc_roc, 4), &#34;Overfitting&#34;: overfitting }) results_smote = pd.DataFrame(results_list_smote) print(results_smote) Output\nModel Train Accuracy Test Accuracy Train Precision \\ 0 Decision Tree 1.0000 0.9312 1.0000 1 Random Forest 1.0000 0.9742 1.0000 2 XGBoost 0.9993 0.9694 0.9997 3 AdaBoost 0.8875 0.8708 0.8965 4 Na\u00efve Bayes 0.7568 0.7127 0.7441 5 SVM 0.8020 0.7744 0.7916 Test Precision Train Recall Test Recall Train F1-score Test F1-score \\ 0 0.7732 1.0000 0.8364 1.0000 0.8035 1 0.9397 1.0000 0.9050 1.0000 0.9220 2 0.9189 0.9988 0.8971 0.9993 0.9079 3 0.5957 0.8761 0.7230 0.8862 0.6532 4 0.3386 0.7828 0.7414 0.7629 0.4648 5 0.4122 0.8199 0.7995 0.8055 0.5440 Train AUC-ROC Test AUC-ROC Overfitting 0 1.0000 0.8934 Yes 1 1.0000 0.9936 No 2 1.0000 0.9908 No 3 0.9574 0.9025 Yes 4 0.8188 0.7770 No 5 0.8697 0.8526 No \ud83d\udd25 12. What Actually Drives Churn? Getting good predictions is one thing.\nBut understanding why the model makes those predictions is where machine learning makes actual business sense.\nFeature importance scores are the direct link to actionable insights.\nimportances = model.feature_importances_ feature_names = X.columns feature_importances_df = pd.DataFrame({&#39;feature&#39;: feature_names, &#39;importance&#39;: importances}) feature_importances_df = feature_importances_df.sort_values(by=&#39;importance&#39;, ascending=False) print(&#34;Top 10 Feature Importances:&#34;) print(feature_importances_df.head(10)) Output (Example Top Features):\nfeature importance Tenure 0.254321 Complaints 0.187654 Service_score 0.123456 Cashback_usage 0.098765 Key Takeaways (and where ML meets business):\nFor this model, the top features were:\nTenure: Customers with shorter tenure (new customers) were much more likely to churn. This is a common pattern. Complaints: Customers who had filed complaints had a higher probability of churning. Service Score: Lower service scores correlated with higher churn. Cashback Usage: Interestingly, customers who used less cashback were more prone to churn. This is where you move beyond just saying &ldquo;the model performed well.&rdquo;\nYou translate these model insights into concrete retention actions.\nFor example:\nFocus on onboarding: If new users (low tenure) churn quickly, improve the first 30-60 days of their experience. Proactive issue resolution: If complaints are a big driver, how can we identify and resolve issues before a customer even complains? Incentivize engagement: If cashback usage is a factor, can we encourage more use of incentives or loyalty programs? \ud83d\udcc9 13. Evaluating Machine Learning Models the Right Way Basic accuracy can be a deceptive metric, especially with imbalanced datasets.\nSo, for a churn model, what you really care about is catching churners (Recall) without excessively bugging loyal customers (Precision).\nX_train_smote_df = pd.DataFrame(X_train_smote, columns=X_train.columns) X_train = X_train[X_train_smote_df.columns] X_test = X_test[X_train_smote_df.columns] scaler = StandardScaler() X_train_scaled = scaler.fit_transform(X_train) X_test_scaled = scaler.transform(X_test) X_train_scaled = pd.DataFrame(X_train_scaled, columns=X_train.columns) X_test_scaled = pd.DataFrame(X_test_scaled, columns=X_train.columns) plt.figure(figsize=(12, 5)) plt.subplot(1, 2, 1) for name, model in models.items(): try: y_test_prob = model.predict_proba(X_test_scaled)[:, 1] fpr, tpr, _ = roc_curve(y_test, y_test_prob) plt.plot(fpr, tpr, label=f&#34;{name} (AUC = {roc_auc_score(y_test, y_test_prob):.3f})&#34;) except Exception as e: print(f&#34;Skipping {name} due to error: {e}&#34;) plt.plot([0, 1], [0, 1], &#39;k--&#39;) plt.xlabel(&#34;False Positive Rate&#34;) plt.ylabel(&#34;True Positive Rate&#34;) plt.title(&#34;ROC Curve Comparison SMOTE&#34;) plt.legend() plt.subplot(1, 2, 2) for name, model in models.items(): try: y_test_prob = model.predict_proba(X_test_scaled)[:, 1] precision, recall, _ = precision_recall_curve(y_test, y_test_prob) plt.plot(recall, precision, label=name) except Exception as e: print(f&#34;Skipping {name} due to error: {e}&#34;) plt.xlabel(&#34;Recall&#34;) plt.ylabel(&#34;Precision&#34;) plt.title(&#34;Precision-Recall Curve Comparison SMOTE&#34;) plt.legend() plt.tight_layout() plt.show() Output (Example Classification Report):\nWhat to focus on:\nRecall: In this example, 0.8760. This means the model caught 87% of the actual churners. Good for a business trying to identify at-risk customers. Precision: In this example, 0.98. This means of all the customers the model predicted would churn, only 89% actually did. The other 2% were false alarms. AUC-ROC: This gives you an overall measure of how well the model distinguishes between churners and non-churners across all possible thresholds. An AUC of 0.9960 is quite good. I know this feels borderline overfit, but we&rsquo;ll take it as an example for now. I tested 6 models and then tuned the winner: Random Forest.\nPro tip: Always include the confusion matrix.\nIt&rsquo;s incredibly intuitive and helps explain model behavior to non-technical stakeholders.\nThings like who we&rsquo;re catching (true positives, true negatives) and who we&rsquo;re missing (false negatives, false positives).\nIt literally shows the trade-offs.\nKey Lessons From This Machine Learning Adventure This project, and others like it, really taught me some lessons that go beyond just the syntax or algorithm theory:\nChurn is Complex: You rarely get one single &ldquo;magic&rdquo; predictor. It&rsquo;s almost always a combination of behavioral factors. Modeling is Only a Slice of the Pie: The actual coding and model training might be 30% of the work. Cleaning, exploring, feature engineering, and especially explaining your results - that&rsquo;s often the harder, more time-consuming part. EDA is Massively Underrated: My best business insights didn&rsquo;t come from the final model&rsquo;s predictions. They came during the exploratory data analysis phase, long before I even picked an algorithm. Spend time here! Don&rsquo;t Overfit to Metrics: Understand why you&rsquo;re using a particular metric. High recall isn&rsquo;t always better if your false alarms are very costly (e.g., flagging healthy patients as sick). Align your metrics with real world consequences. Your Model is a Tool, Not the Product: The ultimate goal isn&rsquo;t a perfect model score. What truly matters is how your model helps people (product managers, marketing teams, executives) make better, data-informed decisions. I came back to this later in Churn Is Not a Data Science Problem, because a decent prediction still does nothing on its own.\nIf this walkthrough helped you think more clearly about data science projects (or if you just love seeing DS in action), feel free to share it with a friend or drop a comment with your thoughts.\nSee you later.\n","permalink":"https:\/\/codebynight.dev\/posts\/full-code-walkthrough-reducing-churn-in-ecommerce-predictive-modelling\/","summary":"<p>If you read part 1 of this series, ala <a href=\"\/posts\/churn-analysis-capstone-ecommerce-customer-retention\">Churn Prediction for E-Commerce with Predictive Modelling<\/a>, 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 &ndash; the business problem, the segmentation insights, the high-level model results.<\/p>\n<p>With this one I simply walk you through the code.<\/p>\n<p>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.<\/p>","title":"Full Code Walkthrough - Reducing Churn in E-Commerce with Predictive Modelling"},{"content":"A stakeholder comes to your desk. They&rsquo;re excited. &ldquo;We need to use AI,&rdquo; they say, &ldquo;to improve customer retention.&rdquo;\nYou nod, open your editor, and you start thinking.\nShould I use XGBoost? Or maybe a neural network? How will I set up the pipeline?\nStop. Right there.\nThis is the single biggest mistake many of us make when we&rsquo;re starting out: we jump straight to thinking about solutions and algorithms.\nWe&rsquo;re so excited to play with the cool, technical thing that we forget to ask the most important question first:\nWhat problem are we actually trying to solve?\nThe most valuable skill for a data scientist isn&rsquo;t knowing every algorithm under the sun.\nIt&rsquo;s easy, Google has ton of code to help with that, LLMs can help out too. So then what makes a Data Scientist more valuable than the readymade code example anywhere on Google?\nWell, it&rsquo;s the ability to translate a vague business goal like &ldquo;improve retention&rdquo; into a specific, solvable machine learning problem.\nThis is called problem framing.\nHere is what I&rsquo;ll cover:\nThe three main &ldquo;lenses&rdquo; for framing almost any ML problem: Classification, Regression, and Ranking. Real-world examples and use-case templates for each. A practical, 5-step checklist you can use on your next project. Why &ldquo;Framing&rdquo; is 90% of the Machine Learning Engineering Battle Let&rsquo;s be clear: getting the framing wrong is a recipe for disaster.\nYou can spend weeks building a model with 99% accuracy, just to find out that it doesn&rsquo;t actually help anyone make a better decision.\nIt&rsquo;s a model that&rsquo;s technically correct but practically useless. It answers a question nobody was asking.\nI ran into a more concrete version of this with churn later. A prediction is only useful when it becomes part of a retention workflow.\nProper framing changes a high-level objective like &ldquo;increase revenue&rdquo; into a precise, machine-solvable question like, &ldquo;What is the predicted purchase value of this specific user in the next 30 days?&rdquo;\nWhen you get the frame right, you know that the model you build will directly support a business decision.\nIt provides a clear target for you to aim at and a clear definition of success.\nThe Three Core Lenses: Classification, Regression, and Ranking Think of these as the primary tools in your problem-framing toolkit. Almost every business problem can be viewed through one of these three lenses.\nClassification: Which Category Does This Belong To? The Core Question: Classification is about predicting a discrete category or a label.\nThe fundamental question you&rsquo;re asking is: &ldquo;Is this A or B (or C, or D&hellip;)?&rdquo;\nThink of the Sorting Hat from Harry Potter. It takes an input (a new student) and assigns it to a specific, predefined bucket (Gryffindor, Hufflepuff, etc.)\nHere are a few examples:\nBusiness Problem: &ldquo;We&rsquo;re losing too many customers and don&rsquo;t know who to focus our retention efforts on.&rdquo; ML Framing (Binary Classification): For each active customer, will they churn in the next 30 days? (Yes\/No) What the Model Outputs: A probability (e.g., 85% chance of churn) and a final class label (&ldquo;Yes&rdquo;). Here are 3 more:\nSpam Detection: Is this email spam or not spam? Medical Diagnosis: Does this medical image show a malignant tumor or a benign one? Lead Scoring: Based on user actions, is this new sales lead &ldquo;hot&rdquo; or &ldquo;cold&rdquo;? For problems like these, you might use algorithms like Logistic Regression, Decision Trees, or Support Vector Machines.\nYou&rsquo;d measure success with metrics like Accuracy, Precision, Recall, and F1-Score.\nRegression: How Much or How Many? The Core Question: Regression is all about predicting a continuous numerical value. The question you&rsquo;re asking is: &ldquo;What is the specific number?&rdquo;\nIf classification is a sorting hat, regression is a crystal ball that gives you a precise number, not a category.\nNow towards our examples:\nBusiness Problem: &ldquo;We need to set our budget accurately and manage inventory for the upcoming quarter.&rdquo; ML Framing (Regression): How much revenue, in dollars, will we generate next month? What the Model Outputs: A continuous value (e.g., $1,254,300, or 4,521 units sold). A few more yet again:\nReal Estate: What is the predicted market price of this house? Demand Forecasting: How many units of this product will we sell next week? Customer Value: What is the estimated lifetime value (LTV) of this new customer? Here, you&rsquo;d work with algorithms like Linear Regression or tree-based models like XGBoost and Random Forests.\nYou&rsquo;ll measure success with metrics like Root Mean Squared Error (RMSE) or Mean Absolute Error (MAE).\nRanking: What&rsquo;s Most Relevant or Important? The Core Question: Ranking is about predicting an order or a sequence. The question is: &ldquo;What should I show the user first, second, third&hellip;?&rdquo;\nThis one is more or less like a hyper-personalized &ldquo;Top 10&rdquo; list generator for every single user.\nOn to our examples now:\nBusiness Problem: &ldquo;Users are searching on our e-commerce site but aren&rsquo;t finding relevant products and are leaving.&rdquo; ML Framing (Ranking): Given a user&rsquo;s search query, what is the optimal order to display the available products to maximize the chance of a click or purchase? What the Model Outputs: An ordered list of items (e.g., [Product_ID_5, Product_ID_12, Product_ID_2, ...]). A few more, here we go:\nSearch Engines: The order of results on a Google search page. Social Media: The personalized posts in your Instagram, X, or TikTok feed. Recommendations: The &ldquo;Top Picks for You&rdquo; section on Netflix or Spotify. This is a more specialized field often called \u201clearning-to-rank,\u201d and depending on the use case, it can use metrics like nDCG, Precision@k, or Hit Rate - each helping measure how well the ordering aligns with what the user actually wants.\nOther Important Machine Learning Problem Frames Not every problem fits perfectly into the big three.\nHere are a few more frames to keep an eye out for:\nClustering: Finding Groups\nThe Question: &ldquo;What are the natural segments or groups within our data?&rdquo; This is an unsupervised problem, meaning you don&rsquo;t have a pre-defined &ldquo;right answer&rdquo; to predict. Example: &ldquo;Can we group our customers into different personas like &lsquo;deal-hunters,&rsquo; &rsquo;loyals,&rsquo; and &lsquo;window-shoppers&rsquo; based on their behavior?&rdquo; Forecasting: Predicting a Future Sequence\nThe Question: &ldquo;What will this value be over the next N time periods?&rdquo; Example: &ldquo;What will our daily website traffic be for the next 30 days?&rdquo; This is usually a series of regression predictions, but this one more often is a specialized discipline with its own set of tools (like ARIMA, which I wrote about in the article on Time Series Analysis Anomaly Detection: Finding the Weird Stuff\nThe Question: &ldquo;Does this data point look unusual compared to everything else?&rdquo; Example: &ldquo;Is this credit card transaction fraudulent?&rdquo; or &ldquo;Is this server reading indicating an impending system failure?&rdquo; Your Practical 5-Step Machine Learning Problem Framing Checklist Next time you get a vague request, walk through these five steps.\nStart with the Business Decision.\nAsk: &ldquo;What specific action will someone take based on this model&rsquo;s prediction?&rdquo; If there&rsquo;s no clear action, the model might not really be needed at all.\nExample: We will send a 10% discount to customers predicted to churn.\nDefine the Ideal Output.\nAsk: &ldquo;What, specifically, does the decision-maker need to see?&rdquo; A Yes\/No answer? A dollar amount? An ordered list of the top 5 items?\nExample: We need a &ldquo;Yes&rdquo; or &ldquo;No&rdquo; for each customer.\nChoose Your ML Lens.\nBased on the output from Step 2, map it directly to a frame.\nExample: A &ldquo;Yes\/No&rdquo; output means this is a Classification problem.\nIdentify the Unit of Analysis.\nAsk: &ldquo;What, exactly, are we making a prediction for?&rdquo; Is it for a single customer? A product? A transaction? A single day? This defines the rows in your dataset.\nExample: We are making one prediction per customer.\nDetermine the Success Metrics (Business &amp; Technical).\nAsk: &ldquo;How will we know if the model is good?&rdquo; Define both the technical goal (e.g., achieve an F1-score &gt; 0.8) and the business goal (e.g., successfully reduce overall churn by 5%).\nFraming in Machine Learning is Where the Real Value is Created The best algorithm in the world can&rsquo;t save a poorly framed problem.\nOur value as a data scientist doesn&rsquo;t just come from our ability to build complex models; it comes from our ability to ask the right questions and structure a problem in a way that leads to a truly useful solution. (LLMs can build these models in seconds these days, but they do fail to ask these business specific questions!)\n","permalink":"https:\/\/codebynight.dev\/posts\/primer-to-framing-business-problems-for-machine-learning\/","summary":"<p>A stakeholder comes to your desk. They&rsquo;re excited. &ldquo;We need to use AI,&rdquo; they say, &ldquo;to improve customer retention.&rdquo;<\/p>\n<p>You nod, open your editor, and you start thinking.<\/p>\n<p>Should I use XGBoost? Or maybe a neural network? How will I set up the pipeline?<\/p>\n<p>Stop. Right there.<\/p>\n<p>This is the single biggest mistake many of us make when we&rsquo;re starting out: we jump straight to thinking about solutions and algorithms.<\/p>","title":"A Primer to Framing Business Problems for Machine Learning"},{"content":"Deep Learning Gets the Spotlight, But Time Series Still Solves Real Problems In the machine learning landscape today, deep learning models - transformers, LSTMs, and other neural networks steal the show.\nThey\u2019re impressive, powerful, celebrated and make you feel smart too when you use them.\nHowever, when it comes to forecasting business metrics like sales, demand, or inventory, deep learning isn\u2019t always the answer.\nTraditional time series models, especially ARIMA (AutoRegressive Integrated Moving Average) and its seasonal extension SARIMA, are some of the most effective and interpretable methods for forecasting structured temporal data.\nThese models are not flashy, but they are robust, straight forward to explain, and often outperform complex black-box models on smaller datasets with clear seasonality and trends.\nIMHO, ARIMA and SARIMA deserve a comeback in your ML toolkit. I came back to this idea later in ARIMA Is Boring, and That Is Why I Still Like It, mainly because boring models make it harder to skip the uncomfortable questions about the data.\nAlright let&rsquo;s touch upon these and then I&rsquo;ll walk you through a practical example forecasting monthly Ros\u00e9 wine sales.\nThe Case for ARIMA and SARIMA Why should you care about ARIMA and SARIMA in 2025?\nHere are a few reasons according to me:\nInterpretability: Unlike many deep learning models, ARIMA and SARIMA provide explicit parameters that correspond to real-world phenomena - trends, seasonality, and noise - making it easier to explain forecasts to stakeholders. And this is a really important point. Stakeholders more often than not prefer things they understand. Effectiveness on Limited Data: Many business contexts offer only a few years of monthly or weekly data. Deep learning models often require huge datasets and ARIMA\/SARIMA can perform well on smaller samples. Explicit Seasonality Handling: SARIMA extends ARIMA by explicitly modeling seasonal patterns, which are common in sales, demand, and other business metrics. Built-in Confidence Intervals: These models naturally provide prediction intervals, giving a sense of uncertainty - which is important for risk-aware business decision-making. Computational Efficiency: They are lightweight and fast to train hence highly practical for quick iterations. That said, ARIMA\/SARIMA are not the end all, be all.\nThey assume linear relationships and stationarity (more on that later), so if your data is extremely noisy, non-linear, or high-dimensional, other approaches might be better.\nBut for many real-world forecasting problems, they definitely are a solid choice.\nCore Concepts Behind ARIMA and SARIMA Before we dive into code, let&rsquo;s try and understand the building blocks for these models.\nStationarity A stationary time series has statistical properties (mean, variance) that do not change over time.\nStationarity is crucial because ARIMA models assume the underlying process is stable.\nIf your data trends upward or has changing variance, you often need to difference it (subtract previous values) to get stationarity.\nAutoregression (AR) The autoregressive part models the current value of the series as a linear combination of its previous values. The parameter p in ARIMA controls how many past observations are used.\nMoving Average (MA) The moving average component models the current value as a linear combination of past forecast errors (noise). The parameter q controls how many lagged errors are included.\nIntegration (I) Integration is simply differencing the series to make it stationary. The parameter d denotes how many times differencing is applied.\nSeasonality in SARIMA SARIMA adds seasonal components (P, D, Q, m) to capture repeating patterns at regular intervals (e.g., monthly seasonality with m=12). This allows the model to handle complex seasonal dynamics beyond simple trend and noise.\nHands-on Example: Forecasting Ros\u00e9 Wine Sales with SARIMA Now, let&rsquo;s have a quick look at an example. (snippets are from my project during the first year of masters in data science)\nThe goal was to forecast the next 12 months with confidence intervals.\nStep 1: Load and Visualize the Data import pandas as pd import matplotlib.pyplot as plt # Load the data rose_data = pd.read_csv(&#39;rose.csv&#39;, parse_dates=[&#39;YearMonth&#39;], index_col=&#39;YearMonth&#39;) # Plot the time series plt.figure(figsize=(14, 6)) plt.plot(rose_data.index, rose_data[&#39;Rose&#39;], label=&#39;Ros\u00e9 Wine Sales&#39;) plt.title(&#39;Ros\u00e9 Wine Sales Over Time&#39;) plt.xlabel(&#39;Date&#39;) plt.ylabel(&#39;Sales Volume&#39;) plt.legend() plt.show() You can see clear seasonality with peaks recurring about every 12 months, and an overall downward trend.\nStep 2: Selecting SARIMA Parameters with Auto-ARIMA Choosing the right (p, d, q)(P, D, Q, m) parameters can be tricky when you start.\nBut pmdarima library\u2019s auto_arima automates this by searching for the best combination based on information criteria like AIC.\nprint(&#34;Auto ARIMA and Auto SARIMA for Rose Wine&#34;) # Auto ARIMA for Rose auto_arima_rose = auto_arima( train_rose[&#39;Rose&#39;], seasonal=False, trace=True, error_action=&#39;ignore&#39;, suppress_warnings=True, stepwise=True ) print(&#34;Best Auto ARIMA Model for Rose Wine:&#34;) print(auto_arima_rose.summary()) # Auto SARIMA for Rose auto_sarima_rose = auto_arima( train_rose[&#39;Rose&#39;], seasonal=True, m=12, trace=True, error_action=&#39;ignore&#39;, suppress_warnings=True, stepwise=True ) print(&#34;Best Auto SARIMA Model for Rose Wine:&#34;) print(auto_sarima_rose.summary()) What we get are estimated model parameters and diagnostics, helping us understand the model structure and fit quality.\nSARIMAX Results ============================================================================================ Dep. Variable: y No. Observations: 149 Model: SARIMAX(2, 1, 2)x(1, 0, [1], 12) Log Likelihood -663.811 Date: Sat, 16 Nov 2024 AIC 1341.622 Time: 14:25:44 BIC 1362.602 Sample: 01-01-1980 HQIC 1350.146 - 05-01-1992 Covariance Type: opg ============================================================================== coef std err z P&gt;|z| [0.025 0.975] ------------------------------------------------------------------------------ ar.L1 -0.4717 0.235 -2.006 0.045 -0.933 -0.011 ar.L2 -0.0623 0.102 -0.610 0.542 -0.263 0.138 ma.L1 -0.2522 0.236 -1.071 0.284 -0.714 0.209 ma.L2 -0.6059 0.238 -2.551 0.011 -1.071 -0.140 ar.S.L12 0.9854 0.017 58.956 0.000 0.953 1.018 ma.S.L12 -0.7863 0.118 -6.652 0.000 -1.018 -0.555 sigma2 402.8422 45.772 8.801 0.000 313.131 492.553 =================================================================================== Ljung-Box (L1) (Q): 0.05 Jarque-Bera (JB): 77.80 Prob(Q): 0.83 Prob(JB): 0.00 Heteroskedasticity (H): 0.20 Skew: 0.80 Prob(H) (two-sided): 0.00 Kurtosis: 6.17 =================================================================================== Step 3: Forecasting with Confidence Intervals A lot of DS and ML projects are going to require you to try a ton of things and pick the winners, so tons of trial and error.\nThis is what I had for RMSE across different params:\n| Model | Order | Seasonal Order | RMSE | |------------------|-----------|------------------|------------| | AR | (2, 0, 0) | None | 50.691553 | | ARMA | (2, 0, 2) | None | 26.107300 | | ARIMA | (1, 1, 2) | None | 20.889614 | | SARIMA | (1, 1, 2) | (0, 1, 1, 12) | 11.258172 | | Best Auto ARIMA | (2, 1, 3) | None | 19.700298 | | Best Auto SARIMA | (2, 1, 2) | (1, 0, 1, 12) | 10.474901 | After fitting, forecasting is straightforward.\nbest_auto_sarima_model_full = SARIMAX(rose_data[&#39;Rose&#39;], order=(2, 1, 2), seasonal_order=(1, 0, 1, 12)).fit(disp=False) # 12 month forecast forecast = best_auto_sarima_model_full.get_forecast(steps=12) forecast_index = pd.date_range(rose_data.index[-1] + pd.DateOffset(months=1), periods=12, freq=&#39;M&#39;) forecast_mean = forecast.predicted_mean # 95% and 99% confidence intervals forecast_conf_int_95 = forecast.conf_int(alpha=0.05) forecast_conf_int_99 = forecast.conf_int(alpha=0.01) forecast_mean.index = forecast_index forecast_conf_int_95.index = forecast_index forecast_conf_int_99.index = forecast_index # Forecast table forecast_table = pd.DataFrame({ &#39;Forecast&#39;: forecast_mean, &#39;Lower 95%&#39;: forecast_conf_int_95.iloc[:, 0], &#39;Upper 95%&#39;: forecast_conf_int_95.iloc[:, 1], &#39;Lower 99%&#39;: forecast_conf_int_99.iloc[:, 0], &#39;Upper 99%&#39;: forecast_conf_int_99.iloc[:, 1] }) forecast_table.reset_index(inplace=True) forecast_table.rename(columns={&#39;index&#39;: &#39;Date&#39;}, inplace=True) print(&#34;12-Month Forecast with 95% and 99% Confidence Intervals for Rose Wine:&#34;) print(forecast_table) This is the actual forecast with the confidence intervals.\n| Date | Forecast | Lower 95% | Upper 95% | Lower 99% | Upper 99% | |------------|------------|-----------|-----------|-----------|-----------| | 1995-08-31 | 43.32 | 7.38 | 79.27 | -3.92 | 90.57 | | 1995-09-30 | 42.48 | 5.11 | 79.84 | -6.63 | 91.58 | | 1995-10-31 | 45.28 | 7.88 | 82.67 | -3.87 | 94.43 | | 1995-11-30 | 54.49 | 16.67 | 92.31 | 4.79 | 104.19 | | 1995-12-31 | 81.95 | 44.02 | 119.88 | 32.10 | 131.80 | | 1996-01-31 | 21.22 | -16.90 | 59.34 | -28.88 | 71.31 | | 1996-02-29 | 29.91 | -8.37 | 68.19 | -20.40 | 80.22 | | 1996-03-31 | 36.13 | -2.31 | 74.58 | -14.39 | 86.66 | | 1996-04-30 | 36.91 | -1.70 | 75.53 | -13.83 | 87.66 | | 1996-05-31 | 30.52 | -8.26 | 69.30 | -20.44 | 81.49 | | 1996-06-30 | 36.76 | -2.18 | 75.70 | -14.42 | 87.94 | | 1996-07-31 | 46.87 | 7.77 | 85.98 | -4.52 | 98.27 | And the following code gives us our forecast chart with the confidence intervals.\nplt.figure(figsize=(12, 6)) plt.plot(rose_data.index, rose_data[&#39;Rose&#39;], label=&#39;Historical Sales&#39;, color=&#39;blue&#39;) plt.plot(forecast_index, forecast_mean, label=&#39;12-Month Forecast (Auto SARIMA)&#39;, color=&#39;purple&#39;) # 95% Confidence Interval plt.fill_between(forecast_index, forecast_conf_int_95.iloc[:, 0], forecast_conf_int_95.iloc[:, 1], color=&#39;purple&#39;, alpha=0.2, label=&#39;95% Confidence Interval&#39;) # 99% Confidence Interval plt.fill_between(forecast_index, forecast_conf_int_99.iloc[:, 0], forecast_conf_int_99.iloc[:, 1], color=&#39;purple&#39;, alpha=0.1, label=&#39;99% Confidence Interval&#39;) plt.title(&#39;12-Month Future Forecast for Rose Wine with 95% and 99% Confidence Intervals&#39;) plt.xlabel(&#39;Date&#39;) plt.ylabel(&#39;Sales&#39;) plt.legend() plt.show() The confidence intervals are extremely important, they show the stakeholders how much inherent risk exists in these predictions. And of course this tends to be missing in a ton of black-box models.\nCommon Issues and Tips When Using ARIMA\/SARIMA Misinterpreting Confidence Intervals: The intervals give us model uncertainty assuming the model is correct; they do not guarantee future observations will fall within them. Ignoring Differencing: Not differencing non-stationary data will give you poor model fit and unreliable forecasts. Mistaking Noise for Trend: Overfitting to noise can happen if parameters are too large; use information criteria and diagnostics to avoid this. Seasonality Mismatch: Seasonal period m must match your data frequency (e.g., 12 for monthly, 4 for quarterly). Data Quality: Missing values or outliers will distort model estimation; preprocess like a pro please. Overreliance on Automation: Auto-ARIMA is helpful but understand the underlying assumptions and validate results. Time Series Deserves a Comeback in the ML Toolkit I\u2019ll be honest - I love deep learning. It\u2019s exciting, and super fun to play with. But when it comes to time series forecasting in real-world business scenarios?\nIt\u2019s not always the best fit.\nMost business data is small, seasonal, and needs to be explained to someone who doesn\u2019t care about neural networks. That\u2019s where ARIMA and SARIMA really help out.\nThey\u2019re simple, fast, and surprisingly effective.\nAnd they make it easy to say why something was forecasted the way it was.\nWant to Dive Deeper? If you want to build stronger intuition around time series forecasting, try applying ARIMA\/SARIMA to your own datasets and experiment with parameter tuning and of course let me know how it goes!\n","permalink":"https:\/\/codebynight.dev\/posts\/why-time-series-deserves-comeback-forecasting-with-arima-sarima\/","summary":"<h2 id=\"deep-learning-gets-the-spotlight-but-time-series-still-solves-real-problems\">Deep Learning Gets the Spotlight, But Time Series Still Solves Real Problems<\/h2>\n<p>In the machine learning landscape today, deep learning models - transformers, LSTMs, and other neural networks steal the show.<\/p>\n<p>They\u2019re impressive, powerful, celebrated and make you feel smart too when you use them.<\/p>\n<p>However, when it comes to forecasting business metrics like sales, demand, or inventory, deep learning isn\u2019t always the answer.<\/p>\n<p>Traditional time series models, especially <strong>ARIMA<\/strong> (AutoRegressive Integrated Moving Average) and its seasonal extension <strong>SARIMA<\/strong>, are some of the most effective and interpretable methods for forecasting structured temporal data.<\/p>","title":"Why ARIMA and SARIMA Still Matter: A Technical Guide to Time Series Forecasting"},{"content":"It\u2019s been a year in data science and machine learning.\nOkay, I lied.\nTechnically a full year and a few months since I officially splooted (wanted to show off my extensive vocabulary) into the world of data science and machine learning with my master\u2019s program.\nIn late 2023 I started learning data science through a Udemy course and in January of 2024 I gave up.\nWell, not exactly per say.\nI realized it will be difficult to manage all that with a life, full time work and family time so, the solution was to do something that holds me accountable and forces me to study, and I enrolled for another masters degree.\nData Science with specialization in Machine Learning.\nAnd looking back, what started as &ldquo;I need to have some structure, so I&rsquo;ll enroll into a DS Master&rsquo;s program&rdquo; has turned into a deeply satisfying but a sweaty, sometimes highly frustrating journey. It hasn&rsquo;t just been about attending lectures or submitting assignments.\nThe real learning, the kind that actually matters, happened when I was diving into actual data, working on pipelines that seemed determined to break, and training countless models that initially flopped.\nThis isn&rsquo;t intended as a technical tutorial or a showcase. Instead, think of it as a reflection - a download of the most significant lessons that have shaped my understanding of data science and machine learning principles over the Look, my reason for writing this article are not completely altruistic.\nI want to cement these lessons in my mind as well and writing about these is exactly how I plan to do that.\nThese are insights not just about data and algorithms, but about working with ambiguity, balancing the want for speed with the need for depth, and trying to understand what truly makes someone effective as an ML engineer.\nIf you&rsquo;re starting out, perhaps in a similar program, a bootcamp, or even teaching yourself, I hope sharing these reflections resonates and maybe helps you navigate your own path with a bit more clarity (or at least, a little less of that early-days panic).\nThe lessons below aren\u2019t neatly categorized or presented in some grand order of importance.\nThey\u2019re simply the insights that have consistently showed up, whether I was building churn prediction models, exploring clustering techniques, or trying to get a deployment pipeline to behave.\nSome are technical, some are more about mindset, but all of them are born from real experience.\nOne last thing before we go ahead with the tips: I have been doing additonal work apart from what is in my curriculum and I think that is very important.\nJuggling learning Golang, Rust and doing DL before college actually covers it to trying to read and implement machine learning research papers, just a few things I have been working with.\nFocused effort might have gotten me where I am much faster but I think playing around has kept things much more interesting and fresh for someone like me. (classic ADHD behaviour)\nAlright, this intro was longer than most blog articles on the internet. Oops.\nLet\u2019s get into it.\n1. Data Cleaning: It Really Is 80% of the Work (And Your Most Important Teacher) If there\u2019s one truth that I realized early on, and am very happy about that fact then it\u2019s this: data cleaning isn&rsquo;t just a preliminary step; it&rsquo;s a massive chunk of the actual work.\nYou might have heard the &ldquo;80\/20&rdquo; rule thrown around, but I don&rsquo;t think you&rsquo;ll truly understand the weight of it until you face your first few real-world datasets.\nForget the crystal clear, ready-to-model CSVs you often get in introductory courses. Real data rarely arrives gift-wrapped.\nI remember working on a project with customer transaction data. Excited to get to modeling, I opened the files and well, it was a significant challenge.\nMissing values weren&rsquo;t just occasional; they were substantial gaps. Formatting was all over the place - dates in multiple styles, numbers being picked up as strings with embedded characters, categorical labels with stupidly minor variations (&ldquo;Region A,&rdquo; &ldquo;region_a,&rdquo; &ldquo;A Region&rdquo;) that all meant the same thing but would confuse the algorithms.\nAnd outliers? Well Well Well.\nInitially, it\u2019s easy to think you\u2019re doing something wrong, or that your technical skills are lacking because the data isn\u2019t behaving. At least I felt that way.\nIt felt like I was constantly hitting blocks before I could even begin what I thought was the &ldquo;real&rdquo; data science. But I\u2019ve come to realize that dealing with this initial mess is fundamental.\nThis isn&rsquo;t just &ldquo;janitorial work,&rdquo; it\u2019s where you truly start to understand &ldquo;data science&rdquo;.\nWhy This Tedious Data Cleaning Process is Invaluable The process of cleaning and preparing data forces you to engage deeply with it. When you play with missing values, you&rsquo;re not just deciding whether to impute or remove them; you also end up asking why they&rsquo;re missing. (at least I hope you do)\nIs it a systematic issue with data collection? Is the absence of a value a signal in itself? These questions often lead to valuable insights. For example, in one dataset, a pattern of missing information in a particular field actually correlated with a specific customer segment we hadn&rsquo;t initially considered.\nSimilarly, standardizing categories or correcting entries requires you to understand the context behind the data points.\nIt&rsquo;s an iterative process of hypothesizing, checking, and refining.\nThis back-and-forth dialogue with the data is where real understanding is built. It\u2019s less about mindlessly applying functions and more about being a good detective.\nThrough the effort of working with broken datasets, I didn&rsquo;t just end up with a cleaner dataset. I gained a much better feel for the structure, limitations, and its potential. You start to see patterns, anomalies, and relationships you would have completely missed otherwise.\nI know this might feel like I am romanticizing it too much, in fact I feel the same as I am writing this, but what&rsquo;s true is true.\nPractical Approaches and Key Takeaways for Data Handling So, how do you approach this effectively?\nHere\u2019s what I\u2019ve learned:\nMaster Your Tools (Especially Pandas): For anyone working in Python, a strong hands-on on Pandas is a non-negotiable. Functions for inspecting data (.info(), .describe(), .value_counts(), .isnull().sum()), for cleaning (.fillna(), .dropna(), .astype(), .replace()), and for transformation (.apply(), .map(), merging\/joining dataframes) are going to be your bread and butter.\nA very underappreciated resource these days is the official documentation of any library, especially by beginners. Don&rsquo;t skip on Pandas documentation - it\u2019s an invaluable resource.\nVisualize for Diagnosis: Often, a quick plot can show issues more effectively than staring at rows of numbers. A histogram can highlight outliers or skew in numerical data.\nA bar chart of categorical counts can quickly show inconsistent labeling or imbalanced classes. Libraries like Matplotlib and Seaborn are vital for this kind of exploratory and diagnostic visualization.\nIterate and Document: Data cleaning is rarely a linear process. You&rsquo;ll clean some, explore further, pull your hair on new issues, and refine your cleaning steps.\nOne huge mistake that I did was I did not document things enough from day 1, so document every transformation you make and why you made it.\nUse comments in your code or take detailed notes in a Jupyter notebook, this is important for reproducibility and for your own understanding when you come back to the project later.\nI learned this the hard way after trying to backtrack my steps for a project I\u2019d set aside for a few weeks.\nAssume the person who will maintain your code next is a pissed off version of yourself from three months in the future and document your code for that person.\nMake the future you&rsquo;s life easy.\nDomain Knowledge is Key: If possible, talk to people who are either know how the data was generated or what it really means. Understanding the business process or the context can help clear ambiguities and make your cleaning decisions for you far better than guessing what is important and what is not.\n&ldquo;Garbage In, Garbage Out&rdquo; Principle: This is absolutely central to data science. No matter how next level your model is, if it\u2019s trained on garbage data, its predictions will be, well you guessed it: garbage.\nThe effort you put in cleaning and preprocessing is a direct investment in the quality of your results.\nLearning to &ldquo;really&rdquo; clean and prepare data is about developing a critical mindset and a deeper appreciation for the raw material.\nAnd I am not overexaggerating when I say, &ldquo;It\u2019s foundational to everything that follows.&rdquo;\n2. Feature Engineering Matters More Than Fancy Models (Often, Anyway) When I first started, like everyone else I was only interested in complex algorithms. Why? Because they make you feel smart. And what good is data science if you feel stupid?\nRight at the start I spent a good amount of time thinking about which model to choose, how to tune all those hyperparameters, and whether I needed ensembles or what not.\nBut a funny thing happened as I was aiming for State-of-the-Art performance: I realized that simpler models often performed surprisingly well, sometimes even better, when I focused more on creating really solid features. (infact my capstone Churn Analysis project for year 1 is a great example of this)\nI had evaluated 6 different machine learning models for churn prediction:\nModel Test Accuracy Precision Recall F1-Score AUC-ROC Overfitting Decision Tree 0.9312 0.7732 0.8364 0.8035 0.8934 Yes Random Forest 0.9742 0.9397 0.9050 0.9220 0.9936 No XGBoost 0.9694 0.9189 0.8971 0.9079 0.9908 No AdaBoost 0.8708 0.5957 0.7230 0.6532 0.9025 Yes Na\u00efve Bayes 0.7127 0.3386 0.7414 0.4648 0.7770 No SVM 0.7744 0.4122 0.7995 0.5440 0.8526 No Tuned RF 0.9765 0.9822 0.8760 0.9261 0.9960 No Random Forest &amp; XGBoost were the top performers with high precision and AUC scores, and no signs of overfitting, so I ended up tuning the random forest further.\nI also experimented with SMOTE for handling class imbalance, but performance dropped significantly across models so oversampling isn\u2019t always the solution.\nIs XGBoost the most complex model you can ever work on? No. There are 50 more things I could have done here with the models.\nSame goes for random forest, even though they aren&rsquo;t technically simple as other basic ML models but they are relatively simple to what could have been done here.\nSo, what&rsquo;s feature engineering?\nIt&rsquo;s basically using your understanding of the data and the problem you&rsquo;re tackling, along with some creativity, to transform raw data into signals your model can effectively learn from.\nRemember I told you about domain knowledge earlier.\nKnowing which ratios to create in a digital marketing dataset will really be effective if you spend a little bit of time to understand the domain and the problem you are trying to solve.\nThe goal is to make the underlying patterns in the data much clearer.\nThink of it like this: you could have a powerful telescope, but if the sky is full of clouds - meaning your raw data is noisy or doesn&rsquo;t offer much useful information - you won\u2019t see very much.\nGood feature engineering clears away those clouds, or even better, it highlights the specific constellations you need your model to focus on.\nI was working on a project trying to predict equipment failure. Initially, I threw a bunch of raw sensor readings into a complex model and got mediocre results. Then, I started thinking about what might actually indicate an impending failure. Instead of just temperature_reading_time_X, what if I created features like rate_of_temperature_change_last_hour, or time_since_last_maintenance, or deviation_from_average_reading_for_this_sensor_type?\nEven a simpler logistic regression model started showing much better results. These new features directly tied to hypotheses about the problem.\nThe Art and Science of Feature Creation Good feature engineering is a blend of art and science.\nDomain Knowledge is Key: Yes I am repeating myself, but if there was 1 thing you should take away from behemoth of this article then it should be this. Understanding the problem space is crucial. If you&rsquo;re predicting customer churn, understanding customer behavior, common pain points, or product usage lifecycles will give you ideas for features (e.g., days_since_last_login, number_of_support_tickets_opened, change_in_usage_frequency).\nTransformations are Your Friend: This can be as simple as taking the log of a skewed variable, creating interaction terms (multiplying two features if you think their combined effect is important), or binning continuous variables into categories (e.g., age groups). For date\/time data, features like day_of_week, month, is_holiday, or time_elapsed_since_X can be also be powerful. (is_holiday is a sneaky one btw, especially for ecommerce problems)\nIt\u2019s Iterative: You won&rsquo;t come up with all your best features on day one. It&rsquo;s a process of brainstorming, creating, testing, and refining. You&rsquo;ll build a model, see where it struggles (error analysis is also your friend here), and then go back to think if there are new features that could help it understand those tricky cases.\nDon&rsquo;t Underestimate Simplicity: Sometimes the most impactful features are surprisingly straightforward. It&rsquo;s not always about complex polynomial expansions or deep learning-based embeddings.\nI now see feature engineering as a form of storytelling. You&rsquo;re guiding your model, pointing out the most important clues in the data, and helping it build a more robust understanding of the relationships you&rsquo;re trying to predict.\nWhen you get this right, you often find that a well understood, interpretable model like logistic regression or a decision tree can outperform a black box that\u2019s struggling with suboptimal features.\nSpend time here.\nIt almost always pays off.\nCheck out books like &ldquo;Feature Engineering for Machine Learning&rdquo; by Alice Zheng &amp; Amanda Casari, or even just browse Kaggle to see how top competitors approach feature creation for similar problems.\nThe book I shared is an old one but the principles behind feature engineering don&rsquo;t really change even if the actual tech, libraries, frameworks might change year on year.\n3. Imbalanced Data: Uncomfortable &amp; Frustrating But Its The Reality We Must Face Most of the really interesting, real-world problems I worked on involved imbalanced datasets (minus the first ML problem - that was magical even though I was simply training a linear regression model).\nFor example fraud detection (most transactions are not fraudulent), rare disease prediction (most people are healthy), or even certain types of customer churn (if you have very low churn, thankfully!). In these scenarios, the &ldquo;thing&rdquo; you&rsquo;re trying to predict - the minority class - is heavily outnumbered by the &ldquo;normal&rdquo; or majority class.\nThis was a huge learning curve. Why? Because everything you think you know about model evaluation, especially accuracy, gets thrown out the window.\nThink about it: you have a dataset where only 1% of cases are fraudulent.\nA model that simply predicts &ldquo;not fraudulent&rdquo; for every single case would still be 99% accurate!\nSounds great, right? But it&rsquo;s completely useless because it hasn&rsquo;t identified a single true case of fraud.\nThis is where I had my &ldquo;aha!&rdquo; (or &ldquo;oh damn!&rdquo;) moment.\nWorking with imbalanced data forces you to think much more deeply about what &ldquo;good performance&rdquo; actually means in the context of your problem.\nMetrics Beyond Accuracy: Learn that precision, recall, and the F1-score exist as well as soon as possible. Precision: Of all the times your model predicted as positive (e.g., fraudulent), how many actually were positive? Recall (Sensitivity): Of all the actual positive instances, how many did your model correctly identify? (You want to catch as much of the &ldquo;bad stuff&rdquo; as possible). The F1-score is the harmonic mean of precision and recall, basically a single metric to balance them. ROC curves and AUC (Area Under the Curve), and especially Precision-Recall curves (PR-AUC), are important for understanding the trade-offs at different decision thresholds. PR-AUC is often more helpful than ROC-AUC for highly imbalanced datasets. Understanding Business Costs: Imbalanced problems force you to think about the cost of different errors. Is a false positive (flagging a good transaction as fraud) more or less costly than a false negative (missing an actual fraudulent transaction)? The answer will of course influence how you&rsquo;ll tune your model and choose your thresholds. Specialized Techniques: You start exploring techniques specifically designed for imbalanced data. This might include: Resampling: Oversampling the minority class (like with SMOTE - Synthetic Minority Over-sampling Technique, which creates new synthetic examples of the minority class) or undersampling the majority class. Each has its pros and cons. I found that just randomly oversampling often led to overfitting, so techniques like SMOTE, which are a bit smarter, were more helpful. Cost-Sensitive Learning: Some algorithms allow you to assign different weights to misclassification errors, effectively telling the model that misclassifying a minority class instance is &ldquo;worse.&rdquo; Ensemble Methods: Sometimes, ensemble can be adapted to work well with imbalanced data. More than anything, working with imbalanced datasets taught me to be a more critical thinker.\nIt pushed me away from chasing a single accuracy number and forced me to engage with the core of the problem, the limitations of the data, and the practical implications of my model&rsquo;s predictions.\nIf you&rsquo;re facing this, I&rsquo;d recommend looking up research papers on &ldquo;imbalanced learning&rdquo; or specific techniques like SMOTE to get a deeper understanding. On second though, a proper research paper might be overkill for this, there are many great blog posts and articles explaining these concepts with practical code examples too, so check those out. (Official documentation is a great way to go)\n4. Always Work With Real-World Data (Or As Soon As You Can) Clean, synthetic datasets like Iris or the Titanic dataset are great when you&rsquo;re first learning the about a new algorithm or library. They allow you to focus on the mechanics without getting pulled down.\nBut, and this is a big but, the faster you can transition to working with messy, real-world datasets, the faster you&rsquo;ll grasp what data science is actually like in the real world.\nWhat I have come to understand is that data science isn&rsquo;t primarily about solving perfectly defined puzzles with clean inputs. It\u2019s about making sense of ambiguity, working through complexity, and dealing with often incomplete information.\nReal-world datasets are going to throw all of this at you and you will love it. (at least after pulling some of hair you will)\nContext is Everything: Real data comes with real context. You&rsquo;re not just predicting a number; you&rsquo;re trying to solve a problem for a business, a scientific puzzle, or a need.\nThis forces you to ask better questions: Who generated this data? Why? What are the known limitations? What does a &ldquo;good&rdquo; outcome actually mean for the stakeholders? This mind shift from a purely technical to a problem-solving one is really important.\nEmbrace the Mess (Again): As I mentioned above in data cleaning section, real data will test your patience and your skills.\nThis is where the most valuable learning happens. It&rsquo;s one thing to read about handling missing data; it&rsquo;s another to stare at a column with 30% missing values for a critical predictor and have to decide on a strategy. (or should you give up and retire into a forest completely offgrid)\nHumility: Real world data doesn&rsquo;t care about your perfectly crafted sklearn pipeline or how well your model performed on a Kaggle competition with pre cleaned data.\nIt will expose the flaws in your assumptions and challenge your creativity. This is a good thing! It keeps you grounded and focused on robust, practical solutions.\nThe first time I was given a dataset from an ongoing business process. It was a collection of spreadsheets, shopify exports, google ad campaign exports and even some manually entered logs for various SKUs for a company with 3 ecom stores.\nThe documentation was 0. The task was somewhat vaguely defined: can you help us with your &lsquo;data science&rsquo; to get better ROAS, which is return on advertising spend just in case you are not from marketing side of the world.\nMy initial reaction was simply me getting a bit flustered. But as I started to dig in, asking questions, and trying to piece things together, I learned more in those few weeks than in months of structured tutorials.\nI learned about data governance (maybe, I guess I did), the importance of clear communication with data owners, and the iterative nature of problem definition.\nSo, my advice is: try out real-world projects.\nThis could be through internships, capstone projects, contributing to open source projects that use real data, or even finding public datasets from government agencies, non-profits, or platforms like Kaggle (but look for the less polished &ldquo;real&rdquo; datasets, not just the clean competition ones).\nThe experience will be invaluable.\n5. Model Evaluation is So Much More Than Accuracy For a surprisingly long time, I equated &ldquo;good model&rdquo; with &ldquo;high accuracy.&rdquo; And I think most students in my class did too.\nIt&rsquo;s an easy metric to understand and often the default in many courses.\nThen came the churn project where a model with really good accuracy was, in reality, failing to identify most of the customers who were actually churning.\nThat was a cruel but necessary wake up call: accuracy can be incredibly misleading, especially with imbalanced classes or when the costs of different errors vary significantly.\nMetrics like precision, recall, and the F1-score are not just academic concepts; they are important for understanding a model&rsquo;s performance in a way that aligns with actual business or real world objectives.\nThe Confusion Matrix is Cool: Don&rsquo;t just look at the aggregate metrics.\nDig into the confusion matrix.\nHow many true positives, true negatives, false positives, and false negatives are you getting?\nSeeing these raw numbers usually tells a much clearer story.\nFor that churn model, the confusion matrix clearly showed that we were correctly identifying most non-churners (true negatives), but we were missing a huge chunk of actual churners (false negatives).\nAlign with Goals: A model that identifies fewer churners but is very precise about the ones it does identify might be more useful if the intervention to prevent churn is expensive.\nIf the intervention is cheap and catching as many potential churners as possible is the most important thing, recall becomes more critical.\nThese trade-offs are always present.\nSimulate Business Impact: Whenever possible, try to translate model performance into potential business impact.\nIf your fraud model catches an extra X% of fraud, what does that mean in terms of dollars saved?\nIf your recommendation engine improves click-through by Y%, what&rsquo;s the potential revenue impact?\nThis will help bridge the gap between technical metrics and stakeholder understanding.\nNow, when I evaluate a model, I go through a checklist like this:\nWhat is the actual goal? What problem are we trying to solve? What are the costs of different types of errors (false positives vs. false negatives)? Is the dataset imbalanced? If so, accuracy is probably not the primary metric. What do the confusion matrix, precision, recall, F1-score, ROC-AUC, and PR-AUC tell me? Can I look at predictions for specific segments or edge cases to understand where the model excels and where it fails? Who will use this model, and what decisions will it drive? Does my evaluation provide them with the information they need to trust and use it effectively? Thinking beyond a single number and about the broader context as well as consequences of a model\u2019s predictions is what separates a data analyst from a data scientist who can deliver real strategic value.\n6. EDA Isn&rsquo;t Just a Checkbox In many tutorials and college class settings, Exploratory Data Analysis can sometimes feel like a &ldquo;let&rsquo;s just get done with it fast so we can move to the cool stuff&rdquo; step: generate a few bar charts, a heatmap, calculate some summary statistics, and then quickly move on to modeling.\nAnd look, I am guilty of doing this too. &ldquo;Let&rsquo;s get through the charts so I can build the actual model.&rdquo; I now realize how shortsighted that was. In the real world, EDA is often where your actual understanding of the problem and the data really begins. It\u2019s where the data starts to speak to you, if you listen carefully. Okay maybe &ldquo;data speaks to you&rdquo; is a bit too much, but you get the point, right?\nDeep EDA has saved me from going down wrong paths and has often helped me find insights that were far more valuable than the eventual model itself. Yep, that happens. Ask any data scientist working with real world data.\nFinding Hidden Stuff: EDA is your chance to find the &ldquo;unknown unknowns.&rdquo; It helped me find outliers that weren&rsquo;t just errors, but represented genuinely unusual (and important) events. It meant surprising correlations between variables I hadn\u2019t initially thought were related. I\u2019ve found seasonality trends, data entry biases, and missing value patterns that told a story about the underlying processes generating the data.\nBoost to Feature Engineering: The insights from EDA are direct inputs into your feature engineering process. If you see a non-linear relationship between a variable and your target, well, a transformation might be needed. If certain categories in a feature behave very differently, that might mean you need a new grouping strategy.\nRefining the Problem: Sometimes, what you discover during EDA can lead you to reframe the entire problem. You might realize the target variable isn&rsquo;t what you thought it was, or that the available data is better to answer a slightly different, but maybe equally valuable, question.\nHelping Build Intuition: Simply spending time visualizing and summarizing your data in different ways builds an intuition for it. You start to &ldquo;feel&rdquo; it, its quirks, its strengths, and its weaknesses. This intuition is invaluable when it comes to modeling and interpreting results.\nMy EDA process now is much more patient and curious.\nI use a combination of tools, even though they are basic and fundamental:\nPandas or similar libraries can give a great automated overview to start with, highlighting potential issues quickly. Matplotlib and Seaborn (and sometimes Plotly for interactive visuals) are my go-to for custom plots. Histograms, box plots, scatter plots, pair plots, heatmaps of correlations - each tells a different part of the story. I ask a lot of questions: &ldquo;What does the distribution of this variable look like?&rdquo; &ldquo;How does this variable relate to the target?&rdquo; &ldquo;Are there any strange patterns or clusters?&rdquo; &ldquo;What happens if I segment the data by X or Y?&rdquo; If you&rsquo;re rushing through EDA, you&rsquo;re likely leaving insights on the table.\nThe better your EDA, the better your hypotheses, your features, your models, and ultimately, your ability to solve the problem. Period.\nIt\u2019s an investment that pays dividends throughout the entire project lifecycle.\n7. Version Control Isn&rsquo;t Just for Software Engineers, It&rsquo;s For Data Scientists Too I cannot emphasize this enough: learn Git. Use Git. Make Git your friend.\nEven if you&rsquo;re working solo on a small project.\nEven if you&rsquo;re just experimenting with a new dataset in a Jupyter Notebook.\nVersion control isn&rsquo;t just a tool for large software development teams pushing production code; it&rsquo;s a great practice for tracking your thought process, managing your experiments, and saving yourself from countless headaches.\nThere were times, especially early on, when I&rsquo;d be tweaking a script or a notebook, trying different approaches, and suddenly realize I&rsquo;d broken something that was working the day before.\nAnd I&rsquo;d have no clear idea what I changed or how to get back.\nThat feeling is awful.\nGit is the safety net that saves you from this.\nYour Personal Time Machine: With Git, you can commit your changes at meaningful checkpoints. Think of commits as snapshots of your project. If you mess something up, you can always revert to a previous working version.\nUnderstanding Your Own Work: Writing good commit messages (e.g., &ldquo;Implemented feature X,&rdquo; &ldquo;Fixed bug in data cleaning for Y,&rdquo; &ldquo;Experimented with Z hyperparameter for model A&rdquo;) forces you to articulate what you&rsquo;ve done. When you look back at your commit history, it becomes a log of your project&rsquo;s evolution and your decision making process. It\u2019s surprisingly helpful for remembering your own train of thought.\nBranching for Experiments: Want to try a totally different approach to feature engineering without messing up your main working version? Create a new branch! You can experiment freely in that branch, and if it works out, merge it back. If it doesn&rsquo;t, you can just discard the branch. This is fantastic for trying out new ideas.\nCollaboration (Even with Future You): If you ever work with others, Git is non-negotiable for managing contributions. But even for solo projects, &ldquo;future you&rdquo; will thank &ldquo;past you&rdquo; for a well maintained Git repo when you need to come back to an old project.\nIt Feels Professional: Honestly, getting comfortable with Git and GitHub also just makes you feel more competent and smart. And who doesn&rsquo;t love a bit of an ego boost.\nLearning Git has a bit of a curve, I won&rsquo;t lie. Concepts like staging, committing, branching, merging, and remotes can be confusing at first. Start simple: git init, git add ., git commit -m &quot;My awesome work&quot;, git push.\nGradually add more commands as you need them. As I started to contributing to open source and other repos I started to learn more and more about Git and diffrent workflows and commands.\nI&rsquo;m not sure I still know it well but more often than not I&rsquo;m able to troubleshoot if I get stuck somewhere with Git now, and then there are always AI tools around to help explain the errors.\n8. One Deep Project Beats Ten Shallow Ones In the rush to build a portfolio or feel productive, it&rsquo;s easy to fall into the trap of trying to complete many small, quick projects. The &ldquo;10 projects in 10 weeks&rdquo; mentality. While there&rsquo;s some value in getting exposure to different datasets and problems, I&rsquo;ve found that you will learn the most from going deep on a single, substantial project.\nMy capstone project, which involved developing a customer segmentation model for an e-commerce dataset, taught me more than a dozen smaller tutorial-based projects combined. Why? Because depth forces you to deal with the complexities that shallow projects often just skim over.\nEnd-to-End Experience: A deep project usually means taking something from raw data all the way to a final output, whether that&rsquo;s a deployed model, a detailed report, or a presentation of insights. This means you have to work with every stage: data acquisition, cleaning, EDA, feature engineering, multiple iterations of modeling, rigorous evaluation, interpretation, and communicating your findings.\nReal Problem-Solving: Superficial projects often have well-defined paths. Deeper projects are more like real-world assignments - they tend to have ambiguity built in.\nYou have to define the scope, make choices with incomplete information, and iterate based on what you discover. You might hit dead ends and have to backtrack. This is where real problem solving skills are built.\nNuance and Trade-offs: When you spend months on a project, you have the time to explore the nuances. You can try different modeling approaches, experiment with a wide set of features, and really dig into why certain things work and others don&rsquo;t. You&rsquo;re more or less forced to think about trade-offs - model complexity vs. interpretability, precision vs. recall, development time vs. performance.\nCommunication and Justification: If you&rsquo;re working on a significant project, you&rsquo;ll most probably have to explain your methodology and results to others (even if it&rsquo;s just for a course). This forces you to clarify your thinking, justify your decisions, and learn how to communicate complex technical ideas effectively. And this is one of the important skills for a data scientist I hear.\nA portfolio filled with quick, similar projects might look busy, it&rsquo;s the project where you can talk passionately about the challenges you faced, the iterations you went through, and the lessons you learned along the way that will actually impress and demonstrate your capabilities.\nDon&rsquo;t be afraid to dedicate significant time to one or two complex projects. The depth of understanding you gain will be far more valuable in the long run. IMHO.\n9. Your &ldquo;Best&rdquo; Model Might Not Be the &ldquo;Smartest&rdquo; One There&rsquo;s a certain pull to using the latest, most complex, or highest-performing algorithm from some leaderboard. We all want to build &ldquo;smart&rdquo; models.\nSimply because it makes us feel smart.\nHowever, one of the most practical lessons I&rsquo;ve learned is that the theoretically &ldquo;smartest&rdquo; or most complex model isn&rsquo;t always the best one for the job in a real-world context.\nPracticality, interpretability, and maintainability often matter more than raw predictive power at times.\nI&rsquo;ve had situations where a well tuned XGBoost model achieved a slightly higher AUC score than a simpler logistic regression or decision tree.\nBut when it came time to explain why the model was making certain predictions, or how a particular input was influencing the outcome, the simpler model was far better.\nAnd often, stakeholders (especially non-technical ones) need that understanding to trust and act on a model&rsquo;s output.\nInterpretability Matters: If a model is a complete &ldquo;black box,&rdquo; it&rsquo;s hard for users to trust it, especially in high-stakes domains like finance, healthcare, or legal applications. Simpler models are often inherently more interpretable. Ease of Deployment and Maintenance: Simpler models are generally easier to deploy, faster to make predictions with, and require less compute. They are also often easier to debug and maintain over time. If a model is going into a production system, these factors can be just as important as a marginal gain in accuracy. Stability and Robustness: Sometimes, highly complex models can be &ldquo;brittle&rdquo; - they might perform exceptionally well on the specific dataset they were trained on but fail to generalize well to slightly different or new data. Simpler models can sometimes be more robust. &ldquo;Good Enough&rdquo; is Often Good Enough: What&rsquo;s the incremental business value of that extra 0.5% in F1 score? If it comes at the cost of significant complexity, longer development time, or reduced interpretability, is it worth it? The answer isn&rsquo;t always yes. We need to ask: what level of performance is actually needed to solve the business problem effectively? This doesn&rsquo;t mean you shouldn&rsquo;t explore and learn about advanced models.\nAbsolutely do! But always weigh the benefits of added complexity against the practical costs.\nI now ask myself: &ldquo;Do we really need this level of complexity here? What are we gaining, and what are we potentially losing in terms of clarity, trust, and deployability?&rdquo;\nSometimes, a well-featured logistic regression is exactly the hero you need.\n10. Just Because It&rsquo;s in the Data Doesn&rsquo;t Mean It Should Be Used This one ties into both data cleaning and feature engineering, but it deserves its own spotlight because it touches on an important aspect of responsible data science: feature selection is just as important as feature creation, and sometimes what you exclude is as vital as what you include.\nBeyond obvious target leakage, there are other reasons to be selective:\nNoise and Redundancy: Including too many irrelevant or redundant features can actually hurt your model&rsquo;s performance. They can add noise, making it harder for the algorithm to discern the true signals. They can also increase computational cost and training time. Overfitting: Models with too many features (especially relative to the number of observations) are more prone to overfitting - learning the noise in the training data too well and failing to generalize to new, unseen data. Interpretability (Again): Fewer, well-chosen features generally make a model easier to understand and explain. Ethical Considerations and Bias: This is a huge one. Some features, while potentially predictive, might be proxies for sensitive attributes like race, gender, or socioeconomic status, leading to biased or unfair outcomes. For example, using zip code as a feature in loan applications could inadvertently perpetuate historical redlining if not handled with care and awareness. It&rsquo;s our responsibility to critically examine our features and ask: &ldquo;Does this feature make sense to use? Is it fair? Could it lead to harmful discrimination?&rdquo; This is something I learnt while I was a part of Omdena&rsquo;s non profit machine learning project to introduce machine learning and AI into a legal scenario for US courts. Learning to critically evaluate and remove features is a skill.\nYou might get attached to a feature you spent a lot of time engineering. Yep, you can get attached to features.\nBut if it&rsquo;s not adding real, generalizable predictive power, or if it poses an ethical risk, it needs to go.\nAsk yourself: &ldquo;Would I, as a human, use this piece of information to make this decision in a fair and logical way?&rdquo;\nIf the answer is no, your model probably shouldn&rsquo;t either.\nThis often requires not just statistical analysis (like looking at feature importance scores or running recursive feature elimination), but also strong domain knowledge and ethical reasoning.\nThis is slightly different than the approach you might take for a deep learning unsupervised model but then again even with those it makes sense to prepare data well in order for your model to work as you intend it to.\n11. Machine Learning Projects Are Communication Projects in Disguise This was a slow-burn realization for me, but it\u2019s become one of my core beliefs about this field.\nYou can build the most technically brilliant, highest-performing model in the world, but if you can&rsquo;t explain it clearly, persuasively, and with empathy, its impact will be limited.\nBuilding the model is often just step one; effectively communicating its value, insights, and limitations is where most of the real-world success lies.\nStakeholders, especially non-technicals ones most of the times don&rsquo;t care about log loss or gradient descent. They care about what the model meant for their business goals: How will this help us reduce costs? How can this improve customer satisfaction? Can we trust these predictions to make better decisions?\nI now dedicate a significant portion of my project time to thinking about communication:\nKnow Your Audience: Are you talking to other data scientists, product managers, engineers, or executives? Tailor your language, level of technical detail, and visualizations accordingly. Ask &ldquo;What are their priorities and concerns?&rdquo; Focus on the &ldquo;So What?&rdquo;: Don&rsquo;t just present results; explain their implications. Connect the model&rsquo;s output directly to the business problem and the decisions it can help make. Instead of saying &ldquo;The model has an F1-score of 0.75,&rdquo; try &ldquo;This model can help us identify 75% of high-risk customers, allowing us to proactively engage them and potentially reduce churn by X%.&rdquo; Visualize for Clarity: Good charts and visuals are incredibly powerful for conveying complex information simply. A well-designed graph can often tell a story much more effectively than a table of numbers or a dense paragraph of text. Think about dashboards, clear summary slides, and intuitive ways to show model predictions or feature importance. Tell a Story: Frame your insights as a narrative. What was the problem? What did you discover in the data? How does your model address the problem? What are the key insights and recommended actions? A good story is engaging and memorable. Be Honest About Limitations: No model is perfect. Clearly communicate the assumptions you made, the potential biases in the data or model, and the situations where the model might not perform well. This builds trust and manages expectations. Learning to be a good &ldquo;translator&rdquo; between the technical(ML) and the practical world of business or domain experts is a skill that will make you incredibly valuable.\nIt\u2019s not just about Python and algorithms; it\u2019s about empathy, clarity, and persuasion.\n12. A Good Model That No One Understands is a Bad Model (Usually) This builds directly on the previous point but I wanted to take a couple paragraphs to focus specifically on interpretability.\nEspecially in applications where decisions have significant consequences - like loan approvals, medical diagnoses, hiring, or churn management - if your model is a complete &ldquo;black box&rdquo; that spits out predictions without any discernible logic, people will be hesitant to trust it, adopt it, or rely on it.\nAnd rightly so. Business stakeholders like predictability and a black box does not reinforce predictability and stability.\nI used to think that as long as the model was accurate, its internal workings weren&rsquo;t that important for the end-user.\nI\u2019ve now realized that interpretability isn&rsquo;t just a &ldquo;nice-to-have&rdquo;; it&rsquo;s more or less essential for building trust, enabling debugging, ensuring fairness, and facilitating human oversight.\nBuilding Trust: If stakeholders can understand why a model makes a certain prediction, they are much more likely to trust its outputs and integrate it into their workflows. If a customer service agent is told to offer a specific retention incentive to a customer flagged by a churn model, understanding the key factors driving that flag (e.g., &ldquo;decreased usage,&rdquo; &ldquo;recent support complaint&rdquo;) makes the recommendation more actionable and credible. Debugging and Improvement: If a model is making strange or incorrect predictions, interpretability can help you diagnose the problem. Are there specific features that are having an undue influence? Is it learning spurious correlations? Understanding the &ldquo;reasoning&rdquo; can guide your efforts to improve it. Fairness and Bias Detection: Interpretability tools can help uncover if a model is relying on sensitive or proxy variables in an unfair way. If you can see that a certain demographic group is consistently receiving adverse predictions due to a particular feature, you can investigate and mitigate that bias. Regulatory Compliance and Accountability: In some industries (like finance with credit scoring), there are legal requirements for models to be explainable. Even without explicit regulation, being able to explain how a decision was made is crucial for accountability. Simpler models like linear regression or decision trees are inherently more interpretable, but even for more complex models (like ensemble methods or neural networks), there are tools and techniques to help explain their behavior simply.\nSHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) can help explain individual predictions by showing the contribution of each feature. I\u2019ve found these quite useful for understanding what pushes my models, even if just for my own sanity. Partial Dependence Plots (PDPs) or Individual Conditional Expectation (ICE) plots can help visualize how a model&rsquo;s prediction changes as you vary a specific feature. The key mindset shift for me was moving from &ldquo;Is this model accurate?&rdquo; to &ldquo;Is this model useful, trustworthy, and actionable?&rdquo;\nA model&rsquo;s job isn&rsquo;t just to predict; it&rsquo;s to provide insight and support better human decision-making.\nAnd that almost always requires a degree of clarity and interpretability.\n13. MLOps is Real, and It Will Come for You (Eventually, and Sooner Than You Think) When I first started, &ldquo;MLOps&rdquo; sounded like something only big tech companies with armies of engineers needed to worry about.\nMy focus was on getting my models to work in a Jupyter Notebook.\nReproducibility? Versioning data? Tracking experiments systematically? That felt like overkill for my relatively small student projects.\nThe wake-up call came when I had to come back to a project after a few months because I wanted to build on it as a portfolio project.\nI needed to re-run a model, possibly with slightly updated data.\nAnd I realized that I couldn&rsquo;t quite remember all the specific preprocessing steps I\u2019d taken before landing on the one that was now in my notebook.\nIt was a mess.\nThat\u2019s when I understood that MLOps isn&rsquo;t just for massive scale; it&rsquo;s about professionalism, reproducibility, and efficiency, even for personal projects.\nMLOps is a broad field, but here are a few foundational concepts that I\u2019ve started incorporating, even into my own learning projects, that have made a huge difference:\nExperiment Tracking: Tools like MLflow (which is open source and relatively easy to get started with) or Weights &amp; Biases allow you to log your model parameters, metrics, code versions, and even output artifacts for every run. This creates an organized history of your experiments, making it easy to compare results and recall what worked. No more model_final_v2_actually_final_really_final.ipynb! Code Structure and Modularity: Moving away from monolithic Jupyter Notebooks for anything more than initial exploration. Structuring code into reusable Python scripts for data preprocessing, feature engineering, training, and evaluation makes it much more manageable, testable, and easier to integrate into a pipeline. Data and Model Versioning: Just like you version your code with Git, you should also think about versioning your datasets and your trained models. This ensures that if you need to reproduce a result or understand why performance changed, you can trace back the exact data and model artifact used. Basic Automation\/Pipelines: Even a simple shell script or a Python script that runs your sequence of data processing, training, and evaluation steps can save a lot of manual effort and reduce errors. You don\u2019t need to become an MLOps expert overnight.\nBut starting to think about these principles early and incorporating even simple practices will make your life much easier, your work more reliable, and your skills more valuable.\nThere are tons of great blogs and video tutorials on MLOps - just start small and build up.\n14. Churn (or Any Target Variable) Isn&rsquo;t Just a Number. It&rsquo;s a Story When I built my first churn prediction model, my primary focus was, naturally, on the prediction itself: Will this customer churn, yes or no? How accurate is my model at making this binary classification?\nBut as I spent more time with the problem and the data, I realized: understanding why customers churn, and what the underlying drivers are, is often far more valuable than just predicting the event itself.\nThe target variable isn&rsquo;t just a &lsquo;0&rsquo; or a &lsquo;1&rsquo;; it represents a story, an outcome of different factors and experiences.\nThis shift in perspective changed how I approached the entire project.\nPrediction to Insight: I started paying much more attention to feature importance scores from my models. Which factors were most strongly correlated with a customer&rsquo;s decision to leave? Was it poor customer service interactions (e.g., high number of support tickets)? Was it a lack of engagement with key product features? Was it price sensitivity in a particular segment? Actionable Insights for Business Strategy: These insights, derived from the model, could then be translated into potential business actions. If &ldquo;number of unresolved support tickets&rdquo; is a major churn driver, the business can focus on improving customer service response times or first-call resolution. If &ldquo;low usage of new premium features&rdquo; is a flag, perhaps better onboarding or targeted marketing for those features is needed. Segmentation and Personalization: Understanding churn drivers can also help segment customers. Are there different &ldquo;churn personas&rdquo; who leave for different reasons? This allows for more targeted and effective retention strategies rather than a one-size-fits-all approach. Narrative Building: The model and its EDA became tools for building a narrative about the customer journey and the points where trust or value might be leaking. This is often what works well with stakeholders and drives change. I came to see that my role wasn&rsquo;t just to identify which customers were likely to leave, but to help the business understand the &ldquo;story of churn&rdquo; within their customer base.\nThis meant looking at patterns, understanding the context, and connecting the dots in a way that could inform proactive strategies.\nSo, whatever you&rsquo;re trying to predict, remember to look beyond the prediction itself. I came back to that idea later in Churn Is Not a Data Science Problem, after realizing the prediction is only one tiny part of whether anyone gets retained.\nDig into the &ldquo;why.&rdquo; That&rsquo;s often where the best insights and the opportunities for impact tend to lie.\n15. You Will Feel Like an Imposter. And You Are Not Alone Let&rsquo;s be honest: there have been tons of moments this past year where I&rsquo;ve felt like a complete fraud.\nWhen I couldn&rsquo;t get a model to work after hours of trying.\nWhen someone in a lecture asked a question about the underlying math of an algorithm that made me freeze right there in my shorts (remote lectures so no pants lol).\nWhen I read a great blog post or a cutting-edge research paper and felt hopelessly behind because I felt like I was reading gibberish.\nThat little voice whispering, &ldquo;You don&rsquo;t belong here. You&rsquo;re not smart enough for this. You&rsquo;re a marketer, you can&rsquo;t do this. You&rsquo;ve always been behind at Maths, what are you going to do in ML. So what if you did an ML project as your graduation thesis, its been a decade, don&rsquo;t be naive, quit this and go back to being a marketing guy.&rdquo;\nThat&rsquo;s impostor syndrome, and it&rsquo;s incredibly common in this field (and many others, especially for learners).\nWhat I&rsquo;ve slowly, and painfully, come to realize is that almost everyone feels this way at some point, even the people you look up to as experts.\nIn tech, a field that&rsquo;s constantly evolving, with new tools, techniques, and research appearing daily, it&rsquo;s virtually impossible to know everything.\nIt Means You&rsquo;re Learning: Often, that feeling of inadequacy pops up when you&rsquo;re learning something new, tackling something new and challenging. And that&rsquo;s exactly where growth happens. If you always felt completely comfortable, you probably wouldn&rsquo;t be learning much. The Field is Vast: Data science and machine learning are incredibly broad. There are specialists in NLP, computer vision, reinforcement learning, MLOps, data engineering, causal inference, ethics&hellip; No one is an expert in all of it. It&rsquo;s okay to have areas where you&rsquo;re still learning (which is, for most of us, most areas!). Comparison is the Thief of Joy (and Confidence): It&rsquo;s so easy to look at someone else&rsquo;s curated GitHub profile or their impressive job title and feel like you&rsquo;re falling short. But you&rsquo;re only seeing their highlight reel, not their struggles, their own moments of doubt, or the years of work that got them there. Focus on your own journey and your own progress. So, when that feeling of impostor syndrome hits (and it probably will, multiple times), try to acknowledge it without letting it derail you.\nRemind yourself that it&rsquo;s a common part of the learning process.\nFocus on what you have learned, celebrate your small wins, and keep putting one foot in front of the other.\nIt means you care about what you&rsquo;re doing and that you&rsquo;re challenging yourself.\nAnd that, in itself, is something to be proud of.\n16. Learning is Bigger Than Specific Tools Python. Pandas, NumPy, Scikit-learn. Matplotlib, Seaborn. TensorFlow, PyTorch. SQL. Git. Docker. Cloud platforms like AWS or GCP.\nThe list of tools and tech in the data science ecosystem can seem endless and, a bit daunting when you&rsquo;re starting out.\nI definitely felt pressure to learn all the things.\nWhile proficiency in relevant tools is important (and you will need to get comfortable with a core set like Python and the core data science libraries), I&rsquo;ve come to believe that the underlying concepts and the problem-solving mindset are far more critical and enduring than mastery of any single tool.\nTools Evolve, Fundamentals Stay Strong: The hot new library or framework today might get dumped on by something else in a few years. But the fundamental principles of statistics, how to frame a problem, how to critically evaluate data, how to design experiments, and how to interpret results - these are timeless.\nFocus on &ldquo;How to Think&rdquo;: Can you take an ambiguous problem and break it down into manageable, data-addressable questions?\nCan you think about potential biases and limitations? Can you choose an appropriate methodology for the task at hand? Can you clearly articulate your assumptions and your findings? These &ldquo;thinking&rdquo; skills are tool-agnostic and will serve you well regardless of the specific software you&rsquo;re using.\nTransferable Skills: Once you understand why you&rsquo;re doing something (e.g., why you need to normalize features or why a certain evaluation metric is appropriate), learning the syntax to do it in a new tool is often much easier. The conceptual understanding is the harder, more valuable part.\nAvoid &ldquo;Tool-Driven&rdquo; Problem Solving: Don&rsquo;t let your comfort with a specific tool dictate how you approach every problem (&ldquo;I know how to use random forests, so I&rsquo;ll use a random forest here!&rdquo;). Instead, let the problem decide your choice of methods and, consequently, tools.\nSo yes, learn the tools.\nGet your hands dirty with code.\nBuild things.\nBut don&rsquo;t define yourself or your abilities solely by the list of software on your resume.\nPrioritize understanding the &ldquo;why&rdquo; behind the &ldquo;what,&rdquo; and cultivate your analytical and critical thinking.\nThose are the skills that truly make a data scientist adaptable and valuable in the long run.\n17. It&rsquo;s Okay to Go Slow on the Math. But Please, Don&rsquo;t Skip It There were definitely moments, particularly when going into the theory behind certain algorithms, where the math felt crazy.\nEigenvectors and eigenvalues for PCA?\nThe calculus behind backpropagation in neural networks?\nThe statistical assumptions underpinning linear regression?\nI&rsquo;d stare at the equations, and my eyes would start watering.\nThe temptation to just import the library, run .fit() and .predict()was strong.\nWhile you don&rsquo;t necessarily need to be able to derive every formula from scratch to be an effective applied data scientist, I&rsquo;ve learned that taking the time to understand the underlying mathematical and statistical concepts - even at an intuitive level - is really helpful.\nSkipping it entirely can leave you vulnerable.\nDeeper Understanding and Confidence: When you have at least a conceptual grasp of how an algorithm works, you become more confident in using it appropriately. You understand its strengths, its weaknesses, and the assumptions it&rsquo;s making. This helps you to make more informed choices about which algorithm to use and how to interpret its results. Better Debugging: If your model is behaving unexpectedly, having some understanding of its internal mechanics can help you troubleshoot. Is it struggling with outliers because of the way its loss function is defined? Are your features scaled inappropriately for an algorithm that&rsquo;s sensitive to feature magnitudes? Informed Hyperparameter Tuning: Many hyperparameters directly relate to the underlying math. Understanding what they control allows you to tune them more intelligently than just randomly trying values. Explaining to Others (and Yourself): If you need to explain why a model is making certain predictions, or why you chose a particular approach, having that foundational knowledge (even if you simplify it for your audience) adds a lot of credibility. Moving Beyond Black Boxes: Relying solely on high-level library calls without any understanding of what&rsquo;s happening underneath can limit your ability to customize, adapt, or innovate. It&rsquo;s okay if it takes time.\nIt took me weeks to get an intuitive feel for some concepts and months for others.\nI re-read explanations, watched videos (shoutout to resources like 3Blue1Brown on YouTube for amazing visual explanations of complex math), and worked through examples slowly.\nFor math specifically I also took the specialization of mathematics for machine learning on coursera which was damn helpful - and I finished it twice in 1 year, and probably will do it once more in the next couple of months.\nThe goal isn&rsquo;t necessarily to become a research mathematician, but to build enough intuition so that the algorithms aren&rsquo;t just magic. Finishing the master\u2019s made that lesson feel even more real, which I wrote about in My Machine Learning master\u2019s degree made AI feel less magical.\nGo at your own pace, use different resources, but don&rsquo;t shy away from the math.\n18. The Best Learning Comes From Projects, Not Just Courses Courses, bootcamps, and textbooks are great for providing structure, introducing new concepts, and giving you a foundational roadmap.\nBut I&rsquo;ve found that the most impactful, sticky learning comes from applying that knowledge by working on end-to-end projects.\nThere&rsquo;s a world of difference between watching a lecture on logistic regression and actually trying to implement it on a messy dataset, struggling with feature scaling, interpreting the coefficients, and then trying to explain your findings.\nActive vs. Passive Learning: Courses can sometimes be a passive experience. Projects force you into active problem-solving. You have to make decisions, encounter errors, search for solutions, and iterate. This struggle is where &ldquo;deep learning&rdquo; happens. (did you see what I just did there?) Connecting the Dots: Projects require you to integrate knowledge from different areas. You&rsquo;re not just learning about data cleaning in one module and modeling in another; you&rsquo;re doing it all together, seeing how the pieces fit and influence each other. Dealing with Reality: Real (or realistic) project data is messy and ambiguous. Courses usually simplify this. Projects throw you into the complexities, forcing you to adapt and develop a more robust skillset. Building a Portfolio (and Confidence): Completing a project, especially one you&rsquo;re passionate about or that solves a real problem, gives you something tangible to show for your efforts. More importantly, it builds your confidence in your ability to actually do data science. If you feel like you&rsquo;re stuck in &ldquo;tutorial hell&rdquo; - passively consuming content without feeling like your skills are truly growing - the best antidote is to start a project.\nPick a dataset that interests you (Kaggle, government open data sites, or even data you collect yourself).\nDefine a question you want to answer or a problem you want to solve.\nAnd then try to build something, however small, from start to finish.\nBreak it. Fix it. Learn from it.\nThat cycle of building, struggling, and overcoming is the fast track to mastery.\n19. Just-in-Time Learning Usually Beats Just-in-Case Learning When I first got serious about data science, I was a resource hoarder. I had tons of bookmarked articles, downloaded PDFs of research papers, saved tutorials - all on topics I thought I might need &ldquo;just in case.&rdquo;\nMy thinking was, &ldquo;I need to learn all of this before I can be effective.&rdquo;\nThe result? Burnout and a lot of unread material.\nI&rsquo;ve since moved much more towards a &ldquo;just-in-time&rdquo; learning approach.\nThis means focusing my learning efforts on what I need to solve the specific problem or understand the specific concept I&rsquo;m working with right now.\nMotivation and Relevance: When you&rsquo;re trying to solve an immediate problem, your motivation to learn the skills or concepts is much higher. The information feels directly relevant and applicable, which helps with comprehension and retention. Trying to learn about, say, advanced time series models &ldquo;just in case&rdquo; is much harder than learning about them when you&rsquo;re actively working on a forecasting project. Reduces Overwhelm: The sheer volume of information in data science can be paralyzing. A just-in-time approach allows you to learn in more manageable chunks, focusing on depth in the area you currently need, rather than trying to achieve breadth across everything simultaneously. Faster Application, Better Retention: When you learn something and immediately apply it, you&rsquo;re much more likely to remember it. The practical application solidifies the theoretical knowledge. Builds Resourcefulness: This approach also builds the skill of knowing how to find information and learn new things efficiently when you need them. You become more confident in your ability to tackle unfamiliar challenges because you trust your capacity to learn what&rsquo;s required on the fly. This doesn&rsquo;t mean foundational learning isn&rsquo;t important.\nYou still need that core understanding from courses and broader study.\nBut for specialized topics or new tools, learning them in the context of a current need is often far more effective and less stressful than trying to master everything beforehand.\nIt&rsquo;s about being lean and targeted in your learning efforts.\n20. The AI Hype is Real. So is the Grind of Fundamentals It\u2019s an exciting time to be in data science and machine learning.\nEvery week or maybe every hour, it seems there\u2019s a new groundbreaking paper, a powerful new AI model, or a new tool that promises to revolutionize some part of the workflow.\nThe hype is crazy, and it&rsquo;s easy to feel like you need to be constantly chasing the latest and greatest.\nIt&rsquo;s important to stay aware of these and even experiment with new tools or the latest foundation models, I&rsquo;ve also come to appreciate that the foundational skills of data science remain timeless and essential.\nThe &ldquo;grind&rdquo; of learning how to properly clean data, engineer meaningful features, understand statistical principles, evaluate models rigorously, and communicate insights effectively - these things don&rsquo;t go out of style.\nFundamentals are Your Anchor: The tools and specific algorithms will change. The core principles of how to approach data-driven problem solving will endure. A strong foundation makes you more adaptable when new technologies emerge. You&rsquo;ll be better equipped to understand how these new tools work and where they fit into the broader landscape.\nDon&rsquo;t Neglect the Basics: It can be tempting to jump straight to playing with advanced AI models. But if you haven&rsquo;t mastered the fundamentals of data preprocessing or evaluation, you&rsquo;ll struggle to use those advanced tools effectively or critically.\nGarbage in still means garbage out, no matter how sophisticated the model. Hype vs. Practical Application: Some new tech is genuinely transformative, others might be overhyped or not yet mature enough for practical application in all contexts. Being able to understand this requires a solid understanding of the underlying challenges and trade-offs in data science.\nPace Yourself and Avoid Burnout: Trying to keep up with every single new development is a recipe for burnout. It&rsquo;s okay to focus on mastering the fundamentals and then strategically explore new areas that are relevant to your interests or projects. This is a marathon, not a sprint.\nSo, by all means, engage with the hype.\nBe curious.\nExperiment.\nBut don&rsquo;t do it at the expense of building a rock-solid foundation in the core principles and practices of data science.\nThat foundation is what will allow you to navigate the changing landscape with confidence and make a real impact.\n21. Stop Comparing Your Timeline to Someone Else&rsquo;s This is a lesson I have to remind myself of constantly.\nIn a field that attracts people from such diverse backgrounds - some with computer science PhDs, some transitioning from completely unrelated careers (my sister is a former chef turned data scientist now in a big 4\/5 companies in tech consulting), some starting their journey at 18, others at 40 - it is incredibly easy to fall into the comparison trap.\nYou see someone who seems to be learning faster, achieving more, or landing impressive roles, and you start to question your own progress and abilities.\nI&rsquo;ve learned that progress in this field is deeply personal, and everyone&rsquo;s timeline and path will look different.\nComparison is not only unproductive; it can be really begative for your motivation and self-esteem.\nDifferent Starting Points, Different Goals: Everyone comes in with a unique set of prior experiences, skills, and learning styles. Your background in, say, biology might give you a unique perspective on certain datasets that someone with a pure math background wouldn&rsquo;t have, and vice-versa. Your career goals might also be different, leading you to focus on different areas.\nInvisible Struggles: You rarely see the full picture of someone else&rsquo;s journey - the late nights, the failed attempts, the moments of doubt, the lucky breaks, or the specific support systems they might have. You&rsquo;re often comparing your &ldquo;behind the scenes&rdquo; with their &ldquo;highlight reel.&rdquo;\nFocus on Your Own Growth: The most important metric is your own progress over time. Are you learning more than you knew last month? Are you building skills? Are you tackling more challenging problems?\nThat&rsquo;s what truly matters.\nCelebrate Your Milestones: Acknowledge and celebrate your own achievements, however small they may seem. Finishing a tough project, finally understanding a complex concept, getting a piece of code to work - these are all small wins worth recognizing.\nThis journey is your own.\nBe inspired by others, learn from them, but don&rsquo;t measure your worth or your pace against theirs.\nStay focused on your learning, be persistent, and trust that you&rsquo;re moving forward.\nYou&rsquo;re probably doing much better than you think.\n22. Build in Public (A Lesson I&rsquo;m Learning Now) This final point is one that, if I could go back and tell my Day 1 self something, this would be high on the list.\nFor a long time, I kept my learning journey pretty private.\nI worked on projects, struggled through concepts, but was hesitant to share what I was doing, what I was learning, or (especially) what I was confused about.\nMy thinking was, &ldquo;I&rsquo;ll wait until I&rsquo;m an expert, until I have something polished to show.&rdquo;\nEspecially since I had seen reddit comments for &ldquo;learn publically.&rdquo;\nI now believe that was a missed opportunity. Building in public - sharing your learning process, your projects (even the messy ones), your insights, and your questions along the way - can be an incredible catalyst for growth, connection, and even helping others.\nAccelerated Learning: The act of trying to explain something you&rsquo;re learning to others (even in a blog post, a tweet thread, or a small presentation to peers) forces you to clarify your own understanding. (classic Feynman technique) It exposes gaps in your knowledge that you can then address.\nTeaching is one of the best ways to learn.\nBuilding a Network: When you share what you&rsquo;re working on, you connect with other people who are interested in the same things.\nYou can find mentors, collaborators, and peers who can offer support, advice, and different perspectives.\nDocumenting Your Journey: Sharing your progress creates a public record of your growth. This can be incredibly motivating to look back on. It also acts as an informal portfolio that shows your skills and your passion.\nHelping Others (Even as a Beginner): You don&rsquo;t need to be an expert to provide value. Sharing your struggles and how you overcame them as a beginner can be incredibly helpful and relatable to others who are just starting out. Your &ldquo;dumb questions&rdquo; might be the exact questions someone else is too afraid to ask.\nFeedback and Improvement: Putting your work out there opens you up to feedback, which can be invaluable for improvement (once you learn to filter the constructive from the noise).\nSo, this blog you&rsquo;re reading? This is me trying to get into that &ldquo;build in public&rdquo; philosophy, even if it feels a bit vulnerable.\nIf you&rsquo;re on this journey too, I encourage you to consider sharing it.\nWrite about what you&rsquo;re learning.\nPost your small projects on GitHub.\nAsk questions in online communities.\nYou might be surprised by how much it helps your own experience and how many people you can connect with and help along the way.\nAnd that\u2019s the brain dump after a year in this awesome, challenging, and a bit crazy field.\nIt&rsquo;s been a ride, and I know I&rsquo;m still just scratching the surface.\nBut these are the lessons that have felt most significant so far.\nHopefully, some of them resonate with you, wherever you are on your own data science and machine learning adventure.\nKeep learning, keep building, and keep asking questions!\n","permalink":"https:\/\/codebynight.dev\/posts\/lessons-from-1-year-data-science-and-machine-learning-journey\/","summary":"<p>It\u2019s been a year in data science and machine learning.<\/p>\n<p>Okay, I lied.<\/p>\n<p>Technically a full year and a few months since I officially splooted <em>(wanted to show off my extensive vocabulary)<\/em> into the world of data science and machine learning with my master\u2019s program.<\/p>\n<p>In late 2023 I started learning data science through a Udemy course and in January of 2024 I gave up.<\/p>\n<p>Well, not exactly per say.<\/p>","title":"22 Lessons from 1 year in Data Science and Machine Learning"},{"content":"Customer churn isn\u2019t just a marketing problem - it\u2019s a business survival issue. In competitive industries like e-commerce, losing one customer often means losing several revenue streams, especially when one account can represent multiple users.\nThis post is a breakdown of my churn prediction capstone project for the postgraduate data science program at UT Austin - also tied to my master&rsquo;s in data science at Deakin U. The project was closed-source, so I can&rsquo;t release the full notebook, but I\u2019ll walk you through everything I did including code snippets, results, charts, what I learned, and where this project fits in my larger journey into machine learning and MLOps.\n\ud83e\udde9 The Problem: Why Churn Matters So Much The e-commerce company in question faced intense competitive pressure and a rising churn rate. Each lost account didn\u2019t just represent a single user - it impacted groups of customers. That meant multiplicative revenue loss.\nOur goals were:\nPredict churn at the account level Identify top drivers of churn Segment customers for targeted retention Recommend cost-effective, revenue-positive strategies \ud83e\uddea Dataset Overview &amp; Initial Processing The dataset had ~11,000 rows and 19 columns, combining both categorical and numerical variables. A few key points:\nHeavy class imbalance: Only ~17% of the accounts had churned Several columns had missing values which were handled via KNN imputation Mix of behavioral data (logins, payments, complaints), service scores, and engagement metrics \ud83d\udd0d Exploratory Data Analysis (EDA) Key univariate and bivariate findings:\nDevice Used: Desktop users churned more (~20%) than mobile (~16%) Revenue Patterns: Lower revenue\/month was linked to higher churn Complaints: Past complaints were strongly correlated with churn Tenure: Shorter tenure customers churned more Payment Method: Debit and UPI users churned more than Credit Card users Interestingly, some expected predictors (like cashback or service score) didn\u2019t show strong correlation individually - indicating multi-factorial churn behavior.\n\ud83d\udcca Clustering for Segmentation Rather than just modeling churn, we wanted actionable segmentation. Using the elbow method and KMeans, we identified 4 customer clusters.\nEach cluster showed different churn profiles, behavior patterns, and required tailored business strategies.\n\ud83d\udccc Cluster Highlights &amp; Strategic Takeaways Cluster 1 \u2013 Large Segment, High Churn (~20%) Male-dominated, married, mobile-first Mid-to-high revenue, but frequent complaints Strategy: Premium customer care, non-discount loyalty programs, debit-card reward partnerships Cluster 3 \u2013 Smallest, but Worst Churn (~21%) Newer users with high cashback dependency Low service scores, high complaints, revenue decline Strategy: Early engagement triggers, reduce cashback reliance, introduce tiered perks Cluster 0 \u2013 Mid-Tier Churn (~13%) HNI and Super users, higher spenders Credit card and UPI users, moderate complaints Strategy: VIP retention plans, gamified reward systems, re-engagement emails Cluster 2 \u2013 Best Segment (~5% Churn) Long-tenure, high-revenue customers Highest satisfaction, lowest complaints Strategy: Just keep them happy! Introduce premium perks and incentivize digital payments \ud83e\udd16 ML Model Evaluation &amp; Results This wasn\u2019t just a segmentation project - I evaluated 6 different machine learning models for churn prediction:\nModel Test Accuracy Precision Recall F1-Score AUC-ROC Overfitting Decision Tree 0.9312 0.7732 0.8364 0.8035 0.8934 Yes Random Forest 0.9742 0.9397 0.9050 0.9220 0.9936 No XGBoost 0.9694 0.9189 0.8971 0.9079 0.9908 No AdaBoost 0.8708 0.5957 0.7230 0.6532 0.9025 Yes Na\u00efve Bayes 0.7127 0.3386 0.7414 0.4648 0.7770 No SVM 0.7744 0.4122 0.7995 0.5440 0.8526 No Tuned RF 0.9765 0.9822 0.8760 0.9261 0.9960 No Random Forest &amp; XGBoost were the top performers with high precision and AUC scores, and no signs of overfitting, so I ended up tuning the random forest further.\nI also experimented with SMOTE for handling class imbalance, but performance dropped significantly across models so oversampling isn\u2019t always the solution.\n\ud83d\udd0d Feature Importance (XGBoost) Top predictors of churn from the model:\nTenure and Complaints were the most influential features. Other strong indicators: customer care interaction history, cashback dependency, and service score. \ud83c\udfaf Business Outcomes &amp; Learnings This wasn\u2019t just a modeling exercise - it was a strategy recommendation engine.\nI wrote later about why churn is not really a data science problem. The model matters, but only if it leads to a retention workflow someone can actually run.\nKey takeaways:\nChurn is complex: No one variable dominates, but multiple small signals do. Clustering works: It lets us build segment-specific retention tactics. Complaints matter: Past complaints + low satisfaction are gold for early churn signals. Cashback \u2260 loyalty: High discount reliance often signals at-risk behavior. \ud83e\udded Business Recommendations by Cluster Cluster 1 (Large Segment, High Churn ~20%) Premium support: Faster complaint resolution and priority escalation. Loyalty rewards without discounts: e.g., early access perks. Debit-card partner offers &amp; wallet payment nudges. Predictive churn alerts + personalized retention bonuses. Cluster 3 (Smallest, Highest Churn ~21%) High-touch onboarding: Loyalty bonuses in first 3\u20136 months. Reduce cashback reliance: Use membership perks instead. VIP service model for high revenue churners. Improve care response time: Add real-time channels. Cluster 2 (Lowest Churn ~5%) Maintain delight: Premium memberships, early sales access. Encourage digital payments with UPI\/wallet incentives. Reward repeat purchases via tiered cashback. Cluster 0 (Moderate Churn ~13%) HNI support: Personalized account managers. Gamified engagement: Spend &amp; Earn reward mechanics. Proactive re-engagement emails. Introduce premium subscription loyalty tier. \ud83d\ude80 What\u2019s Next? This project helped me:\nThink beyond models and into business strategy Practice handling imbalanced data Understand how to build insights*with both EDA and clustering It\u2019s part of a broader set of real-world projects I\u2019ll be tackling throughout my second year of the master&rsquo;s program - with more blogs and eventually open-sourced templates (when possible).\nIf you&rsquo;re interested in just nerding out - feel free to connect or drop a note.\nThanks for reading! \ud83e\udde0\ud83d\udcca\n","permalink":"https:\/\/codebynight.dev\/posts\/churn-analysis-capstone-ecommerce-customer-retention\/","summary":"<p>Customer churn isn\u2019t just a marketing problem - it\u2019s a business survival issue. In competitive industries like e-commerce, losing one customer often means losing several revenue streams, especially when one account can represent multiple users.<\/p>\n<p>This post is a breakdown of my churn prediction capstone project for the postgraduate data science program at UT Austin - also tied to my master&rsquo;s in data science at Deakin U. The project was closed-source, so I can&rsquo;t release the full notebook, but I\u2019ll walk you through everything I did including code snippets, results, charts, what I learned, and where this project fits in my larger journey into machine learning and MLOps.<\/p>","title":"Reducing Churn in E-Commerce: My End-to-End Capstone Project in Predictive Modeling"},{"content":"I learned about pointers 10 years ago\u2026 and I hated them. I still hate them. But now at least I can explain them, which, by some strange software industry law, qualifies me for a senior dev role.\nFlashback: Engineering School and Existential Crisis Back in electronics engineering, we were handed C++ for one semester and told, \u201cHere, go build your future.\u201d By Day 2, we were doing pointers - not the helpful kind, but the kind that break your code, your compiler, and your soul.\nParallel to that, I was working with an 8085 processor - an experience that felt like coding inside the Matrix, except there was no red pill. I wasn\u2019t writing programs. I was writing memory access violations in multiple languages.\nNaturally, I quit programming.\nI nearly pivoted into project management\u2026 until I opened Jira. That\u2019s when I ran back to engineering.\nFlash forward 10 years. I\u2019ve been doing Python for a year and a half now - data science, machine learning, the whole vibe. No semicolons. No manual memory management. No existential crisis. Right?\nRight?\nWrong. Because one day I decided, for some reason, to try Golang.\nFirst Week of Go: Guess Who\u2019s Back? Apparently, real developers don\u2019t use pandas. They build APIs at 3AM and argue about Vim configs on Reddit.\nAnd within the first week: pointers. Again.\nSo What Is a Pointer? Let\u2019s break it down.\nImagine you\u2019re a dev with imposter syndrome. You don\u2019t tell people the answer, maybe because you can&rsquo;t - you just give them a reference to Stack Overflow. Congratulations, that\u2019s a pointer.\n(I really do hope you are not sending people to Stack Overflow in 2025.)\nMore formally: a pointer doesn\u2019t hold a value, it holds the address of a value. Like saying:\n\u201cI won\u2019t give you the actual pizza, but here are the GPS coordinates of where it\u2019s sitting.\u201d\nPointers in Go: Code Time In Go, you declare a pointer using a * and dereference it using * again.\na := 10 b := &amp;a \/\/ b is a pointer to a fmt.Println(b) \/\/ prints something like 0x1400012a008 To get the actual value from b, you do:\nfmt.Println(*b) \/\/ prints 10 Seems simple? Just wait.\nWhy Use Pointers? If you&rsquo;re wondering \u201cWhy do I even need pointers?\u201d \u2014 congratulations, you&rsquo;re officially a Python developer.\nBut here\u2019s the thing: pointers let you pass variables around efficiently. Instead of copying data, you just share its address. It\u2019s safe house, but for your variables. Unless someone moves your variables around.\nBut They\u2019re Dangerous Pointers are powerful, sure - but also a great way to cause memory leaks, panic-inducing bugs, and passive-aggressive code reviews.\nThey\u2019re like handing your intern root access and saying \u201cdo whatever you want.\u201d\nA pointer is like this:\n\u201cGo check drawer #3 in the kitchen.\u201d\nNow, if someone moved the knife to drawer #2 and didn\u2019t tell you - congratulations, you just segmentation-faulted in real life.\nSo Where Am I Now? I still kind of hate pointers. But now, I understand them. And that\u2019s a milestone.\nI&rsquo;m somewhere between:\nfinally learning how async works, and giving up on Arch Linux for good. So if you&rsquo;re currently crying over a dereference error don&rsquo;t panic, don&rsquo;t rage quit, and maybe don\u2019t listen to ThePrimeagen (unless you want to rewrite everything in Rust).\nJust remember:\nA pointer is like that weird always high friend who doesn\u2019t give you the answer. They just whisper where to find it.\nMay your dereferences never be nil.\n","permalink":"https:\/\/codebynight.dev\/posts\/a-beginner-explains-pointers-in-golang\/","summary":"<p>I learned about pointers 10 years ago\u2026 and I hated them. I still hate them. But now at least I can explain them, which, by some strange software industry law, qualifies me for a senior dev role.<\/p>\n<hr>\n<h2 id=\"flashback-engineering-school-and-existential-crisis\">Flashback: Engineering School and Existential Crisis<\/h2>\n<p>Back in electronics engineering, we were handed C++ for one semester and told, \u201cHere, go build your future.\u201d By Day 2, we were doing pointers - not the helpful kind, but the kind that break your code, your compiler, and your soul.<\/p>","title":"A Beginner Explains Pointers in Go: The Thing That Made Me Quit Coding (And Why I'm Back Now)"},{"content":"It\u2019s been a few days since I posted an update here. Not because I wasn\u2019t learning - in fact, the opposite. I was working through a mix of things, from structuring my year-long learning roadmap to actually fine-tuning large language models for the first time.\nWhy I Wasn\u2019t Posting Daily Simple: I needed to zoom out a bit.\nI took a couple of days to sketch out what I want to build in the next few months \u2014 not just random toy apps, but meaningful projects that actually challenge me to grow.\n\u2705 I landed on 8 intermediate-to-advanced projects: A self-healing machine learning pipeline An AI-powered repository health tool A reinforcement learning\u2013based warehouse management simulation &hellip;and a few others I&rsquo;ll write about soon I\u2019ll be documenting each one - through blogs, and eventually, YouTube videos.\nWhat I Did During These Days \ud83d\udd27 Go Language Progress I revisited structs, especially:\nEmbedded structs Package exports How nested structs behave and how Go handles memory when things get passed around Nothing too flashy \u2014 just getting the reps in.\n\u2699\ufe0f MLOps with MLflow Got my first few experiments tracked in MLflow Learned how easy it is to get started&hellip; and how quickly it can get messy if you don\u2019t think about structure upfront This was just the start - but it gave me confidence to go deeper. Plus also my classes start soon, so I need to be ready.\n\ud83e\udde0 Deep Learning Math Refresher Even though I\u2019ve been through this before, I wanted to revisit the fundamentals:\nMatrix multiplication Logarithms &amp; entropy Cross-entropy, min\/max, argmin\/argmax Mean, variance, and a bit of spectral math It\u2019s amazing how much easier this feels the second time around.\n\ud83d\udd01 Fine-Tuning Language Models (The Real Work) This was the biggest chunk.\nI fine-tuned three different models:\n\ud83d\udc0d Code LLaMA 13B \ud83c\udf0a Mistral 7B \ud83c\udde8\ud83c\uddf3 Qwen 2.5 All using LoRA adapters. Some on Google Colab (for GPU), some locally on my MacBook via MLX. The goal was to fine-tune for long-form generation, but&hellip; let\u2019s just say I have a lot of learnings.\nKey Takeaways: Preparing the dataset took more time than training. Writing the actual training script? Almost boringly simple. Results weren\u2019t great - and that\u2019s good, because now I know why: Wrong model for the job (don\u2019t fine-tune a general base model for structured output) Prompting might\u2019ve been a better route in some cases Fine-tuning \u2260 magic - model alignment matters more than you&rsquo;d think \ud83e\uddea Bonus Lesson: It\u2019s Not Just About the Model \u2014 It\u2019s About the Fit One thing became very clear while fine-tuning these models: the fit between your goal and your model matters more than anything else.\nAt first, I was trying to get long-form, structured outputs using models that were never really trained for that. The results? Pretty underwhelming.\nWhat made a real difference was this realization \u2014 if your model isn\u2019t aligned to your use case, no amount of prompting, training, or tweaking will get you good results.\nI now spend more time upfront asking: Is this even the right model to fine-tune for this task? And in most cases, the answer tells me what I need to fix not the code, not the GPU setup, but the alignment itself. That instinct only became stronger after I finished the degree and wrote about why it made AI feel less magical and the hype harder to trust.\nWhat\u2019s Next? Now that I\u2019ve got my 8 projects lined up, the next few weeks will be more focused:\nDeep Learning \u2192 FFNs, Autoencoders, etc. Go \u2192 Interfaces and modular structure MLOps \u2192 More MLflow, maybe some Docker and Airflow after that Fine-tuning \u2192 Better experiments with task-aligned models More importantly, I\u2019ll be documenting everything as I go.\n","permalink":"https:\/\/codebynight.dev\/posts\/day-5-to-8-mlops-fine-tuning-project-plans\/","summary":"<p>It\u2019s been a few days since I posted an update here. Not because I wasn\u2019t learning - in fact, the opposite. I was working through a mix of things, from structuring my year-long learning roadmap to actually fine-tuning large language models for the first time.<\/p>\n<hr>\n<h2 id=\"why-i-wasnt-posting-daily\">Why I Wasn\u2019t Posting Daily<\/h2>\n<p>Simple: I needed to zoom out a bit.<\/p>\n<p>I took a couple of days to sketch out <strong>what I want to build<\/strong> in the next few months \u2014 not just random toy apps, but meaningful projects that actually challenge me to grow.<\/p>","title":"Day 5\u20138: Fine-Tuning AI Models, Learning MLOps, and Structuring My Year of Projects"},{"content":"It\u2019s Day 4, and today was a little different - not heavy on code, but still a strong day of learning. I&rsquo;m trying to balance two learning paths right now: backend fundamentals with Go and ML + deep learning using PyTorch.\nWrapping My Head Around Pointers and Structs in Go Most of today\u2019s Go time was spent clarifying how data is passed and accessed when using pointers and structs.\ntype User struct { FirstName string LastName string BirthDate string createdAt time.Time } func Struct_fn() { FirstName, _ := helpers.StrUserInput(&#34;Please enter your first name: &#34;) LastName, _ := helpers.StrUserInput(&#34;Please enter your last name: &#34;) BirthDate, _ := helpers.StrUserInput(&#34;Please enter your birthdate (MM\/DD\/YYYY): &#34;) appUser := User{ FirstName: FirstName, LastName: LastName, BirthDate: BirthDate, createdAt: time.Now(), } outputsUserDetails(&amp;appUser) } func outputsUserDetails(u *User) { fmt.Println(u.FirstName, u.LastName, u.BirthDate) } func (u *User) ClearUserName() { u.FirstName = &#34;&#34; u.LastName = &#34;&#34; } Even after completing the basics, I had to go back to ChatGPT, asking follow-up questions like:\nWhen does Go actually copy a struct? What\u2019s the best way to mutate values without triggering memory issues? Is referencing a pointer enough if my struct has nested fields? This kind of back-and-forth learning is slower than a typical tutorial. But the mental model is forming. I\u2019m not rushing to build things - I\u2019m trying to deeply understand how Go works under the hood. Especially when it comes to memory management.\nTen years ago, I would\u2019ve given up on a concept like this. Today, I\u2019m just taking it step by step.\nRe-entering the Deep Learning World Alongside Go, I\u2019ve started brushing up on deep learning - mostly because my second year of the master\u2019s program is around the corner, and it&rsquo;s going to be all about machine learning, MLOps, and system-level thinking.\nI\u2019ve started tinkering with PyTorch again. Right now, it&rsquo;s about understanding artificial neural networks (ANNs) from the ground up. Not just watching videos \u2014 but opening up a notebook and writing everything manually.\nI like PyTorch. Maybe because I\u2019ve touched computer vision before during my internship in Denmark \u2014 when I was at Aalborg University. We were working with OpenCV, and although it was research-focused, it gave me an early glimpse into how machines can see.\nI guess that curiosity never really went away.\nA Bit More Structure This Time I\u2019ve also been thinking about structure \u2014 not just in neural networks, but in how I organize my codebases.\nSince I\u2019m keeping all my Go learning in a single repository, I had to restructure the project to keep things clean. Instead of one massive file, I split everything into packages: calculators, helpers, pointers, and so on.\nThat required learning how to export functions properly in Go, how to keep imports clean, and how to avoid circular dependencies. It wasn\u2019t difficult, but it did take a bit of trial and error. And honestly? It\u2019s these small structural lessons that make you feel like you&rsquo;re learning how to think like a developer.\n(P.S. I wrote more about this restructuring in Day 3\u2019s post.)\nWhat\u2019s Next Over the coming week, I plan to keep switching tracks \u2014 Go for backend fundamentals and PyTorch for deep learning.\nI\u2019ll be diving deeper into structs, interfaces, and generics in Go (based on the course I\u2019m following). I\u2019ll continue reading Concurrency in Go, trying to wrap my head around things like deadlocks, livelocks, and atomic memory access. I\u2019ll also keep going with Building an Interpreter in Go \u2014 that repo is where I try to apply my Go learning to something more complex. On the deep learning side:\nI\u2019ll keep working through artificial neural networks using PyTorch \u2014 and slowly move toward feedforward networks and autoencoders. There\u2019s a whole MLFlow module I\u2019m yet to touch \u2014 which includes tracking experiments and integrating ML models. I\u2019ll also revisit cross-validation, generalization, and overfitting, including hands-on experimentation with scikit-learn and PyTorch Dataloaders. And of course, I\u2019ll continue reading a few chapters of AI Engineering by Chip Huyen \u2014 to understand how real-world AI systems are built and deployed.\nIt&rsquo;s going to be a packed week, but I\u2019m looking forward to it.\nThat\u2019s All for Day 4 Today wasn\u2019t flashy. I didn\u2019t finish a big project or write hundreds of lines of code.\nBut I did get clarity. On how Go handles memory. And on how I want to structure my learning going forward.\nThat\u2019s progress in my book.\n","permalink":"https:\/\/codebynight.dev\/posts\/day-4-of-learning-switching-between-golang-and-deep-learning\/","summary":"<p>It\u2019s Day 4, and today was a little different - not heavy on code, but still a strong day of learning. I&rsquo;m trying to balance two learning paths right now: backend fundamentals with Go and ML + deep learning using PyTorch.<\/p>\n<hr>\n<h2 id=\"wrapping-my-head-around-pointers-and-structs-in-go\">Wrapping My Head Around Pointers and Structs in Go<\/h2>\n<p>Most of today\u2019s Go time was spent clarifying how data is passed and accessed when using pointers and structs.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-go\" data-lang=\"go\"><span class=\"line\"><span class=\"cl\"><span class=\"kd\">type<\/span> <span class=\"nx\">User<\/span> <span class=\"kd\">struct<\/span> <span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">FirstName<\/span> <span class=\"kt\">string<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">LastName<\/span>  <span class=\"kt\">string<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">BirthDate<\/span> <span class=\"kt\">string<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">createdAt<\/span> <span class=\"nx\">time<\/span><span class=\"p\">.<\/span><span class=\"nx\">Time<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"kd\">func<\/span> <span class=\"nf\">Struct_fn<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">FirstName<\/span><span class=\"p\">,<\/span> <span class=\"nx\">_<\/span> <span class=\"o\">:=<\/span> <span class=\"nx\">helpers<\/span><span class=\"p\">.<\/span><span class=\"nf\">StrUserInput<\/span><span class=\"p\">(<\/span><span class=\"s\">&#34;Please enter your first name: &#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">LastName<\/span><span class=\"p\">,<\/span> <span class=\"nx\">_<\/span> <span class=\"o\">:=<\/span> <span class=\"nx\">helpers<\/span><span class=\"p\">.<\/span><span class=\"nf\">StrUserInput<\/span><span class=\"p\">(<\/span><span class=\"s\">&#34;Please enter your last name: &#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">BirthDate<\/span><span class=\"p\">,<\/span> <span class=\"nx\">_<\/span> <span class=\"o\">:=<\/span> <span class=\"nx\">helpers<\/span><span class=\"p\">.<\/span><span class=\"nf\">StrUserInput<\/span><span class=\"p\">(<\/span><span class=\"s\">&#34;Please enter your birthdate (MM\/DD\/YYYY): &#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">appUser<\/span> <span class=\"o\">:=<\/span> <span class=\"nx\">User<\/span><span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">FirstName<\/span><span class=\"p\">:<\/span> <span class=\"nx\">FirstName<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">LastName<\/span><span class=\"p\">:<\/span>  <span class=\"nx\">LastName<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">BirthDate<\/span><span class=\"p\">:<\/span> <span class=\"nx\">BirthDate<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">createdAt<\/span><span class=\"p\">:<\/span> <span class=\"nx\">time<\/span><span class=\"p\">.<\/span><span class=\"nf\">Now<\/span><span class=\"p\">(),<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"p\">}<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nf\">outputsUserDetails<\/span><span class=\"p\">(<\/span><span class=\"o\">&amp;<\/span><span class=\"nx\">appUser<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"kd\">func<\/span> <span class=\"nf\">outputsUserDetails<\/span><span class=\"p\">(<\/span><span class=\"nx\">u<\/span> <span class=\"o\">*<\/span><span class=\"nx\">User<\/span><span class=\"p\">)<\/span> <span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">fmt<\/span><span class=\"p\">.<\/span><span class=\"nf\">Println<\/span><span class=\"p\">(<\/span><span class=\"nx\">u<\/span><span class=\"p\">.<\/span><span class=\"nx\">FirstName<\/span><span class=\"p\">,<\/span> <span class=\"nx\">u<\/span><span class=\"p\">.<\/span><span class=\"nx\">LastName<\/span><span class=\"p\">,<\/span> <span class=\"nx\">u<\/span><span class=\"p\">.<\/span><span class=\"nx\">BirthDate<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"kd\">func<\/span> <span class=\"p\">(<\/span><span class=\"nx\">u<\/span> <span class=\"o\">*<\/span><span class=\"nx\">User<\/span><span class=\"p\">)<\/span> <span class=\"nf\">ClearUserName<\/span><span class=\"p\">()<\/span> <span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">u<\/span><span class=\"p\">.<\/span><span class=\"nx\">FirstName<\/span> <span class=\"p\">=<\/span> <span class=\"s\">&#34;&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">u<\/span><span class=\"p\">.<\/span><span class=\"nx\">LastName<\/span> <span class=\"p\">=<\/span> <span class=\"s\">&#34;&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>Even after completing the basics, I had to go back to ChatGPT, asking follow-up questions like:<\/p>","title":"Day 4 of Learning: Switching Between Golang and Deep Learning"},{"content":"Today wasn\u2019t a big coding day, but it was a good learning day.\nWhy I Picked an Advanced Go Book So here\u2019s the thing - I\u2019ve started reading Concurrency in Go by Catherine Buday.\nYup, a pretty advanced book for someone who\u2019s still new to the language.\nBut honestly? It\u2019s working really well for me. If I stuck to just for loops and if statements all day, I\u2019d get bored fast. I\u2019m not a total beginner in tech - I\u2019ve been working with engineers and devs closely for a while - so this stuff doesn\u2019t feel completely alien.\nHere\u2019s what I went through today:\nRace conditions Atomicity Memory access and synchronization Deadlocks (Next up: live locks and starvation) It\u2019s weirdly fun. Like I\u2019m finally getting to peek behind the curtain.\nReorganizing My Go Project Structure The other thing I did today was restructure my Go project.\nI\u2019m doing a Udemy course by Maximilian Schwarzm\u00fcller, and he starts a fresh project for every lecture. But I wanted a single repo where I could organize everything cleanly.\nThat meant:\nBreaking out separate packages Exporting functions properly Importing and referencing them cleanly Making things modular and easy to maintain Took some trial and error, a bit of help from ChatGPT (like you\u2019d use Stack Overflow), and a couple of YouTube videos. But I finally feel like I understand how Go projects should be structured.\nHere\u2019s what it looks like right now:\nGo\/ \u251c\u2500\u2500 calculators\/ \u2502 \u251c\u2500\u2500 bank.go \u2502 \u251c\u2500\u2500 investment_calculator.go \u2502 \u2514\u2500\u2500 profit_calculator.go \u251c\u2500\u2500 helpers\/ \u2502 \u2514\u2500\u2500 utils.go \u251c\u2500\u2500 pointers\/ \u251c\u2500\u2500 structs\/ \u2502 \u2514\u2500\u2500 structs.go \u251c\u2500\u2500 go.mod \u2514\u2500\u2500 main.go Nothing fancy. But it\u2019s mine, and it\u2019s working.\n\ud83d\udd17 View the repo\nA Quick Snippet package main import ( &#34;fmt&#34; &#34;os&#34; &#34;github.com\/shivamchhuneja\/learning-go\/calculators&#34; ) func main() { runApp() } func runApp() { var option int fmt.Println(&#34;Select the calculator&#34;) fmt.Println(&#34;1. Investment Calculator&#34;) fmt.Println(&#34;2. Profit Calculator&#34;) fmt.Println(&#34;3. Bank Service&#34;) fmt.Println(&#34;4. Exit&#34;) fmt.Print(&#34;Your choice: &#34;) fmt.Scan(&amp;option) switch option { case 1: calculators.InvestmentCalculator() case 2: calculators.ProfitCalculator() case 3: calculators.BankingMode() case 4: fmt.Println(&#34;Exiting now...&#34;) os.Exit(0) default: fmt.Println(&#34;Try again&#34;) runApp() } } That\u2019s All For Today Didn\u2019t write a ton of code, but I walked away with:\nA better grasp on Go project structure A stronger mental model of concurrency And a cleaner, more usable repo Not bad for Day 3.\n","permalink":"https:\/\/codebynight.dev\/posts\/day-3-concurrency-and-go-project-structure-refactor\/","summary":"<p>Today wasn\u2019t a big coding day, but it was a good learning day.<\/p>\n<hr>\n<h2 id=\"why-i-picked-an-advanced-go-book\">Why I Picked an Advanced Go Book<\/h2>\n<p>So here\u2019s the thing - I\u2019ve started reading <strong>Concurrency in Go<\/strong> by Catherine Buday.<\/p>\n<p>Yup, a pretty advanced book for someone who\u2019s still new to the language.<\/p>\n<p>But honestly? It\u2019s working really well for me. If I stuck to just <code>for<\/code> loops and <code>if<\/code> statements all day, I\u2019d get bored fast. I\u2019m not a total beginner in tech - I\u2019ve been working with engineers and devs closely for a while - so this stuff doesn\u2019t feel completely alien.<\/p>","title":"Day 3 of Learning Go: Concurrency & Project Structure Refactor"},{"content":"Today was Day 2 of learning Go, and to be honest, I didn\u2019t have much time to dedicate. But I still wanted to make some progress.\nSo I wrapped up the Pointers module from Maximilian Schwarzm\u00fcller\u2019s Go: The Complete Guide course \u2014 and for the first time in my life, I feel like pointers actually make sense to me.\n10 Years Too Late Back in college, I studied C++ as part of my Electronics Engineering degree. And I\u2019ll be real: pointers felt like dark magic.\nI didn\u2019t get them.\nI didn\u2019t even want to get them after a while \u2014 that\u2019s how frustrating they were.\nThrow in a few lectures on assembly programming and the 8085 microprocessor, and I was already convinced coding wasn\u2019t for me.\nBut Today? It Clicked. Fast forward 10 years, and here I am - revisiting pointers in Go. The course explained it clearly, but more than that, I think I was just ready to understand it now.\nHere\u2019s what I practiced today:\nCreating and referencing pointers Dereferencing values Using pointers as function arguments Mutating data with pointers Nothing fancy. Just the basics.\nWhy This Feels Big It\u2019s not about how much I built today - it\u2019s about how much I learned.\nUnderstanding pointers used to feel like a gatekeeping concept. Like something you either \u201cgot\u201d or you didn\u2019t. But turns out, it just needed the right time, the right mindset, and the right explanation.\nAnd now that it\u2019s clicked, I can\u2019t wait to build on this tomorrow. I eventually wrote a longer explanation of pointers in Go once I had sat with them for a bit longer.\nLet\u2019s see what Day 3 brings.\n","permalink":"https:\/\/codebynight.dev\/posts\/day-2-of-learning-go-the-pointers-i-finally-understood-10-years-later\/","summary":"<p>Today was Day 2 of learning Go, and to be honest, I didn\u2019t have much time to dedicate. But I still wanted to make some progress.<\/p>\n<p>So I wrapped up the <strong>Pointers<\/strong> module from Maximilian Schwarzm\u00fcller\u2019s <a href=\"https:\/\/www.udemy.com\/course\/go-the-complete-guide\/\">Go: The Complete Guide<\/a> course \u2014 and for the first time in my life, I feel like pointers <em>actually<\/em> make sense to me.<\/p>\n<hr>\n<h2 id=\"10-years-too-late\">10 Years Too Late<\/h2>\n<p>Back in college, I studied C++ as part of my Electronics Engineering degree. And I\u2019ll be real: pointers felt like dark magic.<\/p>","title":"Day 2 of Learning Go: The Pointers I Finally Understood (10 Years Later)"},{"content":"I\u2019ve just started my backend development journey - and I\u2019m doing it with Go. Or Golang, if you prefer that name.\nWhy Go? Honestly, it feels solid. It\u2019s clean. It\u2019s simple. And most importantly, for some weird reason I don&rsquo;t yet understand, it\u2019s fun. I\u2019ve worked with Python before (mostly for data science &amp; ML), but this time, I want to learn something from the ground up that\u2019ll help me build real, scalable projects. This eventually became part of the wider learning setup I wrote about in my year with Omarchy.\nSo here\u2019s what Day 1 looked like.\nThe Two Repos I\u2019m Using 1. interpreter-in-go This repo follows along with Building an Interpreter in Go by Thorsten Ball - a book Primagen recommended in one of his reaction videos.\nIt\u2019s not just about Go. It\u2019s about learning how programming languages work. Parsing. Tokenizing. Lexing. Yes, yes, I have been a nerd all my life. And yes I&rsquo;m that guy who would open up every electronic device in their house as a kid (and yes, more often than not I couldn&rsquo;t put them back in original condition).\nAnyways, I\u2019ve just started, and even with the first few pages, I had to:\nWrite a basic lexer Understand how to manage positions in strings Write tests (yes, real tests) And speaking of tests\u2026\nWriting Tests For the First Time \ud83e\udd2f I&rsquo;ve never written tests before. But I wrote my first Go test today for the lexer. It was weirdly satisfying.\nHere&rsquo;s a snippet of the how the test code I wrote looks like:\nfunc TestNextToken(t *testing.T) { input := `let five = 5;` tests := []struct { expectedType token.TokenType expectedLiteral string }{ {token.LET, &#34;let&#34;}, {token.IDENT, &#34;five&#34;}, {token.ASSIGN, &#34;=&#34;}, {token.INT, &#34;5&#34;}, {token.SEMICOLON, &#34;;&#34;}, } l := New(input) for i, tt := range tests { tok := l.NextToken() if tok.Type != tt.expectedType || tok.Literal != tt.expectedLiteral { t.Fatalf(&#34;test[%d] failed&#34;, i) } } } It helped me really understand how lexers work. Plus, now I finally get the hype around testing.\n2. learning-go This repo is where I\u2019m learning Go fundamentals. I\u2019m following a Udemy course by Maximilian Schwarzm\u00fcller.\nThe course assumes you have a bit of programming background - which works for me, since I\u2019ve used Python before.\nBut I\u2019m not just following along blindly. I\u2019m tweaking stuff. I\u2019m trying variations.\nHere\u2019s a snippet from that:\nfunc bankService(balance float64) { var choice int fmt.Println(&#34;\\nWelcome to Go Bank&#34;) fmt.Println(&#34;What do you want to do?&#34;) fmt.Println(&#34;1. Check Balance&#34;) fmt.Println(&#34;2. Deposit Money&#34;) fmt.Println(&#34;3. Withdraw Money&#34;) fmt.Println(&#34;4. Exit&#34;) fmt.Print(&#34;Enter your choice: &#34;) fmt.Scan(&amp;choice) switch choice { case 1: checkBalance(balance) bankService(balance) case 2: balance = depositMoney(balance) bankService(balance) case 3: balance = withdrawMoney(balance) bankService(balance) case 4: fmt.Println(&#34;Thanks for banking with us!&#34;) os.Exit(0) default: fmt.Println(&#34;Invalid option. Try again.&#34;) bankService(balance) } } func checkBalance(balance float64) { fmt.Printf(&#34;Current Balance: %.2f\\n&#34;, balance) } func depositMoney(balance float64) float64 { var amount float64 fmt.Printf(&#34;Your current balance is %.2f\\nHow much would you like to deposit? &#34;, balance) fmt.Scan(&amp;amount) balance += amount fmt.Printf(&#34;Done. New Balance is %.2f\\n&#34;, balance) return balance } It\u2019s basic. But I&rsquo;m tinkering instead of &ldquo;Copy Pasta&rdquo; as Primeagen would say. That\u2019s what counts right now.\nWhy This Feels Different This isn\u2019t about \u201cfinishing a course.\u201d It\u2019s not even about shipping an app yet.\nThis is about learning - really learning - how backend systems are built, how programming languages work, and how you go from a blank screen to working code.\nAnd it feels good to document it all. hugo\nWhat\u2019s Next? Keep progressing in the interpreter book Finish a few more modules fom the course More soon.\n\ud83e\udde0 Interpreter Repo \ud83d\udcd8 Learning Go Repo \ud83c\udfa5 Course: Go - The Complete Guide on Udemy\n","permalink":"https:\/\/codebynight.dev\/posts\/learning-golang-from-scratch-my-day-1-log-of-backend-development-with-golang\/","summary":"<p>I\u2019ve just started my backend development journey - and I\u2019m doing it with Go. Or Golang, if you prefer that name.<\/p>\n<p>Why Go? Honestly, it feels solid. It\u2019s clean. It\u2019s simple. And most importantly, for some weird reason I don&rsquo;t yet understand, it\u2019s <em>fun<\/em>. I\u2019ve worked with Python before (mostly for data science &amp; ML), but this time, I want to learn something from the ground up that\u2019ll help me build real, scalable projects. This eventually became part of the wider learning setup I wrote about in <a href=\"\/posts\/one-year-omarchy-learning-os-not-just-linux-setup\/\">my year with Omarchy<\/a>.<\/p>","title":"Learning Golang from Scratch: My Day 1 Log of Backend Development with Golang"},{"content":"The urge to create software that feels meaningful I didn\u2019t think I\u2019d be learning how to build software at 30. Not while juggling a product marketing career, masters in data science, a family life, and the sinking feeling that I really should have taken coding more seriously 10 years ago.\nWhat really sparked my desire was my admiration for high-quality software \u2014 whether apps, tools, or platforms \u2014 that just work seamlessly and beautifully. I wanted to be someone who creates those things, not just consumes them.\nThe unfortunate reality is that the way coding was taught (electronics engineering degree), especially how &ldquo;pointers&rdquo; in C++ were taught made me believe coding wasn&rsquo;t for me. It was too boring, too restrictive.\nBut now I know those &ldquo;restrictive&rdquo; rules are what open unlimited creative freedom!\nWhat wasn&rsquo;t working for me Even though I\u2019ve been a content creator for a long time - writing, building brands, running my own business - I hadn\u2019t built something in a long time that made me feel creatively proud.\nSure, I\u2019ve shipped valuable content. My master\u2019s in data science lets me dig deeper into the numbers. But something was still missing: that creative spark - the kind you get when you\u2019re not just expressing ideas, but building something tangible.\nThat itch had been quietly growing. I missed the feeling of watching something come to life because I made it happen. And weirdly enough, it was coding that could make it happen - the thing I always thought was \u201ctoo late or too boring\u201d to learn.\nI didn\u2019t want to code just for the sake of it. I wanted visual feedback. That immediate \u201caha!\u201d when something runs. Backend programming? Too abstract for my brain. Web dev? Maybe.\nBut it was software development \u2014 the smoothness, the consistency, the craft of digital experiences that just work \u2014 that speaks to me.\nI\u2019ve always been drawn to well-crafted software, not just for aesthetics but because things just\u2026 work. Software that lasts and feels reliable, that gives you a sense of ease and trust.\nThat quality made me curious. Who builds software like this and how?\nAnd more importantly: Why not me?\nThat question eventually became less about trying random tools and more about building a place to learn from them. I wrote about that much later in my year of using Omarchy as a learning OS.\nDiscovering Programming Again When I finally started exploring coding, I wasn\u2019t exactly sure what I was walking into. Programming languages sounded elegant. Fast. Clean. And honestly, they felt\u2026 inviting in a way that many other technical skills didn\u2019t.\nI wasn\u2019t looking for the easiest route - I\u2019ve been through enough to know that \u201ceasy\u201d rarely leads to meaningful. What I was looking for was something I could see myself growing with. And programming felt native, not just to the digital world, but to the kind of builder I wanted to become. Maybe it\u2019s the declarative nature.\nAnyways, what really tipped it over for me was the creative control coding gave me. I could design and build in the same space. I could visualize my ideas, see them update in real-time, and tweak them with intention. It didn\u2019t feel like hacking things together - it felt like crafting something, piece by piece.\nCoding made me feel like I could build beautiful things - not just functional ones. And that mattered to me more than I expected.\nThis wasn\u2019t just about learning how to code. It was about finally having a creative outlet that felt aligned with both my tech side and my artistic instincts.\nMy Early Struggles and First Wins with Coding I\u2019ve only been learning to code for about a month and a half as of writing this post - so let\u2019s be real: I\u2019m still figuring things out.\nI have coded with Python for about 2.5 years or so, all of it has been primarily in and around machine learning and data science.\nAnd that experience with Python makes it slightly easier for me to pick up new programming languages \u2014 since I get the logic.\nAnyways, the first few days were messy. The code editor felt like&hellip; well you know how it feels&hellip; it&rsquo;s weird, peculiar but to be honest it is a really really good environment.\nI kept wondering if I had installed things wrong. Errors - specific errors in and around programming concepts and what not.\nBut at the same time, there were these tiny wins that kept me going.\nLike the first time I got a button to actually change a theme from light to dark mode, with a gradient background, ahh, it was beautiful.\nIt sounds basic - and it is - but seeing that change happen because I wrote the code? That hit different.\nAnother small win? Just pushing my first little app to GitHub. Nothing fancy, just a few screens stitched together. But it felt like crossing a line. Like I went from someone watching tutorials to someone doing stuff. I had done this one to understand how the code editor works more than actually building the app\nI still run into weird layout bugs. I still forget what some functions or methods are called. But I\u2019m not frozen anymore. I\u2019m moving. And that feels good.\nAnd btw the AI suggestions or ChatGPT or even official docs or developer channels are super helpful for all this!\nWhy This Journey Matters to Me This isn\u2019t just about learning to code or adding another skill to my resume.\nFor me, this is about building something of my own. Something that doesn\u2019t rely on algorithms or client briefs. Something that doesn\u2019t need to perform on social media (or maybe it does). Just something real - made by me, for me, for now.\nIt\u2019s also about proving to myself that I can start something new, even now, even after 30. That I don\u2019t have to \u201ccatch up\u201d to people who started at 18. That I can learn at my own pace and still make progress.\nI\u2019ve always been curious. I\u2019ve always wanted to understand how things work. And now I\u2019m finally channeling that into something I can shape with my own hands (well, keyboard).\nCoding and software development just happen to be the tools I\u2019m using. The real reason I\u2019m doing this is to reconnect with that builder in me - the one I kind of lost along the way while chasing growth, deadlines, and whatever came next.\nThis feels like coming back to something I didn\u2019t know I needed.\nYou\u2019re Not Too Late Either If you\u2019re in your 30s (or beyond) and thinking about learning something new - especially something like programming - I just want to say this: you\u2019re not too late.\nI know it feels like everyone\u2019s already ahead. I know it\u2019s easy to scroll past yet another 22-year-old who \u201cjust shipped their fifth app or is doing $23k MRR as an indie dev\u201d and feel like you missed the boat.\nBut you haven\u2019t.\nYou\u2019re bringing life experience, focus, and a different kind of drive to the table. You\u2019re not doing this to show off. You\u2019re doing this because you want to build. And that counts for something.\nI\u2019m not an expert. I\u2019m still learning.\nSo if you\u2019ve been sitting on the fence, unsure whether to dive in \u2014 maybe this is your sign.\nYou\u2019re just getting started too, just like me.\n","permalink":"https:\/\/codebynight.dev\/posts\/why-i-chose-to-learn-coding-after-age-of-30\/","summary":"<h2 id=\"the-urge-to-create-software-that-feels-meaningful\">The urge to create software that feels meaningful<\/h2>\n<p>I didn\u2019t think I\u2019d be learning how to build software at 30. Not while juggling a product marketing career, masters in data science, a family life, and the sinking feeling that I really should have taken coding more seriously 10 years ago.<\/p>\n<p>What really sparked my desire was my admiration for high-quality software \u2014 whether apps, tools, or platforms \u2014 that just work seamlessly and beautifully. I wanted to be someone who creates those things, not just consumes them.<\/p>","title":"Why I Chose to Learn Coding Properly After the Age of 30"},{"content":"Hey, I\u2019m Shivam.\nI work in GTM engineering around AI security and governance. Before that, I spent years in product marketing, websites, e-commerce, analytics, and growth work. A lot of it was practical stuff. Trying to understand customers, fixing broken journeys, building workflows, getting data into a shape where someone could actually use it.\nOver time, I got less interested in only using the tools and more interested in the code, data, permissions, and decisions that power them. That led me through a master\u2019s in Data Science and Machine Learning, and into learning more backend and systems work alongside my day job.\nCodeByNight is where I write about that. Forecasting, machine learning, AI systems, backend engineering, Linux, Rust, security, and the place between a model producing an output and someone having to use it in real life.\nSome posts explain something practical. Some come from an experiment, a project, or a bug I had to bang my head on for longer than expected. I do find myself asking questions like does this metric deserve trust? What makes a notebook useful outside the notebook? Where deterministic software should do the work instead of an LLM? and How privacy, reliability, or actual user behaviour change the design?\nI am still learning, obviously, and I do not write from the position of having every answer. This site is partly a record of what I build and study, but it is also where I try to test my own assumptions.\nConnect with me: LinkedIn \u00b7 GitHub\n","permalink":"https:\/\/codebynight.dev\/about\/","summary":"<p>Hey, I\u2019m Shivam.<\/p>\n<p>I work in GTM engineering around AI security and governance. Before that, I spent years in product marketing, websites, e-commerce, analytics, and growth work. A lot of it was practical stuff. Trying to understand customers, fixing broken journeys, building workflows, getting data into a shape where someone could actually use it.<\/p>\n<p>Over time, I got less interested in only using the tools and more interested in the code, data, permissions, and decisions that power them. That led me through a master\u2019s in Data Science and Machine Learning, and into learning more backend and systems work alongside my day job.<\/p>","title":"About"}]