<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MIN SITHU]]></title><description><![CDATA[Software Engineer & Tech Content Creator]]></description><link>https://itsmeminsithu.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6a12efab551486ce6cffb0f8/e625676c-12c6-405c-82ad-e3e6ea9d6392.png</url><title>MIN SITHU</title><link>https://itsmeminsithu.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 10:14:41 GMT</lastBuildDate><atom:link href="https://itsmeminsithu.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How Sentiment Analysis Reads Feelings in Text]]></title><description><![CDATA[To put it simply, sentiment analysis is a program that reads a piece of text and hands back a verdict on its mood: positive, negative, or somewhere in…]]></description><link>https://itsmeminsithu.hashnode.dev/how-sentiment-analysis-reads-feelings-in-text</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/how-sentiment-analysis-reads-feelings-in-text</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[nlp]]></category><category><![CDATA[language models]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 08:40:12 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, sentiment analysis is a program that reads a piece of text and hands back a verdict on its mood: positive, negative, or somewhere in between. It does not understand your feelings. It has learned what happy writing and angry writing usually look like, and it matches your words against those patterns.</p>
<p>A friend of mine sells phone cases through a small online shop. One evening, a post of hers picked up a few hundred comments in a couple of hours — questions, jokes, complaints, praise, all mixed together. She rang me and asked the only question she cared about: "Are people happy, or are they angry?" Reading three hundred comments one by one, at midnight, is nobody's idea of fun. That tired midnight question is exactly the moment this technology exists for.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/cb06e12e-20fa-4bf6-9775-87c4e096f4d3.png" alt="" style="display:block;margin:0 auto" />

<p><em>The map of the idea: one verdict per text, two ways of reaching it, and the traps that still catch both.</em></p>
<h2>The job is one verdict on a piece of text</h2>
<p>Give the program a review, a comment, a support ticket, a tweet. It gives you back a label. The basic version has three labels: positive, negative, neutral. Finer versions hand back a score instead — 0.87 positive, say — or a row of stars from one to five.</p>
<p>Businesses buy this because of scale. Nobody can read a million reviews, but a dashboard can show the mood of those reviews rising or falling week by week. A hotel chain can spot that guests at one branch have turned sour about breakfast. A phone company can watch complaints spike the morning after an update. The verdict is rough, but it arrives fast and it covers everything.</p>
<p>It helps to think of it as a thermometer. A thermometer gives you one number for the whole room: warm, cold, fine. It cannot tell you who opened a window or why anyone is shivering. Sentiment analysis does the same thing for feeling. One number, quickly, roughly — and no explanation of why.</p>
<h2>The first systems just counted weighted words</h2>
<p>The earliest approach is the one you would probably invent yourself. Make two lists. Happy words: good, great, love, excellent. Sad words: bad, terrible, hate, awful. Then read the text, count which list wins, and declare the winner the mood.</p>
<p>Researchers built bigger versions of those lists, called lexicons, with thousands of words scored by strength — "excellent" might be worth three points and "awful" minus three. Then they added rules on top. A "not" standing before a word flips it. Capital letters and exclamation marks turn the volume up a little.</p>
<p>Here is the whole method, small enough to run in your head, in plain Python with nothing to install:</p>
<pre><code class="language-python"># A tiny sentiment scorer: count happy words, count unhappy words
positive = {"good", "great", "love", "happy", "best", "brilliant"}
negative = {"bad", "terrible", "hate", "awful", "worst", "boring"}

def sentiment(text):
    words = text.lower().replace(".", "").replace(",", "").split()
    score = 0
    for word in words:
        if word in positive:
            score += 1
        if word in negative:
            score -= 1
    if score &gt; 0:
        return "positive"
    if score &lt; 0:
        return "negative"
    return "neutral"

print(sentiment("The food was great and I love this place"))
print(sentiment("Great, another brilliant update that broke my phone"))
</code></pre>
<p>The first line behaves: two happy words, no sad ones, verdict positive. The second line falls flat on its face. It also comes back positive — and the sentence is a complaint. The counter found "great" and "brilliant" and stopped thinking. It never noticed "broke my phone", which is the actual news in that sentence, because "broke" is not on either list. And even if you added it, the score would still come out positive. A list cannot hear the tone that makes "great" mean its exact opposite.</p>
<p>Negation breaks it just as easily. Feed it "the battery is not bad at all" and it sees one sad word, "bad", and reports negative — about a sentence that is praising the battery. There is no rule in my little counter for the small word "not" standing guard in front. Real lexicon systems add that rule. Then sarcasm walks in and breaks the new rule. Patch, break, patch, break — that is the honest history of the word-list years.</p>
<h2>Neural models learned the patterns instead of the lists</h2>
<p>The newer approach stops handing the machine rules and starts handing it examples. Humans sit down and label a large pile of real text — this review is positive, that one is negative, this one is mixed — tens of thousands of pieces, sometimes far more. The model reads them all and adjusts itself until its verdicts mostly match the human ones.</p>
<p>Two ideas make this work. The first is embeddings: every word is turned into a list of numbers, placed in a kind of map where words used in similar ways sit near each other. "Good" and "great" end up as neighbours. "Good" and "awful" end up far apart. The second idea is that the model reads the whole sentence at once and lets the words affect each other. The word "bad" in "not bad" gets pulled by the "not" standing next to it, because in the training data, that pairing was praise again and again. Nobody wrote that rule down. The pattern was in the examples, and the model picked it up.</p>
<p>Here is that journey in a picture:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/e7ddf9c1-6395-4377-bf68-1884b01e3258.png" alt="" style="display:block;margin:0 auto" />

<p><em>From raw text to a verdict: words become numbers, the whole sentence is weighed together, and the answer comes out as a score.</em></p>
<p>One more honest detail about those labels: they are human judgement calls, and humans disagree. Give the same sarcastic review to five people and you may get three verdicts. The people labelling the training data argue, settle it by vote, and move on — which means the model is trained to match the majority opinion of tired strangers, not some perfect truth about feelings. When a review sits right on the fence, the model has learned the fence exists. Its unsure scores on borderline text are not a bug. They are the most honest thing it produces.</p>
<p>The output deserves an honest mention too. A neural model does not really say "positive". It says something like "82 percent positive, 15 percent negative, 3 percent neutral" — how strongly the text resembles each kind it was trained on. The tidy label you see is just the biggest of those numbers with the rest thrown away. Good tools show you the score. The score is where the doubt lives, and the doubt is information.</p>
<h2>The honest limits are not small</h2>
<p>I like this technology, and I do not fully trust it. Both of those can be true, and keeping both in mind is how you use it well.</p>
<ul>
<li><strong>Sarcasm still wins too often.</strong> "Wonderful, only the third crash today" is praise-shaped and complaint-filled. Models catch more sarcasm than they used to, but a dry, deadpan sentence with no angry words in it will fool them regularly.</li>
<li><strong>Mixed feelings get flattened.</strong> "The camera is superb and the battery is a joke" holds two verdicts at once. A basic system must pick one label, and whichever it picks, half the truth is lost. Fancier systems score each aspect separately, but the plain headline verdict still hides the split.</li>
<li><strong>Words change sides by topic.</strong> "Cheap" is praise for a phone and a complaint about a hotel room. "Unpredictable" is a compliment for a film plot and a warning about a steering wheel. A model trained mostly on hotel reviews will make confident mistakes on car reviews, because in its world those words only ever meant one thing.</li>
<li><strong>Low-resource languages get a worse tool.</strong> Most labelled training text is English. For languages with far less of it — Myanmar among them — the same methods work noticeably worse. Often the text is quietly translated into English first, and feelings leak out on the way: the wording survives, the sting or the warmth does not always.</li>
</ul>
<p>None of this makes the tool useless. It makes it a compass rather than a judge. Let it read the million comments and tell you where the mood is moving. Then go and read the twenty angriest ones yourself, slowly, the way my friend eventually did. The machine counts the weather. The understanding is still your job.</p>
<h2>Takeaways</h2>
<ul>
<li>Sentiment analysis gives one verdict — positive, negative, neutral, or a score — for a piece of text, by matching it against patterns of how feelings are usually written.</li>
<li>The old way counted words from scored lists, with rules patched on top; negation and sarcasm broke it again and again.</li>
<li>The neural way learns from large piles of human-labelled examples, using embeddings and whole-sentence context, so patterns like "not bad" are learned instead of legislated.</li>
<li>The output is a probability, not a fact — the size of the score is the size of the doubt.</li>
<li>Sarcasm, mixed feelings, topic-specific words, and low-resource languages all still cause real errors, so treat the result as a compass, not a judge.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/22849cf1-2a1b-4949-9b1a-29e8ac65f6cb.png" alt="" style="display:block;margin:0 auto" />

<p><em>Same word, two verdicts: "cheap" changes its feeling with the thing it describes, and no word list can save you from that.</em></p>
<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Sentiment_analysis">Sentiment analysis — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Word_embedding">Word embedding — Wikipedia</a></li>
<li><a href="https://arxiv.org/abs/1810.04805">BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding — Devlin et al., arXiv:1810.04805</a></li>
<li><a href="https://huggingface.co/docs/transformers/tasks/sequence_classification">Sequence classification — Hugging Face Transformers documentation</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Why Tokenization Is Harder for the Myanmar Language]]></title><description><![CDATA[To put it simply, every language model reads text through a chopping step that was mostly trained on English — and Myanmar text walks into that chopper…]]></description><link>https://itsmeminsithu.hashnode.dev/why-tokenization-is-harder-for-the-myanmar-language</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/why-tokenization-is-harder-for-the-myanmar-language</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[nlp]]></category><category><![CDATA[language models]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 08:29:02 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, every language model reads text through a chopping step that was mostly trained on English — and Myanmar text walks into that chopper with no spaces, stacked letters, and extra marks, so it comes out the other side cut into far more pieces than an English sentence of the same meaning.</p>
<p>A few weeks ago I pasted a long article written in Myanmar into a chatbot and asked for a summary. It stopped and told me the text was too long. I was puzzled — the article did not feel that long. So I ran the same piece through a rough translation, pasted in the English version, and asked again. This time it fit with room to spare. Same article, same meaning, same chatbot. Only the language had changed, and somehow the Myanmar version had taken up far more room. That small, annoying moment is what this article is about.</p>
<p>Think of the model's memory as one sheet of paper on a desk. Everything you say, and everything it answers, has to fit on that sheet. English gets to write on the sheet in shorthand — a few marks stand for a whole word. Myanmar has to spell everything out letter by letter, in full. The same idea, written the long way, fills the page much sooner. The rest of this article is just explaining why the spelling-out happens.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/f0810828-e8bb-4270-9ab8-5eaa7f865865.png" alt="" style="display:block;margin:0 auto" />

<p><em>Five reasons Myanmar text gets chopped so much finer than English.</em></p>
<h2>A tokenizer learns its chopping habits from English</h2>
<p>Before a model can read anything, a tokenizer cuts your text into pieces called tokens, and each piece becomes a number. The model never sees your sentence. It sees the numbers. So piece size matters: big pieces mean few numbers, tiny pieces mean many.</p>
<p>How does the tokenizer decide where to cut? Most modern models learn the cuts from data, using a method called byte pair encoding. During training, the system scans a huge pile of text and keeps merging whichever pair of pieces appears side by side most often. Frequent neighbours become one bigger piece. Rare neighbours never get merged, and stay small.</p>
<p>Here is the catch. That huge pile of text is mostly English, because most of the easily collected text on the internet is English. So the merges the tokenizer learns are English merges:</p>
<ul>
<li>Common English words like "the" survive as a single token</li>
<li>Slightly rarer words split into two friendly halves, like a root plus an ending</li>
<li>Myanmar combinations appear so rarely in the pile that almost no merges are learned for them</li>
<li>With no merges to use, the tokenizer falls back to cutting smaller and smaller — often down to single characters, and for some shapes, down to the raw bytes underneath</li>
</ul>
<p>The tokenizer is not being unfair on purpose — its habits were formed on English, and Myanmar never got enough practice time.</p>
<h2>Myanmar script offers no easy places to cut</h2>
<p>Even a fair-minded tokenizer would struggle with Myanmar, because the script itself hides the cut lines.</p>
<p>English is generous to machines. Words arrive separated by spaces, and one letter is stored as one unit. Myanmar plays by different rules:</p>
<ul>
<li><strong>There are no spaces between words.</strong> A Myanmar sentence is written as a flowing line of syllables. The spaces you do see usually mark off a phrase or a pause, more like a comma than a word boundary. A machine looking for words cannot just split on spaces the way it does with English.</li>
<li><strong>Consonants stack.</strong> In many words, one consonant sits below another, written with a special mark that kills the vowel of the letter above. What your eye reads as one tidy syllable is stored as several separate pieces of code.</li>
<li><strong>Marks combine.</strong> Vowels and tones are often not letters at all, but small marks written above, below, before, or after a consonant. They are stored as their own code points, so one visible character on the screen can be three or four units in the file.</li>
<li><strong>The same syllable can be typed in different orders.</strong> Some marks are typed before the letter they sit beside on screen, so two files can look identical but be built differently underneath.</li>
</ul>
<p>Your eyes glide over all of this without noticing. You read syllables, not code points. A tokenizer counts code points, and for Myanmar there are simply many more of them per idea.</p>
<h2>Count the pieces yourself</h2>
<p>You do not need a language model to feel the difference. Plain Python and one short phrase are enough. Here are two ways of saying the same thing — "the Myanmar language" — counted three different ways:</p>
<pre><code class="language-python">english = "the Myanmar language"
myanmar = "မြန်မာဘာသာ စကား"

print("English:", len(english), "characters,", len(english.split()), "words")
print("Myanmar:", len(myanmar), "characters,", len(myanmar.split()), "space-separated parts")
print("English in bytes:", len(english.encode("utf-8")))
print("Myanmar in bytes:", len(myanmar.encode("utf-8")))
</code></pre>
<p>Run it and you get something curious:</p>
<pre><code class="language-text">English: 20 characters, 3 words
Myanmar: 15 characters, 2 space-separated parts
English in bytes: 20
Myanmar in bytes: 43
</code></pre>
<p>At first glance Myanmar looks shorter — 15 characters against 20. But look at what Python is really counting. Those 15 "characters" include silent helper marks: the little killer mark that stacks a consonant, the vowel signs, the tone mark. They are not letters you could say out loud on their own. And the "2 parts" from splitting on spaces is a polite lie, because the phrase holds several words; the space is a phrase break, not a word break.</p>
<p>The byte row is the one that matters for a tokenizer. English letters cost one byte each. Every Myanmar code point costs three bytes. When a tokenizer has no ready-made piece for a Myanmar combination, many tokenizers fall back towards bytes — and 43 bytes can mean several times as many tokens as the handful an English phrase needs. The numbers in this tiny example are exact; the token counts in real models vary, but the direction is always the same.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/12c971e4-d225-46e1-82fa-62ad0a30d570.png" alt="" style="display:block;margin:0 auto" />

<p><em>What happens to a Myanmar sentence on its way into a model.</em></p>
<h2>More pieces means a higher bill and a shorter memory</h2>
<p>This would be a cute technical detail if it stayed inside the tokenizer. It does not. It follows you into everyday use:</p>
<ul>
<li><strong>The same sentence costs more.</strong> Many AI services charge by the token. A Myanmar paragraph that becomes several times more tokens than its English twin costs several times more to send and to answer — for the same content.</li>
<li><strong>The context window fills faster.</strong> Remember the sheet of paper on the desk. A long Myanmar document, spelled out piece by piece, covers the sheet sooner, so the model "forgets" the beginning of your conversation earlier, and long documents get refused or cut off — exactly what happened to my article summary.</li>
<li><strong>Answers can be slower.</strong> More tokens means more steps of work for the model, in and out.</li>
<li><strong>The model has seen less of the language.</strong> Myanmar makes up a small share of the text these models train on, so the model has had less practice reading it — and the few examples it did see were chopped into tiny pieces, which makes the patterns harder to spot.</li>
</ul>
<p>None of this means the model is bad at Myanmar on purpose. It means the language starts the race several steps behind, at the very first step of the pipeline, before any intelligence is involved.</p>
<h2>One language, two encodings</h2>
<p>Myanmar also carries a piece of history that English never had to deal with. For years, the most common way to type Myanmar on phones and computers was a font system called Zawgyi. Zawgyi looked fine on screen, but it stored the text in its own private arrangement, different from the world standard, Unicode.</p>
<p>The result is that a large share of the Myanmar text on the internet exists twice over — once in Unicode order, once in Zawgyi order — and the two files can look identical to you while being completely different underneath. For a tokenizer, that is a quiet disaster:</p>
<ul>
<li>Training data for Myanmar is split between two rival spellings of the same language</li>
<li>A tokenizer trained mostly on one encoding meets the other as a stranger</li>
<li>Text copied from an old website may paste into a chatbot as a sequence the model has rarely seen, even though it reads perfectly well to you</li>
</ul>
<p>The country has been moving to Unicode for years, and new text is increasingly standard. But the old text is still out there, still being copied, and still quietly confusing the machines.</p>
<h2>The gap is closing, but slowly</h2>
<p>I do not want to leave you with the idea that this is hopeless, because it is not. Newer tokenizers are trained on more balanced mixtures of languages. More Myanmar text is published in Unicode every year. And anyone who works with the language can help: type in Unicode rather than Zawgyi, and when a tool struggles with a long Myanmar document, split it into smaller pieces instead of assuming the tool is broken — it may simply have run out of sheet.</p>
<p>The deeper lesson travels well beyond Myanmar. A language model does not treat all languages equally, and the inequality does not start with the model's opinions or knowledge. It starts with the chopping — with how much of your sentence survives the first cut, and how much room it is allowed to take up. Next time a chatbot answers you better in English than in Myanmar, you will know one honest reason why, and it has nothing to do with how smart the model is.</p>
<h2>Takeaways</h2>
<ul>
<li>Tokenizers learn their cut lines from training text, and that text is mostly English, so English keeps big pieces and Myanmar gets tiny ones.</li>
<li>Myanmar script hides word boundaries: no spaces between words, stacked consonants, and combining marks mean many more code points per idea.</li>
<li>More pieces mean real consequences — higher token cost, a context window that fills sooner, slower answers, and less training practice for the model.</li>
<li>The old Zawgyi encoding splits Myanmar data in two, so the model effectively sees even less of the language.</li>
<li>Typing in Unicode and feeding long documents in smaller pieces are two small things that genuinely help.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/b43e3667-7a87-429c-b001-0c2a2e5ac4cb.png" alt="" style="display:block;margin:0 auto" />

<p><em>The same meaning, carried in very different numbers of pieces.</em></p>
<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Myanmar_script">Myanmar script — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Burmese_language">Burmese language — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Byte_pair_encoding">Byte pair encoding — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Zawgyi_font">Zawgyi font — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Tokenization_(lexical_analysis)">Tokenization — Wikipedia</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is the Difference Between Fine-Tuning, Prompting, and RAG]]></title><description><![CDATA[To put it simply, all three are ways to make a general model useful for your own material, and the real difference is where the change happens. Prompting…]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-the-difference-between-fine-tuning-prompting-and-rag</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-the-difference-between-fine-tuning-prompting-and-rag</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[nlp]]></category><category><![CDATA[language models]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 08:20:35 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, all three are ways to make a general model useful for your own material, and the real difference is where the change happens. Prompting changes what you say to the model. RAG changes what the model gets to read before it answers. Fine-tuning changes the model itself.</p>
<p>A friend of mine runs a small online shop. Last month she messaged me, a bit frustrated: "I want a chatbot that answers questions about my refund policy. Do I have to train my own model?" She had spent two evenings reading articles, and the same three words kept going around in circles — prompting, RAG, fine-tuning — as if they were three brands of the same product. They are not. They solve different problems, they cost very different amounts of time and money, and picking the wrong one is how people spend three weeks building something a well-written prompt would have handled in an afternoon.</p>
<p>Here is the picture that cleared it up for her. Think of the model as a capable cook who has just joined your kitchen. The cook is talented and has cooked all over the world, but knows nothing about your shop, your recipes, or how you like things done. Prompting is standing next to the cook and giving tonight's instructions out loud. RAG is handing the cook your recipe book and letting them look things up while they work. Fine-tuning is sending the cook away to train in your style for a month, so the skill lives in their hands and you no longer need to explain. Same cook, three very different kinds of help.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/3ee741f8-fbaa-457f-a28b-5fcf16ccd1bc.png" alt="" style="display:block;margin:0 auto" />

<p><em>One model, three ways to teach it your material: tell it, let it read, or train it.</em></p>
<h2>Prompting Changes Nothing Inside the Model</h2>
<p>Prompting is the one you already know. You write instructions, you set the tone, you paste in the facts that matter, and sometimes you show an example or two of the answer you want. "You are the support assistant for my shop. Answer politely and briefly. Our refund policy is this…" — that is a prompt doing real work.</p>
<p>Nothing inside the model changes while you do this. The cook is exactly the same cook; you are just standing closer and explaining better. Everything the model knows for that conversation lives in the context, the text it can see right now. Close the chat, and it is all gone.</p>
<p>That sounds like a weakness, and sometimes it is. But look at what you get for it:</p>
<ul>
<li>It costs nothing to start and nothing to change — edit a sentence and the behaviour changes.</li>
<li>It works with any model, including the big hosted ones you cannot retrain anyway.</li>
<li>It is the fastest way to test an idea before building anything bigger.</li>
</ul>
<p>Its limits are honest ones. The model can only use what fits in the context, so you cannot paste your whole company archive into every chat. Long instructions can get ignored or muddled. And if the model simply does not know a fact and you did not paste it, a good prompt will not save you — it will guess, politely and wrongly. Prompting steers knowledge the model already has, or knowledge you hand it in the moment. It does not add new knowledge on its own.</p>
<h2>RAG Lets the Model Read Your Documents First</h2>
<p>RAG stands for retrieval-augmented generation, which is a heavy name for a friendly idea: before the model answers, go and fetch the pages that matter, put those pages into the prompt, and let the model answer from them.</p>
<p>Back to the kitchen. Your cook does not carry every recipe in their head. When an order comes in, they walk to the shelf, pull out the right page, read it, and then cook. Your documents stay on the shelf, in your hands. The model itself is untouched — the same general model everyone else uses — but every answer is built on text you supplied a second earlier.</p>
<p>This is why RAG is the usual answer for questions about policies, manuals, product catalogues, contracts, and support tickets. The knowledge stays fresh in a way training never can: edit the refund policy document this morning, and the very next answer uses the new version. No retraining, no waiting. And when the model answers, it can point at the page it read, which makes its answers much easier to check.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/ba9324be-2165-4480-9040-3e91dd696bcd.png" alt="" style="display:block;margin:0 auto" />

<p><em>RAG in five steps: ask, search your documents, build the prompt, let the model read, get an answer grounded in your pages.</em></p>
<p>Here is the whole idea in a few lines of Python — a tiny document list, a simple keyword search, and the found text placed into a prompt:</p>
<pre><code class="language-python"># RAG in miniature: search first, then ask with the found text included
documents = [
    "Refunds are given within 14 days of delivery.",
    "Delivery inside the city takes 2 to 3 working days.",
    "All electronics carry a one year warranty.",
]

def retrieve(question):
    words = question.lower().split()
    best = max(documents, key=lambda d: sum(w in d.lower() for w in words))
    return best

fact = retrieve("How long do I have to return an item?")
prompt = f"Answer using only this fact: {fact}\nQuestion: how long do I have to return an item?"
print(prompt)
</code></pre>
<p>Three things are happening in that little script, and they are the same three things in every real RAG system. First, the documents sit in a list, ready to be searched — in a real system this might be thousands of pages in a database. Second, <code>retrieve</code> scores each document by how many of the question's words appear in it and picks the best match; real systems usually compare meanings with embeddings instead of raw keywords, which is smarter, but the job is identical. Third, the winning text is pasted straight into the prompt, so the model answers from your words instead of from its memory. Search first, read second, answer third.</p>
<p>The costs are real but modest: you have to keep the document collection tidy, and the search step has to be decent, because a model reading the wrong page will give a confident answer about the wrong thing. Garbage page in, garbage answer out.</p>
<h2>Fine-Tuning Changes the Model Itself</h2>
<p>Fine-tuning is the heavy tool. You collect examples — often hundreds or thousands of them — showing the model the behaviour you want: questions paired with your ideal answers, text paired with the label it should get, messy input paired with the exact format you want back. Then you train the model on those examples, and its internal weights shift a little. The behaviour stops being an instruction it follows and becomes a habit it has.</p>
<p>This is the cook coming back from a month of training in your kitchen's style. You no longer stand there explaining that your shop answers briefly, warmly, and always mentions the warranty. They just cook that way now, every time, without being told.</p>
<p>That makes fine-tuning the right tool for behaviour and style:</p>
<ul>
<li>A tone or output format the model must hit every single time, not just when the prompt is perfect.</li>
<li>A repeated, narrow job — classifying tickets, extracting fields from forms, tagging products — done the same way ten thousand times.</li>
<li>Cases where the prompt would need to be enormous, because the examples carry the lesson better than instructions do.</li>
</ul>
<p>What fine-tuning is bad at is facts. People imagine training a model on their price list so it "knows" the prices, and this is where the money gets wasted. Knowledge baked into weights is frozen on training day, hard to update, and unreliable — the model may still invent a price with total confidence, because you trained its habits, not its memory. It also costs the most of the three: preparing clean examples takes real human hours, the training run itself costs money or hardware, and every update means doing it again. Fine-tune for how the model behaves. Do not fine-tune to store what it should know.</p>
<h2>They Are Not Rivals, and Good Systems Stack Them</h2>
<p>Here is the part the comparison articles usually miss: these three are not competitors. They work at different layers, and most well-built systems use more than one at the same time.</p>
<p>The order I recommend to anyone starting out:</p>
<ul>
<li>Start with prompting. It is free, instant, and often enough. Write the instructions, paste the key facts, test with real questions.</li>
<li>Add RAG when the answers need your facts — documents, policies, catalogues, anything that changes or anything the model must quote accurately.</li>
<li>Fine-tune only when behaviour is the problem: the format keeps slipping, the tone is wrong, or the same narrow job runs all day and needs to be fast and consistent.</li>
</ul>
<p>My friend's shop never needed training at all. Her chatbot today is a plain model, a clear prompt, and RAG over her policy and delivery pages. When she changes the refund window next month, she will edit one document, and the chatbot will know. If she later wants every reply to sound exactly like her, short and warm and in her phrasing, that is when fine-tuning earns its place — on top of the other two, not instead of them.</p>
<h2>Takeaways</h2>
<ul>
<li>Prompting changes what you say to the model: instructions and examples in the context, nothing inside the model changes, cheapest and fastest to adjust.</li>
<li>RAG changes what the model reads: your documents are searched at question time and pasted into the prompt, so answers stay fresh and can be checked against the source.</li>
<li>Fine-tuning changes the model itself: training on examples moves behaviour and style into the weights, which costs the most and freezes knowledge at training time.</li>
<li>Use fine-tuning for behaviour, RAG for facts, and prompting for everything you have not proven you need yet.</li>
<li>The three stack: most good systems combine a clear prompt, retrieval over live documents, and fine-tuning only where habit matters more than instructions.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/a66ae1db-e5c4-4ee9-853b-04f2ad302e14.png" alt="" style="display:block;margin:0 auto" />

<p><em>Prompting, RAG, and fine-tuning compared: what changes, what it costs, and how fresh the knowledge stays.</em></p>
<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Prompt_engineering">Prompt engineering — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Retrieval-augmented_generation">Retrieval-augmented generation — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Fine-tuning_(deep_learning)">Fine-tuning (deep learning) — Wikipedia</a></li>
<li><a href="https://arxiv.org/abs/2005.11401">Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks — Lewis et al., arXiv:2005.11401</a></li>
<li><a href="https://platform.openai.com/docs/guides/fine-tuning">Fine-tuning — OpenAI API documentation</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Temperature Does in a Language Model]]></title><description><![CDATA[To put it simply, temperature is a dial that decides how brave a language model is allowed to be when it picks its next word. Turn it down and the model…]]></description><link>https://itsmeminsithu.hashnode.dev/what-temperature-does-in-a-language-model</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-temperature-does-in-a-language-model</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[nlp]]></category><category><![CDATA[language models]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 08:11:12 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, temperature is a dial that decides how brave a language model is allowed to be when it picks its next word. Turn it down and the model plays safe, choosing the word it believes in most, almost every time. Turn it up and it starts taking chances on words it only half believes in. Same model, same training, same knowledge. Only the bravery changes.</p>
<p>A small scene from my own desk. I once asked a model to finish the line "The cat sat on the" ten times, with the setting turned low, and it answered "mat" ten times in a row. Then I turned the setting up and asked again. This time I got "mat", "floor", "windowsill", and once, memorably, "keyboard". Nothing inside the model had changed between those two runs. It knew the same words, and it believed in them in exactly the same order. The only thing I had moved was how far it was allowed to stray from its first choice.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/3dba0011-0470-4a07-a762-42acdc520707.png" alt="" style="display:block;margin:0 auto" />

<p><em>The whole article on one card: one dial, sitting between the model's scores and the word it finally picks.</em></p>
<h2>The model scores every possible next word</h2>
<p>A language model writes one word at a time — strictly, one token at a time, where a token is a word or a piece of a word. Before it writes each one, it looks at everything so far and does something most people never see: it gives a score to every word it knows. These raw scores have a name, logits, and you can think of them as the model's gut feeling, written down as numbers. "Mat" gets a high score. "Floor" gets a lower one. "Banana" gets a score so low it is almost a joke.</p>
<p>Scores are awkward to work with, so a function called softmax turns them into chances — clean percentages that add up to exactly 100. After "The cat sat on the", the chances might look like this: "mat" 63 percent, "floor" 23 percent, "sofa" about 9 percent, "roof" 5 percent, and a long tail of stranger words sharing the crumbs. That list is the model's honest opinion about what comes next.</p>
<p>Then comes the step this whole article is about: picking. The model does not have to take the top word. In normal use it samples — it picks at random, but not fairly. Each word's chance of being picked is exactly its percentage. "Mat", at 63 percent, gets picked most of the time. "Roof", at 5, sneaks in once in a while, and the sentence wanders off somewhere you did not expect. Temperature is the setting that reshapes those percentages just before the pick.</p>
<h2>Temperature stretches or squeezes the chances</h2>
<p>Here is the whole mechanism, and it is smaller than people expect. Before softmax runs, every score is divided by the temperature. That is it. One division. But division changes the shape of the result in a way worth understanding.</p>
<p>Dividing by a small number, like 0.5, makes every score bigger — and, more importantly, makes the gaps between scores wider. The favourite pulls further ahead of the pack. After softmax, its chance grows and everyone else's shrinks. Dividing by a big number, like 2, squeezes the scores together. The gaps narrow, the underdogs catch up, and words the model only half believed in suddenly get a fair hearing. A temperature of exactly 1 leaves the scores untouched: the model's raw opinion, unedited.</p>
<p>It works a lot like ordering noodles and choosing your chilli level. Mild, and the bowl tastes the way it always tastes — safe, familiar, a little plain. Extra hot, and the same bowl becomes an adventure: exciting, surprising, and once in a while a genuine mistake. The cook did not change. The noodles did not change. Only the level you asked for changed.</p>
<p>Here is the flow in a picture, because this is the part worth fixing in your head:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/54d7c732-20a3-4aec-a0f6-5bd6dc74dcd0.png" alt="" style="display:block;margin:0 auto" />

<p><em>Four steps happen before every single word a model writes. Temperature lives in step two.</em></p>
<p>And here is the same idea as a few lines of Python, so you can watch the chances move yourself:</p>
<pre><code class="language-python">import numpy as np

def softmax(logits, temperature):
    scaled = np.array(logits) / temperature  # temperature lives in this one line
    scaled = scaled - scaled.max()           # keep the numbers small and safe
    exp = np.exp(scaled)
    return exp / exp.sum()

scores = [3.0, 2.0, 1.0, 0.5]  # mat, floor, sofa, roof

for t in (0.5, 1.0, 2.0):
    print(t, np.round(softmax(scores, t), 3))
</code></pre>
<p>Run it and three lines come back. At temperature 0.5, "mat" climbs from 63 percent to about 86, and "roof" nearly vanishes at less than 1 percent. At 1.0, nothing changes — 63, 23, 9, 5, the model's own opinion. At 2.0, "mat" falls to 44 percent while "roof" rises to 13. Same scores in, three very different sets of chances out. The subtraction in the middle line is only housekeeping — it stops the exponentials from growing into numbers too big for the computer to hold — but the division in the first line is the entire dial.</p>
<h2>Temperature zero means always take the favourite</h2>
<p>Push the idea to its limit and you get temperature 0. Dividing by a number that tiny would stretch the gaps so far that the favourite takes everything — so in practice, systems treat 0 as a simple rule: forget the random pick, always take the highest-scoring word. This is called greedy decoding.</p>
<p>Greedy has real virtues. Ask the same question twice and you get the same answer twice, which is exactly what you want when a program is pulling a date out of an invoice or filling in a form. But greedy text also goes flat fast. A model that always takes its safest word starts repeating itself — the same phrase, the same sentence shape, sometimes the same sentence, in a loop. Safe is not the same as good. It is just safe.</p>
<h2>Top-k and top-p trim the menu instead</h2>
<p>Temperature has two companion settings, and they solve a nearby problem: sometimes you do not want to reshape the chances, you want to remove the silly options entirely. Top-k keeps only the k best-scoring words — say the top 40 — and throws the rest away before the pick. Top-p, also called nucleus sampling, keeps the smallest group of words whose chances add up to some share, like 90 percent, and cuts the rest. On a confident turn, that group might be three words. On an open turn, it might be three hundred.</p>
<p>In practice the three settings work as a team. Top-k and top-p decide who is allowed into the room. Temperature decides how boldly the model chooses among the ones inside.</p>
<h2>Which setting for which job</h2>
<p>So what should you actually use? The honest answer is that it depends on what a wrong word costs you. Some rough settings that work well in daily use:</p>
<ul>
<li>Code, maths, and anything you will run or submit: 0 to 0.3. You want the model's first answer, the same way every time.</li>
<li>Facts, summaries, and pulling details out of a document: 0.2 to 0.5. A little freedom, no adventures.</li>
<li>Everyday chat, emails, and drafts: 0.6 to 0.8. Natural variety without wandering off.</li>
<li>Stories, poems, names, and brainstorming: 0.9 to 1.2. This is where the surprises you actually want live.</li>
<li>Above 1.3 or so: expect drift, invented words, and broken grammar. Fun to play with, risky to ship.</li>
</ul>
<p>One more thing worth knowing: the dial is applied again at every single word. A short answer barely feels it. A long answer feels it hundreds of times, and small chances compound — which is why a warm setting can start a story sensibly and be somewhere quite strange by page two.</p>
<p>One warning matters more than the numbers. Temperature cannot fix a model that does not know something. Turning the heat up does not create knowledge — it just makes the guessing bolder. A wrong fact at low temperature is a wrong fact stated plainly. The same wrong fact at high temperature is a wrong fact wearing a costume. If the answer matters, the fix is better information in the prompt and checking afterwards, not a luckier dial.</p>
<p>Here is the whole dial in one picture — the same four words from the code above, at two settings of the range:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/0cfa87fa-04e4-49c2-9e13-226486958394.png" alt="" style="display:block;margin:0 auto" />

<p><em>Same model, same sentence, same scores. The only thing that moved is the temperature.</em></p>
<h2>Takeaways</h2>
<ul>
<li>A model scores every possible next word, softmax turns the scores into chances, and sampling picks one — temperature reshapes the chances in between.</li>
<li>Low temperature widens the gaps: the favourite wins almost always, so text is steady, factual, and sometimes repetitive.</li>
<li>High temperature levels the field: unlikely words get their turn, so text is varied, creative, and riskier.</li>
<li>Temperature 0 is greedy decoding — always take the top word, no randomness, no surprises.</li>
<li>Top-k and top-p trim which words may be picked at all; temperature decides how boldly the model picks among the survivors.</li>
<li>Match the dial to the cost of a wrong word: cold for code and facts, warm for stories and ideas.</li>
</ul>
<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Softmax_function">Softmax function — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Boltzmann_distribution">Boltzmann distribution — Wikipedia</a></li>
<li><a href="https://huggingface.co/docs/transformers/main_classes/generation">Generation — Hugging Face Transformers documentation</a></li>
<li><a href="https://arxiv.org/abs/1503.02531">Distilling the Knowledge in a Neural Network — Hinton, Vinyals and Dean, arXiv:1503.02531</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is a Context Window in a Language Model]]></title><description><![CDATA[To put it simply, a context window is everything a language model can see at one moment. Not what it learned in training, not what you told it yesterday…]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-a-context-window-in-a-language-model</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-a-context-window-in-a-language-model</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[nlp]]></category><category><![CDATA[language models]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 08:02:30 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, a context window is everything a language model can see at one moment. Not what it learned in training, not what you told it yesterday — just the text sitting in front of it right now, while it writes its next word. If a piece of text is not inside that window, then as far as the model is concerned, it does not exist.</p>
<p>A few weeks ago I was deep into a long chat with a model, planning a small piece of software. Early on I had told it three things: my budget, the tools I wanted to use, and one firm rule — no paid services. An hour later, after dozens of messages back and forth, it cheerfully suggested a paid service. I stared at the screen. Had it not been listening? It had been listening. It had simply run out of room to keep my rule in view.</p>
<p>Think of the model as a person working at a small desk. Everything they are allowed to look at must fit on that desk: the instructions from their boss, the conversation so far, your newest note. The desk does not grow. When a new paper arrives and there is no space left, the oldest paper slides off the far edge and is gone. The worker is not careless and not forgetful by nature — the desk is just small. A context window is that desk, and most of the strange behaviour of chatbots makes sense once you see the desk clearly.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/c4b51f02-7b35-43a9-b952-ff513318ffef.png" alt="" style="display:block;margin:0 auto" />

<p><em>The context window in five ideas: tokens, falling out, cost, and working with the limit.</em></p>
<h2>The Window Is Measured in Tokens, Not Words</h2>
<p>The size of the desk is not counted in words or pages. It is counted in tokens. A token is a chunk of text — sometimes a whole word, sometimes half a word, sometimes a single character or a space. Models do not read letters the way we do; they read these chunks, and every chunk takes up one slot on the desk.</p>
<p>For English, one token is roughly three quarters of a word, so a window of 128,000 tokens holds very roughly 96,000 words — a medium novel. That sounds enormous, and it is, compared to the few hundred tokens early models could hold. But the counting matters, because everything is billed by the token: the space a text occupies, the time a reply takes, and usually the price you pay.</p>
<p>You can count tokens yourself in a few lines of Python. The library below is the real counter used with OpenAI-style models, so the number it gives is the number the model itself would see:</p>
<pre><code class="language-python">import tiktoken

enc = tiktoken.get_encoding("cl100k_base")
text = "The context window is everything the model can see right now."
tokens = enc.encode(text)
print(len(tokens), "tokens")
print(tokens)
</code></pre>
<p>Run it and you get 12 tokens for that one sentence, followed by the list of token numbers themselves. Try a long word like "antidisestablishmentarianism" and you will see it split into six tokens — the model does not get it in one piece. Try text in another language and the count climbs faster, because the chunking was learned mostly from English. Same desk, but some languages take up more of it per sentence. Remember that; it comes back later.</p>
<h2>What Actually Sits Inside the Window</h2>
<p>Here is the part most people get wrong: the window does not hold only your latest message. Every time the model replies, the whole desk is laid out again in front of it. A typical window holds four things, in this order:</p>
<ul>
<li>The system prompt — standing instructions set by the app or developer before you ever type, such as who the assistant is and how it should behave.</li>
<li>The chat history — every earlier message, yours and the model's, in order, from the start of the conversation.</li>
<li>Your new message — the thing you just typed, plus anything you pasted or attached with it.</li>
<li>Room for the reply — the answer itself is written token by token inside the same window, so space must be left for it.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/863a7252-1873-43cf-9723-5de007643e2c.png" alt="" style="display:block;margin:0 auto" />

<p><em>Everything the model can see, laid out in order, every single turn.</em></p>
<p>This is why a pasted document changes everything. Paste a 40-page report into the chat and you have not handed the model a file to keep — you have covered most of its desk with that report. It can answer questions about the report beautifully, because the report is right there in view. Start a new chat tomorrow and the report is gone, because nothing was ever stored. The window is working space, not a filing cabinet.</p>
<p>It also explains a subtle habit: models are usually best at the start of a conversation and at the very recent end. The middle of a very long chat is the part of the desk furthest from the worker's eyes.</p>
<h2>When the Window Fills, the Oldest Text Falls Out</h2>
<p>A conversation cannot grow forever, because the desk cannot. When the total text reaches the limit, something has to give. In most chat apps, the oldest messages are quietly dropped — truncated — to make room for the new ones. Some apps instead summarise the early part and keep the summary, which is gentler but still a lossy copy of what you actually said.</p>
<p>And this is the honest answer to the most common complaint about chatbots: "it forgot what I told it." Usually the model did not forget in the human sense. Your instruction slid off the desk. From the model's side there is no warning bell and no gap in its memory — the text is simply not in front of it, so it answers as if it was never said. My "no paid services" rule was not ignored out of rudeness. By the time the paid suggestion appeared, the rule had fallen off the edge an hour earlier.</p>
<p>A few signs that your window is filling up:</p>
<ul>
<li>The model contradicts a decision you both made early in the chat.</li>
<li>Names, numbers, or rules you set at the start come back changed or missing.</li>
<li>The model asks a question you already answered near the beginning.</li>
<li>Long pasted documents stop being quoted accurately, especially their early pages.</li>
</ul>
<p>When you see those signs, the fix is boring and effective: restate the important facts. Put the paper back on the desk.</p>
<h2>A Bigger Window Is Not a Free Lunch</h2>
<p>If a small desk causes trouble, why not give every model a huge one? Windows have indeed grown fast — from a few thousand tokens to a million or more in some models. But a bigger window costs real things:</p>
<ul>
<li>Money and time: every token in the window is processed on every reply, so a long window means each answer is slower and more expensive to produce.</li>
<li>Attention dilution: the model spreads its attention across everything in view. The more text on the desk, the easier it is for one important line to be lost among a thousand unimportant ones.</li>
<li>The middle problem: research has shown that models use information at the very start and the very end of a long window well, and information buried in the middle much less reliably — even when it technically fits.</li>
</ul>
<p>So a million-token window is not a million-token memory you can trust blindly. It is a bigger desk with the same worker. The fact that a document fits inside the window means the model <em>can</em> see it, not that it <em>will</em> use it well. Knowing that difference will save you from the most common disappointment with long documents: "but I gave you the whole file." You did. It just could not keep all of it in sharp focus at once.</p>
<h2>Working With the Limit Instead of Against It</h2>
<p>Once you see the desk, a few practical habits follow naturally, and they are the same habits the professionals use when they build with these models:</p>
<ul>
<li>Keep the important facts near the end. Restate your goal, your rules, and your key numbers in your latest message instead of assuming the model still holds them from an hour ago.</li>
<li>Summarise as you go. In a long session, ask the model to write a short summary of decisions so far, then start a fresh chat with that summary at the top. You have replaced a falling pile of papers with one tidy page.</li>
<li>Feed documents in chunks. Rather than pasting an entire book, work through it section by section, discussing each part while it is fully in view.</li>
<li>Let a system fetch only what is needed. This is the idea behind RAG — instead of covering the desk with a whole library, software searches the library first and places only the few relevant pages on the desk for each question.</li>
</ul>
<p>None of this is a trick or a hack. It is just tidying the desk so the worker can see what matters.</p>
<p>The context window is the simplest idea in this whole field, and I keep coming back to it because it explains so much: the forgetting, the confidence, the strange strength at the start of a chat and the drift at the end of one. The model is not a mind with a memory. It is a very capable reader with a desk of a fixed size — and your job, as the person using it, is to decide what stays on that desk.</p>
<h2>Takeaways</h2>
<ul>
<li>A context window is all the text a model can see at once, measured in tokens, not words.</li>
<li>It holds the system prompt, the whole chat history, your new message, and room for the reply.</li>
<li>When it fills, the oldest text is dropped or summarised — that is why models "forget" mid-conversation.</li>
<li>Bigger windows cost more, answer slower, and spread attention thinner, especially in the middle.</li>
<li>Work with the limit: restate key facts, summarise long chats, chunk documents, and fetch only what is needed.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/2d9ecfb1-671a-448e-8dc1-5ceccfc9783b.png" alt="" style="display:block;margin:0 auto" />

<p><em>When the window fills, new text pushes in from the right and the oldest text leaves from the left.</em></p>
<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Context_window">Context window — Wikipedia</a></li>
<li><a href="https://docs.claude.com/en/docs/build-with-claude/context-windows">Context windows — Anthropic Claude documentation</a></li>
<li><a href="https://arxiv.org/abs/2307.03172">Lost in the Middle: How Language Models Use Long Contexts — Liu et al., arXiv:2307.03172</a></li>
<li><a href="https://arxiv.org/abs/2005.11401">Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks — Lewis et al., arXiv:2005.11401</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[5 Machine Learning Books You Should Read (And What Each One Actually Teaches You)]]></title><description><![CDATA[Five real books, five different jobs — one to start with, one to build with, and one to grow into]]></description><link>https://itsmeminsithu.hashnode.dev/5-machine-learning-books-you-should-read-and-what-each-one-actually-teaches-you</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/5-machine-learning-books-you-should-read-and-what-each-one-actually-teaches-you</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[books]]></category><category><![CDATA[AI]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 01:48:53 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, machine learning has too many books and too little time, so the question is never "which book is best" but "which book is best for the job I have right now." These five are the ones I would hand to a friend at five different moments — the first step, the first project, the first real model, the deep theory, and the classic reference.</p>
<p>Short version: start small, build something, then go deep — and let each book do the one job it is best at.</p>
<p>Here is a small scene from real life. When I was starting out, I bought the thickest machine learning book I could find, because thick felt serious. I opened it on page one, hit a wall of maths by page twelve, and the book became a very expensive paperweight for six months. The mistake was not the book. The mistake was reading the books in the wrong order. A book is a tool, and a tool used at the wrong moment is just a heavy object.</p>
<p>So here they are, in the order I wish someone had given them to me.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/3bb46656-d764-4a09-9fab-874c754e41c8.png" alt="" style="display:block;margin:0 auto" />

<h2>1. The Hundred-Page Machine Learning Book, by Andriy Burkov</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/8294cb5b-1e9f-4517-8e61-aed88e5b5474.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Andriy Burkov — via <a href="https://openlibrary.org/isbn/9781777005474">Open Library</a></em></p>
<p>Start here. This book does what its title promises: the whole field, in about a hundred pages, written for someone who already programs but has never touched machine learning. No thousand-page tour, no chapter that takes a week. You can read it in a weekend and walk away knowing what supervised and unsupervised learning actually mean, how a model is trained and tested, and which words people keep using at meetups.</p>
<p>What it actually teaches you: the map. You will not be an expert after this book, and it never pretends you will be. You will know what the territory looks like, which is exactly what you need before you pick a direction. It is also cheap, short, and honest about its limits — three qualities rare in technical books.</p>
<h2>2. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, by Aurélien Géron</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/b569190c-10f3-4da8-93a4-08817f6090f0.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © O'Reilly Media — via <a href="https://openlibrary.org/isbn/9781098125974">Open Library</a></em></p>
<p>This is the book for the moment you want to build something. Where the first book gave you the map, this one hands you the tools and says "let us build." Every chapter ends with a working model you can run yourself — a classifier, a regressor, a neural network — and the code is the star, not the theory. Géron explains just enough maths to make the code make sense, then gets out of the way.</p>
<p>What it actually teaches you: how to build. After this book you can take a real dataset, clean it, train a model, measure it honestly, and put it somewhere useful. For most working programmers, that skill is the whole job. This is the book I would hand to a friend who says "enough reading, I want to make one."</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/a719ce11-79c0-4dd5-81ff-b04692c9e057.png" alt="" style="display:block;margin:0 auto" />

<h2>3. Machine Learning Yearning, by Andrew Ng</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/7bf0051f-ebec-4df0-8165-69be860511f8.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Andrew Ng / DeepLearning.AI — via <a href="https://www.deeplearning.ai/resources">DeepLearning.AI</a></em>
This one is free, and it is the most practical book on the list. Andrew Ng wrote it after years of leading machine learning teams, and it is not about algorithms at all — it is about decisions. How do you know whether your model needs more data or a better model? When is your test set lying to you? How do you split your time between collecting data and tuning the model?</p>
<p>What it actually teaches you: judgment. Two models can have the same code and very different results, and the difference is usually a decision the programmer made along the way. This book is a list of those decisions, with the reasoning behind each one. Read it after you have built your first few models, when you have felt the confusion it describes. Before that, it will read like advice for a problem you have not had yet.</p>
<h2>4. Deep Learning, by Ian Goodfellow, Yoshua Bengio, and Aaron Courville</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/0b78dcfa-92f5-4a66-ba81-3850d1aa34d8.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © MIT Press — via <a href="https://openlibrary.org/isbn/9780262035613">Open Library</a></em></p>
<p>Now we go deep, in every sense. This is the textbook of deep learning, written by three of the people who built the field, and it is the book to read when you are ready to understand why neural networks work instead of just how to use them. It starts with the maths you need, builds up through the architectures, and ends with the research frontier.</p>
<p>What it actually teaches you: the theory underneath the tools. It is a hard book, and it should be read slowly, with a notebook, over months — not in a weekend. But if you want to move from using models to understanding them, and one day to inventing them, this is the road. The whole book is also free to read online, which is generous for a book this good.</p>
<h2>5. Pattern Recognition and Machine Learning, by Christopher M. Bishop</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/7894915e-8da4-4ba3-bffb-26b4c753769c.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Springer — via <a href="https://openlibrary.org/isbn/9780387310732">Open Library</a></em></p>
<p>The classic. Published in 2006, and still the reference that other books point to. Bishop writes with a patience that is rare in textbooks: every idea is introduced gently, built up carefully, and connected to the ideas around it. The maths is real, and it does not apologise — but it never shows off either.</p>
<p>What it actually teaches you: the foundations, properly. This is the book for the moment you want to understand machine learning as a subject, not a set of tricks. Keep it on your shelf, read it a chapter at a time, and come back to it whenever a new idea feels shaky. It is the kind of book that gets better the more you already know, which is the highest praise a textbook can earn.</p>
<h2>Read them in this order, and skip nothing by accident</h2>
<ul>
<li>The Hundred-Page Machine Learning Book — the map, read it first, in a weekend</li>
<li>Hands-On Machine Learning — the building, run the code, make something real</li>
<li>Machine Learning Yearning — the judgment, read it once your first models exist</li>
<li>Deep Learning — the theory, slow and steady, with a notebook</li>
<li>Pattern Recognition and Machine Learning — the foundation, keep it on the shelf for years</li>
</ul>
<p>One warning, from someone who learned it the hard way: do not read all five at once. Read one, build something with it, and only then reach for the next. Books do not make you a machine learning engineer. Books plus projects do.</p>
<p>Takeaways:</p>
<ul>
<li>Start with the short map book before touching the thick textbooks</li>
<li>The hands-on book is where you learn to actually build a working model</li>
<li>Andrew Ng's free book teaches judgment — the decisions behind the code</li>
<li>The deep learning textbook is for understanding why, read slowly over months</li>
<li>Bishop's classic is the long-term reference to keep on the shelf</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/d4ee185e-c90e-4b32-9721-63cacd4dbbcb.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://themlbook.com/">The Hundred-Page Machine Learning Book — official site</a></li>
<li><a href="https://www.mlyearning.org/">Machine Learning Yearning — mlyearning.org</a></li>
<li><a href="https://www.deeplearningbook.org/">Deep Learning — official site</a></li>
<li><a href="https://en.wikipedia.org/wiki/Machine_learning">Machine learning — Wikipedia</a></li>
<li><a href="https://link.springer.com/book/9780387310732">Pattern Recognition and Machine Learning — Springer</a></li>
<li>Book cover images: <a href="https://openlibrary.org">Open Library</a> and <a href="https://www.deeplearning.ai/resources">DeepLearning.AI</a> — credit lines under each cover</li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Framework vs Library: Who Is Actually in Charge of Your Code?]]></title><description><![CDATA[The difference is one question — are you calling the code, or is the code calling you?]]></description><link>https://itsmeminsithu.hashnode.dev/framework-vs-library-who-is-actually-in-charge-of-your-code</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/framework-vs-library-who-is-actually-in-charge-of-your-code</guid><category><![CDATA[frameworks]]></category><category><![CDATA[Libraries]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 01:40:41 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, the difference between a library and a framework is who is in charge. With a library, you are in charge: you call it when you need it, and it goes quiet again. With a framework, the framework is in charge: it runs the show, and it calls your code when it needs you.</p>
<p>Short version: a library is a tool you pick up; a framework is a boss that hires you for one job.</p>
<p>Here is a small scene from everyday life. Imagine you are cooking dinner at home. You reach into a drawer, take out a knife, chop an onion, and put the knife back. The knife never tells you what to cook. That is a library — a tool that waits to be used, does its one job well, and never asks questions about the meal.</p>
<p>Now imagine you walk into a restaurant kitchen as a new cook. The head chef has already decided the menu, the order of the dishes, and the pace of the night. Your job is to stand at one station and do your part when the chef calls for it. You still cook — but inside someone else's plan. That is a framework. It owns the flow of the evening, and you fill in the gaps it leaves for you.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/6e0ed615-a7cf-4b19-9498-37778989591e.png" alt="" style="display:block;margin:0 auto" />

<h2>Inversion of control, in plain words</h2>
<p>Programmers have a fancy name for this difference: inversion of control. It sounds complicated, but you just read the whole idea. In normal code, your program is the chef and the library is the knife — control flows from you outward. In a framework, control is inverted: the framework is the chef, and your code is the cook at one station. The framework decides when your code runs, in what order, and with what data.</p>
<p>This is why learning a framework feels different from learning a library. A library takes an afternoon: read the docs, call a function, done. A framework takes a week, because you are not learning a tool — you are learning someone else's way of building an app. Where do the files go? How does a web request travel from the browser to your code and back? What is the framework already doing for you, silently, before your code even runs? You have to learn its habits before you can work inside them.</p>
<p>Here is the smallest version of the difference, in code. First, a library — you call it:</p>
<pre><code class="language-python">import requests

response = requests.get("https://api.example.com/users")
print(response.json())
</code></pre>
<p>You wrote the plan. You decided when to call the library, what to ask for, and what to do with the answer. The library did one job and went home. Now a framework — it calls you:</p>
<pre><code class="language-python">@app.route("/users")
def list_users():
    return {"users": ["Aye", "Min", "Zaw"]}
</code></pre>
<p>You did not write a program that starts, fetches, and prints. You wrote one small function, handed it to the framework, and the framework decides when it runs — when a browser asks for that address. Your code is the cook at the station. The framework is the kitchen.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/ab582648-bfab-421a-9072-812b1daa55ce.png" alt="" style="display:block;margin:0 auto" />

<h2>The trade-off is real, and it cuts both ways</h2>
<table>
<thead>
<tr>
<th></th>
<th>Library</th>
<th>Framework</th>
</tr>
</thead>
<tbody><tr>
<td>Who is in charge?</td>
<td>You call it when you need it</td>
<td>It calls your code when it needs you</td>
</tr>
<tr>
<td>Learning curve</td>
<td>An afternoon</td>
<td>A week or more</td>
</tr>
<tr>
<td>Flexibility</td>
<td>High — use it anywhere</td>
<td>Lower — you work inside its rules</td>
</tr>
<tr>
<td>What you get</td>
<td>One tool, one job</td>
<td>A whole structure: routing, database, templates</td>
</tr>
<tr>
<td>Good for</td>
<td>Adding one ability to your code</td>
<td>Building a whole app quickly</td>
</tr>
</tbody></table>
<p>The verdict: neither is better — the right choice depends on whether you need one tool or a whole kitchen.</p>
<p>A framework buys you speed by making a thousand small decisions for you. That is wonderful when you are building a standard web app and you want the boring parts handled. It is painful when your app does not fit the framework's idea of how apps should work, and you spend days fighting its assumptions instead of writing your feature. A library never fights you, because it never assumes anything — but it also never helps you with the boring parts, because it was never hired for that.</p>
<p>The honest rule I use: start with libraries while you are learning, because they teach you how the pieces work. Reach for a framework when you are building something real and you want its structure, its safety nets, and its community — and accept that you are joining its kitchen, with its rules, on purpose.</p>
<h2>How to choose without regretting it</h2>
<p>A few practical questions make the choice easy. Am I building one feature or a whole application? One feature points to a library. A whole app points to a framework. Do I need to understand every piece, or do I want the boring parts handled? Understanding points to libraries; handled points to a framework. And the question people forget: how easy is it to leave? A library is easy to swap out — you stop calling it. A framework is a marriage. Leaving one means rewriting the app around a new kitchen, so choose one with a community that will still be there in five years.</p>
<h2>In real life, you will use both, every day</h2>
<p>Here is the part nobody tells beginners: the line between the two is not a wall, it is a sliding scale. React is famously a library — it only handles the user interface, and you stay in charge of the rest. Next.js is a framework built on top of React, and it takes charge of routing, rendering, and more. Django, the big Python web framework, is itself built out of libraries, and you can pull libraries into a Django project whenever you need a tool it does not provide.</p>
<p>So a working programmer's day is not "library day" or "framework day." It is a framework running the app, libraries doing the specialist jobs inside it, and your code filling the gaps the framework left for you. The question is never which one is better. The question is always: for this job, do I want a tool, or do I want a kitchen?</p>
<p>Takeaways:</p>
<ul>
<li>A library is a tool you call; a framework is a structure that calls your code — that is inversion of control</li>
<li>Libraries are quick to learn and flexible; frameworks take longer but handle the boring parts for you</li>
<li>Neither is better in general — the right one depends on what you are building</li>
<li>Start with libraries while learning, reach for a framework when you want its structure on a real app</li>
<li>Ask how easy it is to leave before you commit to a framework</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/c08e6489-001d-45b4-afa0-c949af0d96b1.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Software_framework">Software framework — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Library_(computing)">Library (computing) — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Inversion_of_control">Inversion of control — Wikipedia</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Recursion: The Function That Calls Itself (And Knows When to Stop)]]></title><description><![CDATA[The strangest idea in programming looks like a trick — until you see how much work it quietly does for you]]></description><link>https://itsmeminsithu.hashnode.dev/recursion-the-function-that-calls-itself-and-knows-when-to-stop</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/recursion-the-function-that-calls-itself-and-knows-when-to-stop</guid><category><![CDATA[Recursion]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 01:28:30 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, recursion is when a function solves a problem by calling itself on a smaller version of the same problem, until the problem is so small that the answer is obvious. It sounds like a riddle. It feels like cheating. And it is one of the most useful ideas in all of programming.</p>
<p>Short version: recursion is a function that says "this is almost the same problem, just smaller — let me ask myself."</p>
<p>Here is a small scene from everyday life. Stand between two mirrors and look at the reflection of the reflection of the reflection, shrinking into the distance. Each mirror shows the same scene, just smaller, and the chain only ends because the mirrors are not perfect — the light fades out. A recursive function is like those mirrors, except the programmer controls where the chain ends. That ending point is the whole secret, and forgetting it is the whole danger.</p>
<p>Or take a simpler scene. You are looking for a word in a dictionary. You open it in the middle. Your word is earlier in the alphabet, so you look at the left half. You open that half in the middle. Your word is later, so you look at the right half of that half. Each step is the same action — open in the middle, pick a half — applied to a smaller and smaller book, until the book is one page and there is your word. That is recursion in plain clothes: the same step, a smaller problem, a clear end.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/2ae433c1-e3bb-46f3-9f6c-cb4f9c74fd2e.png" alt="" style="display:block;margin:0 auto" />

<h2>Every recursive function has two parts</h2>
<p>If you take any recursive function apart, you will always find the same two pieces, and only two:</p>
<ul>
<li>The base case — the smallest version of the problem, where the answer is so obvious you just return it. No more calls. The mirrors stop here.</li>
<li>The recursive case — the step that makes the problem a little smaller and calls the function again on that smaller version.</li>
</ul>
<p>Miss the base case and you have a function that calls itself forever, like a mirror reflecting a mirror with no wall behind it. The program keeps piling up unfinished calls until the computer runs out of memory and crashes with a stack overflow — which is a technical way of saying "the mirrors ate the machine."</p>
<p>Here is the smallest version that works, counting down to zero:</p>
<pre><code class="language-python">def countdown(n):
    if n == 0:          # the base case: stop here
        print("Blast off!")
        return
    print(n)
    countdown(n - 1)    # the recursive case: a smaller problem
</code></pre>
<p>Run <code>countdown(3)</code> and you get 3, 2, 1, "Blast off!" The function prints 3, then asks itself to count down from 2, which prints 2 and asks for 1, which prints 1 and asks for 0 — and at 0 the base case answers instead of asking. Then each waiting call finishes in turn, like a stack of plates being lifted off one by one. That stack is real: the computer keeps a list of half-finished calls, and each one waits patiently for the one above it to return.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/5bcdaa5c-ea07-4642-b4da-e109f14b6113.png" alt="" style="display:block;margin:0 auto" />

<h2>Trust the smaller problem</h2>
<p>The hard part of recursion is not the code. The code is short. The hard part is believing it. When you write <code>countdown(n - 1)</code>, you have to trust that the call will do its job, without tracing every step in your head. Beginners try to follow the whole chain at once and get dizzy. Experienced programmers do something lazier and smarter: they check the base case, check that the problem really gets smaller each time, and then trust the rest.</p>
<p>That trust pays off on problems where the loop version is painful. Walking through a folder that contains folders that contain folders. Searching a family tree. Sorting by splitting a list in half again and again. These problems are naturally recursive — they are made of smaller copies of themselves — and the recursive code reads like a description of the problem, not a wrestling match with it.</p>
<p>A good test: if you can describe your problem as "do this, then solve the same problem on a smaller piece," recursion is probably the right tool. If the problem has no smaller piece — if it is just a list you need to walk through once — a plain loop is simpler, and simpler wins.</p>
<h2>The stack overflow, explained honestly</h2>
<p>Every recursive call waits. That waiting has a cost, and the cost has a name: the call stack. Each unfinished call sits on the stack, holding its place, until the calls above it finish. A thousand calls deep is usually fine. A million calls deep, and the stack runs out of room — the program crashes, and the error message says "stack overflow" or "maximum recursion depth exceeded."</p>
<p>This is not a reason to fear recursion. It is a reason to check two things before you write it: does the problem genuinely get smaller on every call, and is the base case reachable? If both answers are yes, the chain ends. If either answer is no, you have an infinite mirror, and no computer on earth can run it.</p>
<h2>A classic example: the factorial</h2>
<p>The textbook example is the factorial — the product of all the numbers from 1 up to n. The factorial of 5 is 5 × 4 × 3 × 2 × 1, which is 120. Watch how naturally it falls into the two parts:</p>
<pre><code class="language-python">def factorial(n):
    if n == 0:          # the base case: 0! is 1, by definition
        return 1
    return n * factorial(n - 1)   # 5! is 5 times 4!
</code></pre>
<p>This code says in plain words what the maths says: the factorial of n is n times the factorial of n minus one, until you reach zero. That is the whole definition, written as code, with nothing extra. When a problem's definition is already recursive, the recursive code is usually the clearest code you can write — it reads like the definition itself, because it is the definition itself.</p>
<p>Takeaways:</p>
<ul>
<li>Recursion is a function calling itself on a smaller version of the same problem</li>
<li>Every recursive function needs a base case — the smallest problem, answered directly — and a recursive case that shrinks the problem</li>
<li>Trust the smaller call instead of tracing the whole chain in your head</li>
<li>Recursion shines on problems made of smaller copies of themselves, like folders inside folders</li>
<li>If the problem never gets smaller, the calls pile up until the stack overflows</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/1e15fc61-f51a-40cf-851f-989b6e9cbf7d.png" alt="" style="display:block;margin:0 auto" />



<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Recursion_(computer_science)">Recursion (computer science) — Wikipedia</a></li>
<li><a href="https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion">Recursion — Khan Academy</a></li>
<li><a href="https://en.wikipedia.org/wiki/Stack_overflow">Stack overflow — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Factorial">Factorial — Wikipedia</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[How Websites Store Your Password Without Actually Storing It]]></title><description><![CDATA[The trick is simple and clever — they never keep your password, only a fingerprint of it that cannot be turned back]]></description><link>https://itsmeminsithu.hashnode.dev/how-websites-store-your-password-without-actually-storing-it</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/how-websites-store-your-password-without-actually-storing-it</guid><category><![CDATA[Security]]></category><category><![CDATA[passwords]]></category><category><![CDATA[Hashing]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 01:18:11 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, a good website never stores your password. It stores a scrambled fingerprint of your password — a long string of letters and numbers that was made from your password, but can never be turned back into it. When you log in, the site scrambles what you just typed the same way, and checks whether the two fingerprints match.</p>
<p>Short version: your password is never kept on the shelf — only its one-way fingerprint is.</p>
<p>Here is a small scene from everyday life. Imagine you run a small shop, and customers leave their house keys with you for safekeeping. Keeping the real keys in a drawer would be risky — anyone who breaks in gets every key. So instead you take each key, press it into a block of clay, and keep only the clay impression. When a customer comes back and hands you a key, you press it into clay again and compare the two impressions. If they match, it is the same key. And if a thief steals your box of clay impressions, they have shapes they cannot turn back into keys. That is, almost exactly, how password storage works.</p>
<p>The clay impression is called a hash. The key is your password. And the rule that makes the whole thing safe is one-wayness: easy to go from password to hash, practically impossible to go back from hash to password.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/867d2bd8-fcd0-41a4-9c29-c1b8a80f0c96.png" alt="" style="display:block;margin:0 auto" />

<h2>A hash is a fingerprint, not a copy</h2>
<p>A hash function takes any input — a word, a sentence, a whole book — and squeezes it into a fixed-length string of characters. The same input always produces the same hash. Change one letter and the hash changes completely, in a way that looks random. And the hash is always the same length, whether you hashed the word "cat" or the complete works of Shakespeare.</p>
<p>That last part is the clue to why it is one-way. A hash of 64 characters can only hold so much information, and it has already thrown most of the original away. Trying to recover a password from its hash is like trying to rebuild a cow from a hamburger. The information is gone. The only way back is guessing: try a password, hash it, and see if it matches. That is why attackers steal hashes and then run through lists of common passwords — "123456", "password", birthdays — hashing each one and hoping for a match.</p>
<p>Here is the smallest version that works, in Python:</p>
<pre><code class="language-python">import hashlib

password = "correct-horse-battery"
fingerprint = hashlib.sha256(password.encode()).hexdigest()
print(fingerprint)
# 8d2b6c4e9f1a7... a long string that says nothing about the password
</code></pre>
<p>This code takes the password, runs it through SHA-256, and prints the fingerprint. Notice what it does not do: it never saves the password itself. The fingerprint is all a website needs to check you later — hash what you type, compare the two fingerprints, and let you in only if they match.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/f888898f-fea0-437f-98cc-0edd20960519.png" alt="" style="display:block;margin:0 auto" />

<h2>The salt stops the copy-paste attack</h2>
<p>There is one problem with plain hashing, and it is embarrassingly simple. If two people both choose "sunshine123", they get the same hash. And attackers keep giant ready-made lists — rainbow tables — of common passwords and their hashes, so they can look up a stolen hash in seconds instead of guessing for weeks.</p>
<p>The fix is called a salt, and it is exactly what it sounds like: a pinch of something random added to every password before hashing. The site generates a long random string for you when you sign up, mixes it with your password, and hashes the mixture. It stores the salt next to the hash, in plain sight — the salt is not secret. But now "sunshine123" hashes differently for every single person, because every person has a different salt. The attacker's ready-made list becomes useless. They would have to start guessing from scratch, for every user, one by one.</p>
<p>So the honest answer to "how does the site store my password" is: it stores a salt and a fingerprint. Neither one is your password, and neither one, alone or together, can be turned back into it.</p>
<h2>Why slow is a feature, not a bug</h2>
<p>Here is the part that surprises people. The best password systems are deliberately slow. Functions like bcrypt and Argon2 are designed to take a noticeable fraction of a second — a delay you never feel when you log in once, but an attacker feels ten million times over when they try to guess ten million passwords. A hash that takes a tenth of a second to compute lets you log in happily and lets an attacker try only ten passwords a second. A fast hash would let them try billions.</p>
<p>That is the whole philosophy of password storage in one line: make checking one password cheap for the honest user, and checking a million passwords ruinously expensive for the thief.</p>
<h2>What this means for you, the person typing the password</h2>
<p>All of this machinery protects you, but it has one weak spot, and it is you. The strongest hash in the world cannot save a password you reuse on twenty sites, because one careless site leaking its database hands attackers the key to all the rest. Three habits cover almost everything:</p>
<ul>
<li>Use a different password for every important site, and let a password manager remember them — your brain was never meant to hold fifty passwords</li>
<li>Make passwords long rather than clever. Four random words beat one tricky word with a number on the end, and they are easier to remember</li>
<li>Turn on two-factor authentication wherever it is offered, so a stolen password alone is never enough to get in</li>
</ul>
<p>The site does its half of the job with hashes and salts. These three habits are your half, and together they are far stronger than either one alone.</p>
<p>Takeaways:</p>
<ul>
<li>Good sites never store your password — they store a one-way hash, a fingerprint that cannot be turned back</li>
<li>The same password always gives the same hash, but one changed letter changes the hash completely</li>
<li>A random salt is mixed in so identical passwords get different hashes, defeating ready-made lookup tables</li>
<li>Slow hash functions like bcrypt make guessing millions of passwords far too expensive for attackers</li>
<li>A stolen database of hashes is still a problem — but it is a problem, not a disaster</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/3fc9142a-3d3b-4697-bed6-766caf322625.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function">Cryptographic hash function — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Salt_(cryptography)">Salt (cryptography) — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Bcrypt">Bcrypt — Wikipedia</a></li>
<li><a href="https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html">OWASP Password Storage Cheat Sheet</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is an Algorithm, Really? The Recipe Behind Every Program]]></title><description><![CDATA[Every program you have ever used is just a recipe, written down clearly enough for a machine to follow]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-an-algorithm-really-the-recipe-behind-every-program</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-an-algorithm-really-the-recipe-behind-every-program</guid><category><![CDATA[algorithms]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Computer Science]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Sat, 07 Nov 2026 01:12:31 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, an algorithm is a recipe. Not a metaphor for a recipe — it is the same thing. A clear set of steps, in a clear order, that turns an input into an output. Cooking rice has an algorithm. Finding a name in a phone book has an algorithm. Every app on your phone is a stack of algorithms, one on top of another, each one doing its small job and passing the result along.</p>
<p>Short version: an algorithm is a recipe a computer can follow without asking questions.</p>
<p>Here is a small scene from real life. Last week a friend asked me for directions to my place, and I sent her a voice message: "Take the second left after the big market, go straight until you see the blue gate, then it is the third building." She got lost anyway. Why? Because "the big market" meant one thing to me and another thing to her, and "go straight" was true for three streets and then quietly false at the fourth. My directions were an algorithm with a bug in it — steps that sounded clear to the person who wrote them, but were not clear enough to the person following them.</p>
<p>That is exactly what programming is. You are writing directions for a follower who never guesses, never fills in the gaps, and never forgives a vague step. The computer will do precisely what you wrote, and nothing you meant. So the whole skill of algorithms is learning to write steps that cannot be misunderstood.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/c9b2734d-3e38-4719-8004-ec080c5670e2.png" alt="" style="display:block;margin:0 auto" />

<h2>A recipe is an algorithm you already know</h2>
<p>You already use algorithms every day, long before you touch a keyboard. Think about how you make instant noodles. You boil water. You add the noodles. You wait three minutes. You add the seasoning. You stir. You eat. Six steps, one order, one result. If you stir before you add the water, you have dry noodles and a mess. If you wait thirty minutes instead of three, you have soup with a memory of noodles in it.</p>
<p>That is the first thing to understand about algorithms: the order is the algorithm. The same steps in a different order are a different recipe, and often a broken one. When programmers argue about algorithms, they are usually arguing about order — which step should come first, which step can be skipped, and which step is quietly doing all the real work.</p>
<p>The second thing is that an algorithm has to end. A recipe that says "keep stirring forever" is not a recipe, it is a trap. Every good algorithm has a clear finish line: a point where it can say "done, here is your answer" and stop. Programmers call this termination, but the idea is just common sense. If your steps never stop, you never get dinner.</p>
<h2>Every algorithm has the same four parts</h2>
<p>Strip any algorithm down and you will find the same four pieces hiding inside it, whether it sorts a million numbers or finds the cheapest flight:</p>
<ul>
<li>An input — what you start with. The raw ingredients, the list of numbers, the text someone typed.</li>
<li>A set of steps — the actual work, each one small and exact enough that it cannot be misunderstood.</li>
<li>An output — what you get at the end. The sorted list, the answer, the finished dish.</li>
<li>A clear end — the moment it stops, so it never runs forever.</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/8c4e7588-feb7-426d-ac45-7bffe3a89885.png" alt="" style="display:block;margin:0 auto" />

<p>When something goes wrong with a program, one of these four is almost always the culprit. The input was not what you expected. A step was vague. The output was right for the wrong question. Or the program never stopped at all, and your laptop fan started sounding like a small jet. Learning to check these four, one by one, is most of debugging, honestly.</p>
<h2>The same problem can have many recipes</h2>
<p>Here is where it gets interesting. For most problems, there is not one algorithm — there are dozens, and they trade off against each other like different routes to the same place. One route is short but full of traffic. Another is long but smooth. A third is fast only when the roads are empty.</p>
<p>Sorting is the classic example. You have a list of numbers in a mess, and you want them in order. The simplest recipe is to walk along the list, compare each pair of neighbours, and swap any pair that is out of order, then walk the whole list again and again until nothing needs swapping. It works. A child could follow it. But for a million numbers, it is slow enough to make you old. A smarter recipe splits the list in half, sorts each half, and stitches them back together — more thinking up front, far less walking overall.</p>
<p>Here is the smallest version that works, the simple one, finding the biggest number in a list:</p>
<pre><code class="language-python">def find_biggest(numbers):
    biggest = numbers[0]
    for n in numbers:
        if n &gt; biggest:
            biggest = n
    return biggest
</code></pre>
<p>That is a whole algorithm in six lines. Start by assuming the first number is the biggest, then check every other number against it, and keep whichever wins. It is a recipe you could explain to a friend in one sentence, and the computer follows it exactly the same way.</p>
<p>Notice what the code does not do: it never asks you what "biggest" means, it never gets bored halfway through a long list, and it never skips the last number because it is tired. That is the whole point of writing it down this way. The computer is a tireless follower of recipes, and the algorithm is the recipe.</p>
<h2>Why programmers care so much about recipes</h2>
<p>You might wonder why programmers make such a fuss about something that sounds like common sense. The answer is scale. Your noodle recipe feeds one person, once. A search algorithm runs billions of times a day, on lists with billions of entries, and the difference between a clever recipe and a clumsy one is the difference between an answer in a blink and an answer next Tuesday.</p>
<p>That is why algorithms are the first serious subject in computer science, and why job interviews still ask about them after all these years. Not because anyone sorts numbers by hand at work, but because the way you think about a recipe — breaking a big problem into small exact steps, checking the order, proving it ends — is the way you think about every program you will ever write. Get good at recipes and the rest of programming gets easier, quietly, in the background.</p>
<p>Takeaways:</p>
<ul>
<li>An algorithm is a recipe: exact steps in an exact order, turning an input into an output</li>
<li>Order is the algorithm — the same steps in a different order are a different, often broken, recipe</li>
<li>Every algorithm needs an input, steps, an output, and a clear finish line</li>
<li>Most problems have many recipes, and the best one depends on how big the problem is</li>
<li>Thinking in recipes is the core skill of programming, not a side topic</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/b47916fc-c751-43d9-b749-7bcd54946949.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Algorithm">Algorithm — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Sorting_algorithm">Sorting algorithm — Wikipedia</a></li>
<li><a href="https://www.khanacademy.org/computing/computer-science/algorithms">Algorithms — Khan Academy</a></li>
<li><a href="https://www.geeksforgeeks.org/introduction-to-algorithms/">Introduction to algorithms — GeeksforGeeks</a></li>
</ul>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[How Businesses Predict: Forecasts, Churn, and What Customers Do Next]]></title><description><![CDATA[Part 5 of Data for Business — prediction as a business tool, what it can do, and where its limits honestly are]]></description><link>https://itsmeminsithu.hashnode.dev/how-businesses-predict-forecasts-churn-and-what-customers-do-next</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/how-businesses-predict-forecasts-churn-and-what-customers-do-next</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[business]]></category><category><![CDATA[prediction]]></category><category><![CDATA[analytics]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 19:05:06 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, business prediction is using what customers did yesterday to make a careful guess about what they will do tomorrow — how much you will sell next month, which customers are about to leave, what a shopper might want next. It is the same data and the same questions from the earlier parts of this series, just pointed at the future instead of the past.</p>
<p>Think of the owner of a small bakery, standing in the dark at five in the morning, deciding how many loaves to bake. Bake too many and the extras go stale on the shelf, money thrown away. Bake too few and she sells out by nine, turning away the very customers she wants to keep. So she thinks: Tuesdays are slow, rain brings people in for soup and bread, the school holidays change everything. She is forecasting. She has always been forecasting. Data just lets her do it with numbers instead of a feeling in her stomach.</p>
<p>Last time, in Part 4, we used SQL to pull honest numbers about what already happened — revenue, churn, conversion. Prediction starts exactly where those numbers stop.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/09f92fe1-1fb4-4e9a-8b57-15c0b7dbc19e.png" alt="" style="display:block;margin:0 auto" />

<h2>A forecast is the past, stretched carefully forward</h2>
<p>Every forecast, from the bakery's loaf count to a supermarket chain planning a million items, follows the same rough path:</p>
<ul>
<li>Gather the past — months or years of sales, visits, sign-ups, whatever you want to predict</li>
<li>Find the pattern — the weekly rhythm, the seasonal climb, the slow trend hiding under the noise</li>
<li>Build a model — a small piece of mathematics that captures that pattern in a form a computer can use</li>
<li>Make the forecast — feed in what you know about next week or next month and let the model extend the pattern</li>
<li>Check it against reality — when the real numbers arrive, compare, learn how wrong you were, and adjust</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/ab482eee-8a68-4a57-9010-a83771e60256.png" alt="" style="display:block;margin:0 auto" />

<p>That last step is the one people skip in their imagination. A forecast is not made once and framed. It is made, measured, corrected, and made again, and it earns trust only by being checked.</p>
<p>The honest way to think about it is the weather forecast. A good weather service does not say “it will rain tomorrow.” It says there is a 70 percent chance of rain — and you decide whether to carry the umbrella. Business prediction works the same way. The model reads the sky it can see, which is the past, and hands you a probability, not a prophecy. The decision, and the umbrella, are still yours.</p>
<h2>A churn warning is a smoke alarm, not a fortune teller</h2>
<p>The second big use of prediction is spotting customers who are about to leave — churn, which we met as a metric in Part 4. A model cannot see the future, but it can notice the smoke: a customer who used to buy every week now buys every month, someone who stopped opening the emails, a subscriber whose usage quietly halved. One sign means little. Together, they form a pattern that appeared before, in the records of customers who did leave.</p>
<p>So the model gives each customer a risk score, and the business gets a short list: these fifty people look like they are drifting away. Then humans do the human part — a friendly call, a fix for the problem the customer never reported, sometimes just an honest “we noticed, is everything okay?” Winning a customer back after they have gone is expensive. A smoke alarm is cheap. That is the whole business case: prediction does not stop the fire, it buys you time to act before there is one.</p>
<h2>Recommendations are predictions wearing a friendly face</h2>
<p>The third use is the one you meet every day. “People who bought this also bought...” is a prediction: given what is in your basket and what thousands of similar shoppers did, you will probably want this too. Streaming services predicting which film you will finish, shops predicting which size you will keep instead of return — same machinery, friendlier clothes. The model is not reading your mind. It is betting, politely and with decent odds, that you resemble people who behaved like you before.</p>
<h2>Risk is prediction doing guard duty</h2>
<p>There is a fourth use, quieter than the others: predicting what might go wrong. A bank predicting which loan applications are likely to stop being repaid. A shop's payment system flagging a purchase that does not look like its owner. An insurer estimating how risky a new driver is. It is the same pattern again — past cases, a model, a score — pointed at trouble instead of opportunity. Done well, it protects honest customers as much as the business: the flag is an invitation to check, not a verdict, and a good system treats it that way.</p>
<h2>A prediction is a probability, not a promise</h2>
<p>Now the honest part, because this is where the sales talk usually starts. Prediction has real limits, and a good business keeps all of them in sight:</p>
<ul>
<li>Habits change — last year's pattern can quietly expire when tastes, prices, or the neighbourhood change</li>
<li>Shocks arrive from outside the data — a road closes, a rival opens across the street, a sudden trend sends everyone somewhere new; no past record contains next month's surprise</li>
<li>Bad data in, bad guesses out — a model trained on messy or old records will predict a world that no longer exists, confidently</li>
<li>The forecast itself changes behaviour — stock up because the model said “busy”, and the day looks busy partly because you stocked up; the guess bends the reality it was guessing</li>
</ul>
<p>None of this makes prediction useless. It makes it a tool with a label on it. Use it to plan, to prepare, to notice early — not to relax. The bakery owner still walks to the window in the morning and looks at the actual sky. The model is her second opinion, never her replacement.</p>
<p>Takeaways:</p>
<ul>
<li>Prediction points the same business data at the future: sales forecasts, churn warnings, recommendations</li>
<li>Every forecast follows one path — past data, a pattern, a model, a guess, then an honest check against reality</li>
<li>A churn model is a smoke alarm: it buys time to act while saving the customer is still cheap</li>
<li>A prediction is a probability, not a promise — habits change, shocks happen, and bad data gives confident nonsense</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/9e735692-2ef8-4172-8845-b674e731008b.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Forecasting">Forecasting — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Predictive_modeling">Predictive modeling — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Customer_attrition">Customer attrition — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Recommender_system">Recommender system — Wikipedia</a></li>
</ul>
<p>That closes our Data for Business series: data is collected, charts make it visible, SQL asks it questions, and prediction points it at tomorrow — four simple ideas, and a whole field standing on them.</p>
<p>See you in the next post.</p>
<p>— Min SiThu
Software Engineer &amp; Tech Content Creator
<a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[SQL and Business Metrics: Asking a Database the Questions That Matter]]></title><description><![CDATA[Part 4 of Data for Business — revenue, churn, conversion, and the handful of queries behind every dashboard]]></description><link>https://itsmeminsithu.hashnode.dev/sql-and-business-metrics-asking-a-database-the-questions-that-matter</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/sql-and-business-metrics-asking-a-database-the-questions-that-matter</guid><category><![CDATA[SQL]]></category><category><![CDATA[business]]></category><category><![CDATA[analytics]]></category><category><![CDATA[database]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 18:59:58 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, a business metric is a number a company watches on purpose — revenue this month, customers lost this quarter, sales per visitor — and SQL is the language you use to ask a database for that number and get an exact answer back. Behind almost every dashboard you have ever seen sits a small pile of these questions, written in SQL, asked again and again.</p>
<p>Picture the owner of a small coffee shop at the end of the month. She wants to know three things: Did we earn more than last month? Which drink sells best? And are the regulars still coming? A few years ago she would have counted receipts by hand for an evening. Today her sales system stores every order, and each of her questions is one query away — if she asks it precisely.</p>
<p>Last time, in Part 3 of this series, we looked at why a good chart beats a wall of numbers. But a chart can only show what somebody first asked for, and asking is where SQL comes in.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/e90bdf8e-f68e-4a1e-bd26-c48f89b28503.png" alt="" style="display:block;margin:0 auto" />

<h2>A metric is a question somebody decided to keep asking</h2>
<p>A database on its own is just a very tidy store room. It holds orders, customers, payments, visits — millions of small facts, sitting quietly. None of those facts mean anything until somebody asks a question about them.</p>
<p>A metric is what you get when a business picks one question and agrees to keep asking it, the same way, every week or every month. “How much money came in?” asked once is curiosity. Asked every month, in exactly the same way, it becomes revenue trend — and a trend is something you can act on.</p>
<p>I think of the database as a shopkeeper with a perfect notebook. He remembers every sale ever made, down to the minute. But he only answers the question you actually ask, in the words you actually use. Ask “how did we do?” and he stares at you. Ask “what was the total of all orders in October?” and he gives you one clean number. SQL is simply the language that shopkeeper understands. The skill is not really the language. The skill is choosing good questions.</p>
<h2>Five numbers almost every business watches</h2>
<p>Strip away the fancy dashboards and most businesses, big or small, keep returning to the same handful of metrics:</p>
<ul>
<li>Revenue — the total money that came in over a period. Not profit, not cash in the bank, just the honest total of what customers paid.</li>
<li>Conversion rate — out of everyone who visited or looked, how many actually bought. A shop with 1,000 visitors and 40 buyers converts at 4 percent.</li>
<li>Average order value — the typical size of one purchase. Revenue divided by the number of orders. This is why shops suggest “one more small thing” at the counter.</li>
<li>Churn rate — the share of customers who quietly stopped buying or cancelled in a period. Losing customers is normal; not knowing how many is the problem.</li>
<li>Retention — churn's kinder twin: the share of customers who stayed. If churn is 5 percent, retention is 95 percent, and keeping a customer is usually cheaper than finding a new one.</li>
</ul>
<p>Notice that each one is a small, precise question with a number for an answer. That is exactly the shape of a SQL query.</p>
<h2>One question, one query</h2>
<p>Here is the good news: you do not need to learn all of SQL to ask business questions. A few patterns cover most of what dashboards do every day.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/042eac37-6484-43a8-aad4-d52a7a383c91.png" alt="" style="display:block;margin:0 auto" />

<p>Suppose the shopkeeper's notebook is a table called orders, with one row per purchase: the date, the customer, and the amount. The first question — how much did we earn each month? — becomes this:</p>
<pre><code class="language-sql">SELECT
  DATE_TRUNC('month', order_date) AS month,
  SUM(amount) AS total_revenue
FROM orders
GROUP BY DATE_TRUNC('month', order_date)
ORDER BY month;
</code></pre>
<p>Read it as a sentence: take the orders, group them by month, add up the amount in each group, and list the months in order. That is the whole trick. Twelve rows come back, and you are looking at a year of revenue.</p>
<p>The second question every owner asks is who their best customers are:</p>
<pre><code class="language-sql">SELECT
  customer_id,
  SUM(amount) AS total_spend
FROM orders
GROUP BY customer_id
ORDER BY total_spend DESC
LIMIT 10;
</code></pre>
<p>Same shape, different grouping: group by customer instead of by month, sort the biggest spenders first, and keep only the top ten. Those ten people are the ones a smart owner thanks personally.</p>
<h2>A dashboard is just saved questions with a friendly face</h2>
<p>When you open a business dashboard and see revenue climbing on a chart, churn glowing red, and conversion sitting in a green box, it is easy to imagine some large intelligence behind it. Mostly, it is this: somebody wrote a set of queries like the two above, saved them, and set them to run again every hour or every day. The chart is the answer, drawn. The number in the green box is a query that ran a minute ago.</p>
<p>That is why the quality of a dashboard is really the quality of its questions. If “revenue” quietly includes cancelled orders, the prettiest chart in the world is lying politely. The database always answers the question it was asked — so the real work is asking carefully, defining each metric once, and making sure everyone in the company means the same thing by the same word.</p>
<p>One habit is worth stealing from good analysts: before you trust a dashboard, answer one of its questions by hand, once. Count a single day's orders yourself, slowly, receipt by receipt, and compare your number with the one on the screen. If they match, you have earned some trust. If they do not, you have found the exact place where the definition and the data disagree — and finding that on a quiet Tuesday is much better than finding it in front of your boss at the end of the quarter.</p>
<p>Takeaways:</p>
<ul>
<li>A metric is a business question asked the same way, on purpose, again and again</li>
<li>Revenue, conversion rate, average order value, churn and retention cover most of what businesses watch</li>
<li>Most dashboard queries are one pattern: group the rows, add something up, sort the result</li>
<li>A dashboard is saved questions with a friendly face — it is only as honest as its definitions</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/fe6f1a44-0b63-462a-ace9-4b4a301da622.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/SQL">SQL — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Key_performance_indicator">Key performance indicator — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Churn_rate">Churn rate — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Dashboard_(business)">Dashboard (business) — Wikipedia</a></li>
</ul>
<p>Next time, in the final part of this series, we stop asking what already happened and try the harder trick: guessing what happens next.</p>
<p>See you in the next post.</p>
<p>— Min SiThu
Software Engineer &amp; Tech Content Creator
<a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Why Charts Matter: One Good Graph Beats a Hundred Rows of Numbers]]></title><description><![CDATA[Part 3 of Data for Business — how the right chart makes a pattern impossible to unsee, and the wrong one hides it]]></description><link>https://itsmeminsithu.hashnode.dev/why-charts-matter-one-good-graph-beats-a-hundred-rows-of-numbers</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/why-charts-matter-one-good-graph-beats-a-hundred-rows-of-numbers</guid><category><![CDATA[data visualization]]></category><category><![CDATA[business]]></category><category><![CDATA[analytics]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 18:54:38 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, a chart is a translation. It takes numbers written in the language of tables — row after row of figures, each one waiting its turn to be read — and restates them in the language your eyes were built for: length, height, and shape. The numbers do not change at all. What changes is how quickly a human being can see what they mean, and whether the pattern survives the trip from the page into somebody's head.</p>
<p>Picture a market stall owner at the end of a long month, looking at a notebook page of thirty daily totals and trying to spot which days were weak. The numbers are all there. The pattern is in there too, somewhere, hiding between the lines. Now picture the same thirty numbers drawn as thirty sticks of different heights standing on one line. The weak days step forward on their own. Nothing was added to the information. It just became visible — and visible, in a busy business, usually means acted on.</p>
<p>Last time, we walked through the four kinds of business analytics, from “what happened?” to “what should we do?” Every one of those four ends the same way: somebody has to look at the result and understand it, quickly, often in a meeting with ten other things competing for their attention. That last step — the understanding — is the chart's job.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/a0e5d25c-d993-4353-9202-b7d93c8d83ed.png" alt="" style="display:block;margin:0 auto" />

<p>A chart is to a table what a map is to a list of street names. The list can be complete, accurate, and still useless at a glance. The map shows you the shape of the whole city in one look, and nobody plans a journey by reading out coordinates. Businesses run on glanceable truth the same way journeys run on maps.</p>
<h2>Your brain compares heights faster than it compares numbers</h2>
<p>Reading a table is serial work. You hold one number in your head, hunt for the next one, compare, hold the result, hunt again. It is slow, it is tiring, and by row fifteen the earlier numbers have quietly left your memory.</p>
<p>Comparing lengths is different. Your eyes judge “taller” and “shorter” almost before you start thinking — it is one of the oldest things the visual system does. This is why the slow Tuesdays in our coffee shop story were a rumour while they lived in the notebook, and became a fact the moment they were drawn. The bar for Tuesday was visibly shorter. No arithmetic required. Arguments that survive in tables tend to die in charts, because a chart lets everyone in the room see the same thing at the same second.</p>
<h2>Each chart has one honest job</h2>
<p>Most chart trouble comes from asking a chart to do the wrong job. The three everyday charts each have one:</p>
<ul>
<li>Bar charts compare things. Sales by weekday, by branch, by product — separate items standing side by side, with the differences there to be seen. If your sentence starts with “which is bigger,” you want bars.</li>
<li>Line charts show change over time. A line climbing or sagging across twelve weeks tells a story about direction that no list of twelve numbers can match. If your sentence starts with “how is it moving,” you want a line.</li>
<li>Pie charts show parts of one whole. Where this month's money went, for example. Use them sparingly: past five or six slices, a pie becomes soup, and two slices of similar size are nearly impossible to compare by eye. When the exact slices matter, a simple bar chart quietly does the pie's job better.</li>
</ul>
<p>That is genuinely most of chart craft. Pick the chart whose job matches your sentence, and you are most of the way to a chart that tells the truth quickly.</p>
<p>One small test helps before you draw anything: say your point out loud, in one plain sentence, first. “Tuesdays are our weakest day” is a bar chart waiting to happen. “Sales have climbed since March” is a line. If you cannot say the sentence, no chart will rescue you — the problem is the question, not the drawing.</p>
<h2>The same numbers, twice</h2>
<p>Here are our coffee shop's average daily sales by weekday — the same exploration from Part 1 of this series, exactly as the till reported it:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/a0c5eaac-ccb5-4185-a65d-88372f82e75b.png" alt="" style="display:block;margin:0 auto" />

<table>
<thead>
<tr>
<th>Day</th>
<th>Average sales ($)</th>
</tr>
</thead>
<tbody><tr>
<td>Monday</td>
<td>412</td>
</tr>
<tr>
<td>Tuesday</td>
<td>286</td>
</tr>
<tr>
<td>Wednesday</td>
<td>398</td>
</tr>
<tr>
<td>Thursday</td>
<td>421</td>
</tr>
<tr>
<td>Friday</td>
<td>465</td>
</tr>
<tr>
<td>Saturday</td>
<td>540</td>
</tr>
<tr>
<td>Sunday</td>
<td>388</td>
</tr>
</tbody></table>
<p>Read that table honestly and feel what happens: your eyes slide, the numbers blur into each other, and if I asked you which day was weakest you would have to go hunting. Now draw seven bars, one per day, heights matching those figures. Saturday towers. Friday stands tall beside it. And Tuesday — Tuesday is visibly, stubbornly shorter than its neighbours, a gap your eye catches before your brain has finished reading the labels.</p>
<p>Everything this series has done since — the diagnosis, the Tuesday roster change, the afternoon deal — began at the moment that gap became impossible to unsee. The table contained the decision the whole time. Only the chart released it.</p>
<h2>A chart can lie without changing a single number</h2>
<p>One warning before the short version, because charts are persuasive and persuasion cuts both ways. Take those same seven bars and start the vertical axis at 250 instead of zero. Tuesday's bar now looks about a quarter of Saturday's height — a collapse, a crisis — although not one number has changed. The scissors did that, not the data. A few honest habits protect your readers, and your own decisions:</p>
<ul>
<li>Start bar charts at zero, always</li>
<li>Label the axes and the units — a number without a unit is a rumour</li>
<li>Keep the chart flat; fancy tilted effects make the nearer bars look bigger than they are</li>
<li>If a chart needs a paragraph of explanation, it is the wrong chart — redraw it simpler</li>
</ul>
<h2>The short version</h2>
<ul>
<li>Charts translate numbers into shapes, and shapes are what eyes compare fastest</li>
<li>Bar compares things, line shows change over time, pie shows parts of one whole — sparingly</li>
<li>If a pattern matters, draw it: patterns hide in tables and announce themselves in charts</li>
<li>Start bars at zero and label everything, because a chart can lie with completely true numbers</li>
<li>The best chart in business is the one a busy person understands in five seconds</li>
</ul>
<p>Next in this series: Part 4 — the handful of numbers a small business should actually watch every week, and how to keep them together on one page.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/d780ff96-5875-40d3-a5d8-c2b06fee2fb3.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Data_visualization">Data visualization — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Bar_chart">Bar chart — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Line_chart">Line chart — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Pie_chart">Pie chart — Wikipedia</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu
Software Engineer &amp; Tech Content Creator
<a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is Business Analytics? Deciding With Data Instead of Guesses]]></title><description><![CDATA[Part 2 of Data for Business — the four kinds of analytics, from "what happened?" to "what should we do?"]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-business-analytics-deciding-with-data-instead-of-guesses</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-business-analytics-deciding-with-data-instead-of-guesses</guid><category><![CDATA[business]]></category><category><![CDATA[analytics]]></category><category><![CDATA[Data Science]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[decision making]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 17:11:50 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, business analytics is the habit of answering business questions with evidence instead of opinions. Every company argues about the same handful of things — why sales fell, what customers really want, where the money leaks out. Analytics does not end the argument. It gives the argument better material: numbers that everybody in the room can look at, at the same time, instead of three confident stories competing on volume.</p>
<p>I sat in on a sales meeting once where the monthly figure was down eight percent, and the room split instantly. "It is the weather." "It is the new competitor on the corner." "It is the price rise, I warned you." Three stories, zero evidence, and the loudest voice nearly won the day. The fix was not a smarter person in that room. The fix was asking the questions in the right order — and that order is what this article is about.</p>
<p>Last time, we looked at data science: the loop that turns raw business numbers into decisions. Business analytics is the part of that loop a manager meets every single day — four kinds of questions, asked in a strict order, each one harder and more valuable than the one before it.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/fa1b47d9-62aa-40ce-ab1d-fbcb8cd9ed20.png" alt="" style="display:block;margin:0 auto" />

<p>I picture the four kinds as one car journey. Descriptive analytics is the rear-view mirror: it tells you where you have been. Diagnostic analytics is lifting the bonnet when the engine starts to rattle: it finds out why. Predictive analytics is the GPS estimating your arrival time from the road ahead. And prescriptive analytics is the GPS speaking up — "take the next left, it saves you ten minutes." Same journey, four different kinds of help.</p>
<h2>"What happened?" is where every honest answer starts</h2>
<p>The first kind is descriptive analytics, and it asks the plainest question in business: what happened? Our coffee shop owner from Part 1 prints her month: sales by day, by item, by hour. No explanations yet, no theories — just the facts, laid out clearly enough that two people reading them see the same month.</p>
<p>Most business reporting in the world is exactly this, and there is no shame in that. It is boring in the way foundations are boring. You cannot fix a month you have not measured, and you cannot argue with a number everybody watched being counted.</p>
<h2>"Why did it happen?" is where the money hides</h2>
<p>The second kind is diagnostic analytics: why did it happen? This is where you slice the plain facts until the difference explains itself. Our shop owner already knows Tuesdays are slow. Diagnosis asks: slow all day, or slow after three? Slow for everything, or slow for hot drinks? She compares rainy Tuesdays with dry ones and the dip survives — weather is innocent. She compares school holidays and paydays. The dip, it turns out, follows the office tower next door, which sends its staff home early every Tuesday.</p>
<p>That is diagnosis: not a fancier chart, just patient comparing — this group against that group, this week against that week — until one difference refuses to go away. In the sales meeting I described, the same slicing would have ended the argument in ten minutes: the fall was in one region and one product line, which happened to be exactly where the price rise had landed.</p>
<h2>"What will happen?" is a forecast, not a fortune</h2>
<p>The third kind is predictive analytics: what is likely to happen next? It takes the patterns found by the first two kinds and stretches them forward. If iced drinks climb every year as the weather warms, the shop can estimate next month's demand before ordering stock. If weekend peaks have held steady for a year, Saturday's roster can be planned instead of guessed.</p>
<p>Be honest about what a prediction is. It is an estimate with a direction, not a promise with a date. It will be wrong in detail — the question is whether it is useful in direction. A forecast that says "Tuesdays will stay quiet and Saturdays will grow" can be wrong about every single number and still save real money.</p>
<h2>"What should we do?" is the only step that pays</h2>
<p>The fourth kind is prescriptive analytics, and it is the only one that directly changes anything: given what happened, why it happened, and what is likely next — what should we do? It combines the forecast with the real constraints of the business: staff cost money, milk expires, the shop seats forty people and not one more.</p>
<p>For our shop, the prescription writes itself by now: one fewer staff member on Tuesday afternoons, a Tuesday deal timed for the office crowd before they leave early, and a smaller Monday milk order. Notice that the output is not a number. It is a recommended action — something a person can do on Monday morning.</p>
<h2>Most companies live on the first two steps, and that is fine</h2>
<p>Here is the honest map of the four kinds, with the shop running through all of them:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/1679ffc5-ebf2-4e4b-91db-7e9586b7aba3.png" alt="" style="display:block;margin:0 auto" />

<table>
<thead>
<tr>
<th>Kind</th>
<th>Question</th>
<th>Coffee shop example</th>
<th>Difficulty</th>
</tr>
</thead>
<tbody><tr>
<td>Descriptive</td>
<td>What happened?</td>
<td>Sales by day for last month</td>
<td>Easiest</td>
</tr>
<tr>
<td>Diagnostic</td>
<td>Why did it happen?</td>
<td>The Tuesday dip follows early office closings</td>
<td>Medium</td>
</tr>
<tr>
<td>Predictive</td>
<td>What will happen?</td>
<td>Next month's demand for iced drinks</td>
<td>Hard</td>
</tr>
<tr>
<td>Prescriptive</td>
<td>What should we do?</td>
<td>Fewer Tuesday staff, plus an afternoon deal</td>
<td>Hardest</td>
</tr>
</tbody></table>
<p>The jump from step two to step three is where the tools and the maths get serious, and plenty of businesses stall there. My honest view: most small companies get most of the available value from steps one and two done properly. A clear monthly report and one patient "why" per month will beat an expensive prediction tool fed with messy numbers, every single time. Start where you are. Climb when the lower steps feel easy.</p>
<h2>The short version</h2>
<ul>
<li>Business analytics asks four questions in order: what happened, why, what will happen, what should we do</li>
<li>Descriptive and diagnostic work is unglamorous — and it is where most of the value sits</li>
<li>A prediction is an estimate with a direction, not a promise</li>
<li>A prescriptive answer you cannot act on this month is trivia with better formatting</li>
<li>The order matters: never prescribe before you have diagnosed</li>
</ul>
<p>Next in this series: why charts matter — how one good graph can show in two seconds what a hundred rows of spreadsheet can hide for an hour.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/4c0a8821-212b-4585-b2b2-c7cf0d2bb6e8.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Business_analytics">Business analytics — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Data_analysis">Data analysis — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Predictive_analytics">Predictive analytics — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Prescriptive_analytics">Prescriptive analytics — Wikipedia</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is Data Science? Turning Business Numbers Into Decisions]]></title><description><![CDATA[Part 1 of Data for Business — the field that sits between statistics, code, and knowing how a business actually runs]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-data-science-turning-business-numbers-into-decisions</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-data-science-turning-business-numbers-into-decisions</guid><category><![CDATA[Data Science]]></category><category><![CDATA[business]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[analytics]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 17:06:48 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, data science is the practice of turning the numbers a business already collects — sales, clicks, deliveries, complaints — into decisions somebody can actually act on. It is not magic, and it is not just drawing charts. It is a loop: gather the numbers, clean them up, look for the pattern hiding inside, test that pattern honestly, and then decide something real — a price, a schedule, a menu, a roster.</p>
<p>A friend of mine runs a small coffee shop near a busy train station. For two years she wrote every day's takings in a paper notebook: the date, cups sold, a note about the weather, nothing more. One evening she spread three notebooks across the counter and asked me a question she could not answer from memory: "Why are my Tuesdays always slow?" She already had the data. What she did not have yet was a way to make it answer her back.</p>
<p>That gap — between having numbers and getting answers — is exactly where data science lives. I think of it as a doctor for a business. A doctor does not guess: she measures your temperature, runs a test, compares the result with what she knows, and only then prescribes something. A data scientist does the same thing with sales figures instead of blood pressure. Measure first, diagnose second, decide third.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/2da1b0d0-1fae-4429-a467-d240355d34b2.png" alt="" style="display:block;margin:0 auto" />

<h2>Three skills share one chair, and all three matter</h2>
<p>Data science is not one skill. It is three skills sitting in the same chair:</p>
<ul>
<li>Statistics — the honest counting: averages, ranges, and knowing how much trust a pattern deserves before you bet money on it</li>
<li>Code — the tool that lets you handle more numbers than a notebook can hold; a spreadsheet runs out of road, code does not</li>
<li>Business sense — knowing which questions are worth money, because a pattern nobody can act on is just trivia</li>
</ul>
<p>Remove any one of the three and the chair falls over. Statistics without business sense produces correct answers to questions nobody asked. Code without statistics produces wrong answers, delivered very fast. Business sense without data produces confidence without evidence — which is a polite word for guessing. The field exists because real decisions need all three at the same time.</p>
<h2>The work runs in a loop, not a straight line</h2>
<p>People imagine data science as a machine: data goes in one end, answers come out the other. In real life it is a loop of five steps, and you go around it many times.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/95fb9a89-07dc-47cb-8446-96d9a24669e3.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>Collect — where the numbers come from: the till, the app, the delivery log, the form customers fill in</li>
<li>Clean — the unglamorous bulk of the job: fixing typos, filling gaps, removing the same customer spelled three different ways</li>
<li>Explore — simple looking before clever looking: totals, averages, busiest hours. Most useful answers are hiding at this step</li>
<li>Model — when simple looking is not enough, build a small prediction: next month's demand, which regulars might quietly stop coming</li>
<li>Decide — a person changes something. Then the loop starts again, because the change creates fresh numbers to learn from</li>
</ul>
<p>Notice the order. Cleaning comes before exploring, and deciding comes last. Skipping the boring middle steps is how businesses end up with beautiful models built on broken numbers.</p>
<h2>The job title is the least important part</h2>
<p>One more thing worth saying plainly: in a big company, this loop is split across job titles — analysts, scientists, engineers — and the titles argue with each other at conferences. In a small business, the same person often runs the whole loop before lunch. That is fine. Data science is a way of working, not a department. If you collect honestly, clean patiently, and let the numbers change one real decision, you are doing it — whether your badge says owner, manager, or the person who also fixes the coffee machine. The expensive mistake is the opposite: buying tools and titles first, and hoping the habit arrives by itself. It does not. The habit is the whole job.</p>
<h2>One small question shows the whole loop at work</h2>
<p>Back to the coffee shop and its slow Tuesdays. Collecting was easy: the till could export a file with the date, the items, and the total for every sale. Cleaning took longer — two days were missing entirely (the shop had closed for a holiday, so we marked them instead of inventing numbers), and one regular appeared under three spellings of his name.</p>
<p>Exploring is where the answer showed up. Here is the whole exploration in a few lines of Python, using a popular library called pandas:</p>
<pre><code class="language-python">import pandas as pd

sales = pd.read_csv("sales.csv")
sales["date"] = pd.to_datetime(sales["date"])
sales["weekday"] = sales["date"].dt.day_name()
print(sales.groupby("weekday")["total"].mean())
</code></pre>
<p>It loads the file, reads the dates properly, works out which weekday each sale fell on, and prints one average per weekday — and there it was: Tuesday sat about thirty percent below every other day, in plain black and white.</p>
<p>The small model step was really just a check: was it the rain? We compared wet Tuesdays with dry Tuesdays and the dip survived both, so weather was innocent. The decision, in the end, was human and simple: one fewer staff member on Tuesdays, and a Tuesday-only pastry deal for the morning crowd. Six weeks later Tuesday was still her quietest day — but it was no longer a day that lost money.</p>
<h2>A model nobody acts on is just an expensive opinion</h2>
<p>That is the part I want you to keep. The deliverable of data science is not the model, and it is not the chart. It is a sentence a person can say on Monday morning: "So we will do this." The tools will keep changing — they change every year — but the loop does not: measure honestly, clean patiently, look before you leap to the clever stuff, and finish with a decision.</p>
<h2>The short version</h2>
<ul>
<li>Data science = statistics + code + business sense, aimed at a decision</li>
<li>The work is a loop: collect, clean, explore, model, decide — then go around again</li>
<li>Cleaning takes most of the time, and exploring finds most of the answers</li>
<li>You do not need big data to start — one honest, notebook-sized question is enough</li>
<li>If nothing changes after the analysis, the analysis was decoration</li>
</ul>
<p>Next in this series: business analytics — the four kinds of questions you can ask your data, from "what happened?" to "what should we do?"</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/209c359c-f717-4730-9ef6-bf6be94ab081.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Data_science">Data science — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Statistics">Statistics — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Business_intelligence">Business intelligence — Wikipedia</a></li>
<li><a href="https://pandas.pydata.org/docs/">pandas documentation</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Code Review: Why Good Programmers Let Other People Read Their Code]]></title><description><![CDATA[It is not about catching you out — it is how code gets safer, teams get smarter, and juniors grow fast]]></description><link>https://itsmeminsithu.hashnode.dev/code-review-why-good-programmers-let-other-people-read-their-code</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/code-review-why-good-programmers-let-other-people-read-their-code</guid><category><![CDATA[code review]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[software development]]></category><category><![CDATA[teamwork]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 15:34:16 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, a code review is what happens when another programmer reads your new code carefully before it joins the rest of the program. Not to grade you. Not to catch you out. Just to check the work with fresh eyes while fixing a mistake is still cheap.</p>
<p>Here is a small scene from my own week, more than once. I write an important email, read it over four or five times, and feel sure it is clean. Then a friend glances at it for ten seconds and says, "You wrote the wrong date." Ten seconds. The date was wrong from the first draft, and I had read straight past it every single time, because my eyes kept seeing the date I meant to write, not the one on the screen.</p>
<p>Code is exactly the same, only the stakes are higher. When you write code, you know what you intended, and that knowledge blinds you. You read your intention instead of your lines. A reviewer has no intention to be blinded by — they only have the lines. That is the whole trick, and it works because of a simple fact about people: your own eyes are the worst proofreaders you own.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/e64c576c-ee17-45d3-9998-c75fb8d7d257.png" alt="" style="display:block;margin:0 auto" />

<h2>A reviewer is not reading to judge you, they are reading to help the code</h2>
<p>Beginners often imagine a reviewer sitting there with a red pen, hunting for reasons to say no. In a healthy team it looks very different. The reviewer is asking a short list of honest questions about the change in front of them:</p>
<ul>
<li>Does this code actually do what the author says it does?</li>
<li>What happens with the strange inputs — empty, huge, missing, or just plain weird?</li>
<li>Can the next person read this and understand it without asking the author?</li>
<li>Are the names honest? Does a thing called total contain a total?</li>
<li>Is there a test that would catch this if it broke later?</li>
<li>Is any part more complicated than the problem deserves?</li>
</ul>
<p>Notice what is not on that list: "Is this how I would have written it?" Good reviewers learn to let that question go. There are ten good ways to write most code. The reviewer's job is to check that this way is correct, clear, and safe — not that it matches their personal taste.</p>
<h2>One review, from start to finish</h2>
<p>So how does it actually run, day to day? Simpler than most people expect:</p>
<ul>
<li>You finish a small piece of work and open a pull request — your change, presented to the team with a short explanation of what it does and why</li>
<li>A teammate reads the change in context, looking at the new lines beside the old ones, and asks questions or leaves comments where something is unclear or risky</li>
<li>You reply, adjust what needs adjusting, and push the improved version</li>
<li>When the reviewer is satisfied the change is safe and readable, they approve it, and the code joins the main program</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/634de3ac-b455-41c6-b10d-73e4a7475c48.png" alt="" style="display:block;margin:0 auto" />

<p>That is all. No ceremony, no exam hall. Most reviews in a working team are a handful of comments on a small change, done within the day. The habit looks almost too small to matter — until you remember it happens on every change, every week, for years. Small checks, repeated forever, are how big programs stay trustworthy.</p>
<h2>Comments are about the code, never about the coder</h2>
<p>This is the part nobody teaches and everybody needs. Reviews go wrong when people forget which side of the screen the comment belongs to.</p>
<p>If you are receiving comments, try to hold on to one thought: the reviewer is describing the code, not scoring you as a person. "This function does three things at once" is a sentence about a function. It is not a sentence about your worth. The fastest way to grow as a programmer is to treat every comment as free information — sometimes the comment is wrong, and you explain why, calmly, and that is fine too. Defending your code line by line as if it were your honour helps nobody, least of all you.</p>
<p>If you are giving comments, the same rule from the other side. Ask instead of ordering: "What happens here if the list is empty?" teaches more than "This is wrong." Point at the code, suggest a direction, and say plainly when something is a small taste matter rather than a real problem. And when the code is good, say that too. A review that only ever lists faults trains people to dread reviews.</p>
<h2>Small rules that make the whole thing painless</h2>
<p>Over time, good teams settle into a few habits that keep reviews quick and kind:</p>
<ul>
<li>Keep changes small. A reviewer can hold a hundred changed lines in their head. A thousand is not a review, it is a second job — and big changes hide big mistakes.</li>
<li>Explain the why in the description. What problem does this solve? The reviewer should not have to guess your reasons.</li>
<li>Review quickly. A teammate waiting a full day for your eyes is a teammate not working. Same day is polite; within the hour is kind.</li>
<li>Let machines handle the boring fights. Formatting and spacing can be checked by tools, so save human attention for questions of logic and clarity.</li>
<li>Separate real problems from small preferences, and label them honestly, so the author knows what must change and what is optional.</li>
</ul>
<p>None of these need talent. They are manners, and manners scale.</p>
<p>A team that reviews well ends up with more than safer code. Knowledge spreads — nobody is the only person who understands a corner of the system. Juniors absorb the habits of seniors just by reading their comments. And the code slowly becomes something the whole team owns, instead of a pile of private territories everyone is afraid to touch.</p>
<p>So let people read your code. Early, often, while the mistakes are still small and cheap. The wrong date in the email costs you an apology. The wrong line in the code can cost a whole weekend. Fresh eyes are the cheapest safety tool a programmer will ever have.</p>
<p>Takeaways:</p>
<ul>
<li>A review is fresh eyes on your code before it joins the program — cheap now, expensive later</li>
<li>Reviewers check correctness, edge cases, and clarity, not whether the code matches their taste</li>
<li>Comments describe the code, never the coder — receive them as information, give them as questions</li>
<li>Small changes, a clear why, and a fast reply keep reviews painless for everyone</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/ffa1c865-f6ca-4bb1-bde6-ec179ae6aee2.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Code_review">Code review — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Peer_review">Peer review — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Pull_request">Pull request — Wikipedia</a></li>
<li><a href="https://google.github.io/eng-practices/review/">Google's Code Review Developer Guide</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Is Overfitting? When a Model Memorizes Instead of Learning]]></title><description><![CDATA[The student who memorized the answers but learned nothing — and why machine learning models do the same thing]]></description><link>https://itsmeminsithu.hashnode.dev/what-is-overfitting-when-a-model-memorizes-instead-of-learning</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-is-overfitting-when-a-model-memorizes-instead-of-learning</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[AI]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[data]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 15:27:56 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, overfitting is when a machine learning model learns its practice examples a little too well. It does not just learn the lesson hiding inside the data. It memorizes the data itself — every quirk, every odd case, every bit of noise — and then, when new data arrives, it gets confused, because new data never repeats the old data word for word.</p>
<p>A few years ago I watched this happen with a real student, not a model. A younger cousin of mine had a maths exam coming. He got hold of the past papers and worked through them night after night until he could answer every single question perfectly. Full marks in practice, every time. Then the exam came. The questions covered the same topics, but the numbers were different and one question was asked from the other direction. He froze. He had not learned maths. He had learned the past papers.</p>
<p>That is overfitting, exactly. The model is my cousin. The past papers are the training data. The real exam is the new data the model meets once training is over. A model that overfits looks brilliant in practice and disappointing in the real world.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/10dcc17b-ef77-401f-917c-dd2168928adb.png" alt="" style="display:block;margin:0 auto" />

<h2>Memorizing answers is not the same as understanding</h2>
<p>Think about the two ways a person can prepare for a test.</p>
<p>One student memorizes. He reads the model answers until he can repeat them from memory. Ask him the same question in the same words and he is fast and accurate. Change one number, or ask the idea in a different order, and he has nothing to say, because nothing underneath the answers was ever built.</p>
<p>The other student is slower in practice. She gets some questions wrong while she is learning. But she works out why each answer is what it is, so when a new question shows up wearing different clothes, she can still find her way to it.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/6a480d4c-0105-41a4-a491-a84899da2d96.png" alt="" style="display:block;margin:0 auto" />

<p>A machine learning model can be either of these students. Given enough freedom, a model will take the easy road, much like a person would. If you let it grow complicated enough, it stops hunting for the real pattern in the data and starts memorizing the examples one by one. It can end up storing the training data almost the way a photo stores a scene — sharp on every detail it has seen, blind to everything it has not.</p>
<h2>Training data is the practice paper, not the exam</h2>
<p>This is the part beginners mix up most often, so let me say it slowly.</p>
<p>When we train a model, we show it examples with the answers attached: this photo contains a cat, this email is spam, this house sold for this price. The model adjusts itself until it can match those answers well. That collection of examples is the training data.</p>
<p>But the training data is not the point of the exercise. Nobody needs a model that can label photos it has already been shown the answers for. The model earns its keep on new data — photos, emails and houses it has never seen before. The whole job is to generalize: to take a pattern learned from old examples and apply it correctly to fresh ones.</p>
<p>Overfitting is what happens when the model spends its effort on the wrong target. Instead of learning the pattern, it learns the examples. The noise in the data — the accidents, the rare cases, the slightly wrong labels — gets treated as though it were part of the lesson. On the training data, the score keeps climbing. On new data, it falls off a chair. A model for spotting illness in scans, for instance, might quietly memorize the marks of one hospital's machines instead of the signs of the illness, and then stumble the first week it works anywhere else.</p>
<h2>A perfect training score should make you suspicious</h2>
<p>In school, a hundred percent is the dream. In machine learning, a training score that looks too perfect is often the first smell of trouble. Here are the signs I watch for:</p>
<ul>
<li>The model scores near perfectly on the training data but clearly worse on data it has never seen</li>
<li>The gap between those two scores keeps growing the longer training goes on</li>
<li>The model is very complicated — a huge number of little decisions — while the training data is small</li>
<li>A tiny change in the input, the kind the real pattern would shrug off, flips the answer completely</li>
</ul>
<p>No single sign proves overfitting on its own. Together, they tell a clear story: the model knows the practice paper by heart and has stopped learning the subject.</p>
<h2>The fixes are not clever, and that is the point</h2>
<p>The good news is that overfitting is one of the best understood problems in machine learning, and the standard fixes are plain, unglamorous things:</p>
<ul>
<li>Test on data the model never trained on. Keep a separate set of examples locked away during training and judge the model on those. It is the difference between marking your own homework and sitting a real exam.</li>
<li>Give it more practice papers. More training data makes memorizing harder and the real pattern easier to find, because noise stops repeating while the pattern keeps showing up.</li>
<li>Make the student simpler. A smaller, less complicated model cannot memorize as much, so it is forced to learn the broad pattern instead.</li>
<li>Stop training earlier. There is often a point where the model has learned the lesson and everything after that is pure memorization. Catching that point is a real skill.</li>
</ul>
<p>Notice what is missing from that list: cleverness. You do not fix overfitting with a smarter trick. You fix it by being honest about what the model has actually learned — and the honest test is always the same. Show it something new, and watch what happens.</p>
<p>So the next time a model brags with a perfect score, ask the only question that matters. Not "how well did you do on the examples you studied?" but "how well do you do on the ones you have never seen?" The first number is memory. The second number is learning.</p>
<p>Takeaways:</p>
<ul>
<li>Overfitting means memorizing the training data instead of learning the pattern inside it</li>
<li>Training data is practice — the model's real job starts on new, unseen data</li>
<li>A near-perfect training score beside a weak test score is the classic warning sign</li>
<li>More data, a simpler model, earlier stopping, and an honest test set are the standard fixes</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/20dd5a8d-b7c4-4e61-b596-df470e2dcf01.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Overfitting">Overfitting — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Training,_validation,_and_test_data_sets">Training, validation, and test data sets — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Generalization_error">Generalization error — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Machine_learning">Machine learning — Wikipedia</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[What Happens When You Type a Website Address and Press Enter?]]></title><description><![CDATA[DNS, servers, requests and rendering — the half-second journey your browser takes every single time]]></description><link>https://itsmeminsithu.hashnode.dev/what-happens-when-you-type-a-website-address-and-press-enter</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/what-happens-when-you-type-a-website-address-and-press-enter</guid><category><![CDATA[Web Development]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[internet]]></category><category><![CDATA[dns]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 15:23:10 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, your browser does not know where any website lives. When you type an address, like a news site or a shop, and press Enter, the browser first has to find out which computer in the world holds that site, then ask that computer for the page, then receive a bundle of files, and finally assemble those files into the page you see. Four jobs, usually finished in less than a second, every single time you open anything on the web.</p>
<p>This morning, on the train, I typed a news site's address into my phone half awake, and the page was simply there before the doors closed. I have done that thousands of times. It is only when you slow the moment down that you realise how much quiet work happened between my thumb pressing Enter and the headlines appearing.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/9d04be23-2e19-4073-9a05-cb264f5a20d4.png" alt="" style="display:block;margin:0 auto" />

<h2>First, the browser swaps the name you typed for a number it can use</h2>
<p>Computers on the internet are reached by numbers called IP addresses — something like 142.250.72.14. Names like the ones you type exist for humans, because nobody can remember numbers for every site they visit. So the first job is translation, and it is handled by the Domain Name System, DNS.</p>
<p>DNS works like the contacts book on your phone. You know a person's name, but to call them, something has to find the number saved against that name. Your browser asks a DNS server, "What number belongs to this name?" and gets the number back. To keep things fast, the answer is remembered for a while — by your browser, your operating system, and often your internet provider — so the lookup does not repeat for every visit. When a site "is down" for you but fine for a friend, a stale remembered answer is often the quiet reason.</p>
<h2>The whole journey, in one breath</h2>
<p>With the number found, everything else follows in a fixed order:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/812f0e2c-9763-45f4-90d6-1ebdd407e807.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li>Your browser connects to the computer at that number and sends a request: "Give me this page"</li>
<li>That computer — the server — finds or builds the page and sends back a response</li>
<li>The response arrives as separate files, not as a finished page</li>
<li>Your browser reads the files, asks for any missing pieces, and builds what you see</li>
</ul>
<p>Every section below is just one of those steps, slowed down.</p>
<h2>Then the browser knocks on the right computer's door</h2>
<p>The computer holding the site is called a server, which is a grand name for an ordinary machine with one special habit: it sits awake all day, waiting to be asked for things. This two-sided arrangement — your browser asks, the server answers — is the client–server model, and nearly everything on the web is built on it.</p>
<p>Your browser's request is a short, plain-text message. It says which page it wants (the path after the site's name, like /sports or /weather), what kind of browser it is, and sometimes proof of who you are, so the site can show your account instead of a stranger's. The server reads the request, gathers what was asked for — often pulling fresh numbers out of a database — and sends a response back with a small status line attached: 200 means "here it is", and 404 means "that page does not exist", a number you have surely met before.</p>
<h2>The answer that comes back is ingredients, not a finished page</h2>
<p>What the server sends first is usually an HTML file. HTML is the structure: the headings, the paragraphs, the links, the places where images will sit. On its own it looks plain and unfinished. Two more kinds of files give it a finished face:</p>
<ul>
<li>CSS files describe how everything should look — colours, sizes, spacing, layout</li>
<li>JavaScript files describe behaviour — what happens when you tap, scroll, search or type</li>
</ul>
<p>The HTML points to these files, so reading it often triggers a second round of requests: the styles, the scripts, the photos, the fonts. A single page you open may quietly cause fifty small deliveries before it looks complete. This is also why a page sometimes shows its words first and dresses itself a moment later — the structure arrived before the decoration.</p>
<h2>The little lock means the conversation is private</h2>
<p>Look at the small lock icon beside the address. It means the site uses HTTPS, and your conversation with the server is encrypted — scrambled in a way that only your browser and that server can unscramble. On the journey between you and the server, your request passes through many hands: your router, your provider, networks in other countries. With plain HTTP, any of those hands could read along, or even change the page before it reached you.</p>
<p>HTTPS also answers a second question: is this server really the site it claims to be? Before trusting it, your browser checks a certificate — a digital ID card issued by a trusted authority — and it warns you loudly if the card looks wrong. That warning is one of the few browser messages you should never click past.</p>
<h2>Finally, the browser builds the page on your screen</h2>
<p>Receiving the files is not the end. Your browser now does the assembly work, in an order that is roughly this:</p>
<ul>
<li>It reads the HTML and builds a map of the page's structure in memory</li>
<li>It applies the CSS, working out exactly where every box sits and what it looks like</li>
<li>It runs the JavaScript, which may move things, load more content, or watch for your taps</li>
<li>It paints the result onto your screen, pixel by pixel — and repaints whenever anything changes</li>
</ul>
<p>This building work happens on your device, using your battery and your processor, which is why the same heavy page feels instant on a new laptop and sluggish on an old phone. The server sent the same ingredients to both. The assembly is local.</p>
<h2>The short version</h2>
<ul>
<li>Your browser cannot visit a name — DNS first turns the name into a number, like a contacts book</li>
<li>A server is just a computer that waits to be asked; your browser asks, it answers</li>
<li>The answer arrives as ingredients: HTML for structure, CSS for looks, JavaScript for behaviour</li>
<li>The lock icon means HTTPS: the conversation is encrypted, and the server's identity is checked</li>
<li>The finished page is built on your own device — which is why old phones struggle with heavy pages</li>
<li>All of it, lookup to painting, normally takes less than a second</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/62e81ba4-2895-4c61-8be0-e0bb566688f0.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Client%E2%80%93server_model">Client–server model — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/HTTPS">HTTPS — Wikipedia</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview">An overview of HTTP — MDN Web Docs</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[Version Control, Explained Simply: A Time Machine for Your Code]]></title><description><![CDATA[What Git actually does, why every team uses it, and the handful of ideas underneath the commands]]></description><link>https://itsmeminsithu.hashnode.dev/version-control-explained-simply-a-time-machine-for-your-code</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/version-control-explained-simply-a-time-machine-for-your-code</guid><category><![CDATA[Git]]></category><category><![CDATA[version control]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[software development]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 15:17:30 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, version control is a memory for your project. It records every change you make to your files — what changed, who changed it, and when — and stores those changes as a history you can walk back through. Nothing is ever truly lost. If today's work is broken, yesterday's working version is still there, exactly as you left it, waiting for you.</p>
<p>You already know the problem it solves, even if you have never written code. Think of the folder before a school or office deadline: report.docx, report_final.docx, report_final2.docx, report_REALLY_final.docx, and one mysterious report_final_NEW.docx that nobody remembers creating. Five files, one document, and no honest way to say which changes are in which copy. Programmers lived exactly like that for years. Version control is what they built to escape it.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/1c823aa8-eb42-4c68-bfaa-01da848ac00b.png" alt="" style="display:block;margin:0 auto" />

<p>The easiest way to feel it is to think about save points in a video game. Before a hard fight, you save. If the fight goes badly, you do not restart the whole game — you reload the save and try a different approach. The disaster is gone, and so is nothing else. A commit in version control is exactly that save point, and the whole of Git is built from this one idea, repeated and shared.</p>
<h2>A commit is a save point, and the note on it matters</h2>
<p>When you commit, you are telling the system: remember everything exactly as it is right now. Git stores a snapshot of your files, your name, the time, and a short message you write — something like "Add login form" or "Fix total on receipt". That message looks like a small thing. Six months later, when you are staring at a strange line of code at midnight, it is the only explanation you will get, so good messages are a kindness to your future self.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/3f9c9147-8099-4571-8610-1498e9837a2a.png" alt="" style="display:block;margin:0 auto" />

<p>Two habits make commits useful instead of decorative. First, commit often — small saves, one clear job each, rather than one giant save at the end of the week. Small commits are easy to understand and easy to undo. Second, commit when something works, even something small. A save point you made while the code was healthy is worth ten you made in a panic.</p>
<h2>A branch lets you try the dangerous idea safely</h2>
<p>Sooner or later you will want to try something risky: a new design, a big cleanup, an experiment that might fail. Doing it on your only copy is how working software gets broken. A branch solves this by giving you a parallel line of save points. Your main line — usually called main — keeps the version that works. The branch is where the experiment lives, free to break without hurting anyone.</p>
<p>If the experiment succeeds, you bring it back. If it fails, you delete the branch and nothing happened. This one idea changes how people work: trying things becomes cheap, so people try more things, and the software gets better faster.</p>
<h2>Merging is where two lines of work become one again</h2>
<p>Bringing a branch back into main is called merging. When the two lines touched different files, or different parts of the same file, Git combines them quietly and you barely notice. When both lines changed the same lines in different ways, Git stops and asks you to choose. That pause is called a merge conflict, and beginners fear it far more than it deserves. It is not an error. It is Git honestly saying: "Two people wanted different things here — a human should decide."</p>
<p>The fix is calm work: open the file, look at both versions, keep the right combination, and commit the result. The first conflict feels like a wall. The fifth one feels like paperwork.</p>
<h2>With a real history, undoing a mistake stops being scary</h2>
<p>Without version control, a mistake in code is a small disaster: you changed twelve files yesterday, something is broken today, and you cannot remember half of what you touched. With a history, the questions become simple. What changed between the working version and now? Show me just that difference. Take this one file back to how it was on Tuesday. Undo this one commit and nothing else.</p>
<p>You can even ask Git to hunt for the exact commit that introduced a bug, testing old save points one by one until the guilty change stands alone. None of this is magic. It is just what happens when every state of your work is kept, labelled, and reachable.</p>
<h2>Teams need it because shared folders do not scale</h2>
<p>Everything above matters for one person. For a team, it is the difference between working and colliding. Imagine five people editing the same file through a shared folder, or emailing copies of a zip file named final_v2_REAL.zip around: two people fix the same bug in different ways, one person overwrites another person's afternoon, and nobody can prove which copy is current. With Git, everyone works on their own full copy of the project — history included — commits their save points, and shares them through a common place such as GitHub. Changes arrive as commits with names and reasons attached, not as anonymous files.</p>
<p>It was not always Git. Older tools like Apache Subversion kept one central copy that everyone checked work in and out of. Git, created by Linus Torvalds in 2005 to manage the Linux kernel, made every copy complete, so you can work offline on a train and still have the whole history with you. That freedom is a big reason the whole industry settled on it.</p>
<h2>You only need a handful of commands to start</h2>
<p>Git has many commands, but daily life uses very few:</p>
<ul>
<li>git init or git clone — start a project, or copy an existing one</li>
<li>git add and git commit — choose changes, then save the point with a message</li>
<li>git status and git log — ask "where am I?" and "what happened here?"</li>
<li>git branch and git switch — make a side line and move onto it</li>
<li>git merge — bring a finished branch back</li>
<li>git push and git pull — send your save points to the shared place, and receive everyone else's</li>
</ul>
<p>Learn those, and you understand the shape of the whole tool. The rest is detail you can look up when you need it.</p>
<h2>The short version</h2>
<ul>
<li>Version control is a memory for your project: every change, recorded and reachable</li>
<li>A commit is a save point — small, often, and with an honest message</li>
<li>Branches make experiments cheap, because the working version stays untouched</li>
<li>A merge conflict is a question, not a failure</li>
<li>History turns "who broke this and when?" from an argument into a lookup</li>
<li>Git won because every copy is complete — the whole history travels with you</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/c6e5a956-a8f2-46ed-80c3-6fd0edc9054f.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Version_control">Version control — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Git">Git — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Apache_Subversion">Apache Subversion — Wikipedia</a></li>
<li><a href="https://git-scm.com/book/en/v2">Pro Git — the official Git book, free to read online</a></li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item><item><title><![CDATA[5 Programming Books You Should Read (And What Each One Actually Teaches You)]]></title><description><![CDATA[Five real books, five different jobs — thinking, craft, building, design, and going deep]]></description><link>https://itsmeminsithu.hashnode.dev/5-programming-books-you-should-read-and-what-each-one-actually-teaches-you</link><guid isPermaLink="true">https://itsmeminsithu.hashnode.dev/5-programming-books-you-should-read-and-what-each-one-actually-teaches-you</guid><category><![CDATA[books]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[Min SiThu]]></dc:creator><pubDate>Fri, 06 Nov 2026 15:11:18 GMT</pubDate><content:encoded><![CDATA[<p>To put it simply, programming books are not all trying to do the same job. One teaches you how to think about your work, one teaches you to write code other people can read, one is a thick manual for building software properly, one gives you names for designs you keep reinventing alone, and one rebuilds how you understand programs at the deepest level. Most beginners do not pick the wrong book — they expect one book to do all five jobs at once.</p>
<p>A friend of mine stood in a bookshop last month with a programming book in each hand, looking at them the way you look at two phones when you can only afford one. He sent me a photo and a single question: "Which one first?" It is a better question than it sounds: with these five, the order matters almost as much as the books themselves.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/13f63459-b3df-40c2-b4e7-0769d511419d.png" alt="" style="display:block;margin:0 auto" />

<p>Here is how I think about the shelf. A good set of programming books is like a small team of coaches, each hired for one job. You would not ask a swimming coach to fix your diet. Do not ask a design book to teach you daily habits, or a habits book to teach you deep theory. Below is what each book actually teaches, who it is for, and how hard it honestly is.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/dde05269-1b4d-47fc-bc06-d03f61f79798.png" alt="" style="display:block;margin:0 auto" />

<h2>The Pragmatic Programmer teaches you how to think like a professional</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/480353d3-9c5f-4b05-a690-09bf35634561.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Addison-Wesley — via <a href="https://openlibrary.org/isbn/9780135957059">Open Library</a></em></p>
<p>David Thomas and Andrew Hunt wrote this as a set of short, practical tips from real work; the 20th Anniversary Edition (2019) refreshed it for modern tools. Almost none of it is tied to one language. It talks about taking responsibility for your work, keeping knowledge in plain text, not repeating yourself, building small "tracer bullet" versions to learn early, and making code easy to change later.</p>
<p>Who it is for: everyone, but especially people in their first few years of programming. Honest difficulty: the easiest book on this list. The sections are short, the tone is friendly, and you can read it in any order. If you only buy one book this year, this is the safest one to pick.</p>
<h2>Clean Code teaches you that code is read far more often than it is written</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/c70f9aba-57a8-4d29-97f2-9b75e1d18954.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Prentice Hall — via <a href="https://openlibrary.org/isbn/9780132350884">Open Library</a></em></p>
<p>Robert C. Martin's argument is simple: you write a line of code once, but people read it ten times — during reviews, during bug hunts, during the feature change six months later. So it is about meaningful names, small functions that do one thing, honest formatting, and treating comments as a last resort rather than decoration. The examples are in Java, but the lessons travel to almost any language.</p>
<p>Who it is for: anyone writing code that other people (including future you) must maintain. Honest difficulty: easy to read, harder to live by. Some of its rules are debated — not everyone agrees functions should be quite that small — so read it as strong advice to think with, not as law.</p>
<h2>Code Complete teaches you that building software is a craft with checklists</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/008a9787-b4ee-4d61-92de-8bd59dec79ed.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Microsoft Press — via <a href="https://openlibrary.org/isbn/9780735619678">Open Library</a></em></p>
<p>Steve McConnell's book is the heavy one, literally: the second edition runs to around 900 pages. It covers the "construction" part of programming — designing routines, naming variables, handling loops and conditions, defensive programming, debugging, and refactoring. It is full of small, researched, practical rules.</p>
<p>Who it is for: people building real projects who want a reference beside the keyboard. Honest difficulty: long and dense. Almost nobody reads it cover to cover in one go, and you are not supposed to. Read a chapter when you meet the problem it solves, and it will earn its shelf space for years.</p>
<h2>Design Patterns teaches you the names for shapes you keep rebuilding</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/66c13a47-b234-4b2d-98fe-eb31aca89cc0.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © Addison-Wesley — via <a href="https://openlibrary.org/isbn/9780201633610">Open Library</a></em></p>
<p>Written by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides — the "Gang of Four" — this 1994 book describes 23 reusable solutions to design problems that show up again and again. Patterns like Observer, Factory and Strategy each get a name, a shape, and a discussion of trade-offs.</p>
<p>The real gift is vocabulary. Once a team shares these names, "let us use an Observer here" replaces a ten-minute whiteboard sketch. Who it is for: programmers with some object-oriented experience who have started to feel their designs getting tangled. Honest difficulty: dry, and written in an older style with C++ and Smalltalk examples. Read it too early and it does harm — beginners tend to force patterns everywhere. Read it after messy design has hurt you once, and it reads like answers.</p>
<h2>Structure and Interpretation of Computer Programs teaches you what a program really is</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/b938d69f-2a0b-4fd6-ac04-18aa3830d802.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Cover © MIT Press — via <a href="https://openlibrary.org/isbn/9780262510875">Open Library</a></em></p>
<p>This is the famous MIT textbook by Harold Abelson and Gerald Jay Sussman, and it is the deep end of this list. Working in Scheme, a small teaching language, it builds up ideas about abstraction and recursion step by step — and near the end, you build an interpreter, a program that runs other programs. Many readers say that is the moment programming finally "clicked" for them.</p>
<p>Who it is for: patient readers who want understanding, not a quick job skill. Honest difficulty: the hardest book here, with mathematical exercises that demand pen and paper. The good news is that it is free to read online, legally, so the only cost is your time and stubbornness. Go slowly, do the exercises, and do not go alone if you can find a study partner.</p>
<h2>Read them in this order, not the order I listed them</h2>
<p>If I hand these to a beginner friend, the order is deliberate:</p>
<ul>
<li>The Pragmatic Programmer first, because habits and attitude help with every language you will touch</li>
<li>Clean Code second, while your own messy code is still fresh enough to recognise in its examples</li>
<li>Code Complete alongside your real work, one chapter at a time, as a reference rather than a novel</li>
<li>Design Patterns after you have written object-oriented code long enough to feel the problems it names</li>
<li>SICP last and slowest, when you are curious about what sits underneath everything else</li>
</ul>
<p>The pattern to notice: thinking first, daily craft second, depth last. Each book makes the next one easier to understand.</p>
<h2>The short version</h2>
<ul>
<li>Every book on this list has exactly one job — pick the book that matches the problem you have right now</li>
<li>Habits beat theory at the start, which is why The Pragmatic Programmer goes first</li>
<li>Clean Code and Code Complete are about the code you write every day, not about cleverness</li>
<li>Design Patterns is a vocabulary book, and vocabulary only helps once you have something to say</li>
<li>SICP is the deep end: slow, hard, free to read online, and worth it when you are ready</li>
<li>Order beats selection — the right book at the wrong time still feels like the wrong book</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6a12efab551486ce6cffb0f8/6360b6bf-fc7b-462a-a56a-dc77efbc466f.png" alt="" style="display:block;margin:0 auto" />

<h2>References and further reading</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/The_Pragmatic_Programmer">The Pragmatic Programmer — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Clean_Code">Clean Code — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Code_Complete">Code Complete — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Design_Patterns">Design Patterns — Wikipedia</a></li>
<li><a href="https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs">Structure and Interpretation of Computer Programs — Wikipedia</a></li>
<li>Book cover images: <a href="https://openlibrary.org">Open Library</a> — credit lines under each cover</li>
</ul>
<p>See you in the next post.</p>
<p>— Min SiThu Software Engineer &amp; Tech Content Creator <a href="https://minsithu.org">https://minsithu.org</a></p>
]]></content:encoded></item></channel></rss>