<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[The 60-Second Programmer - Medium]]></title>
        <description><![CDATA[Quick, actionable programming tips and insights delivered in just 60 seconds. Perfect for developers who want to learn on the go. Whether you’re a beginner or seasoned pro, our bite-sized lessons fit your schedule and boost your coding skills fast! - Medium]]></description>
        <link>https://medium.com/the-60-second-programmer?source=rss----bfb12ca1d1bb---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>The 60-Second Programmer - Medium</title>
            <link>https://medium.com/the-60-second-programmer?source=rss----bfb12ca1d1bb---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 11 Nov 2026 03:57:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/the-60-second-programmer" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[TCP vs UDP ]]></title>
            <link>https://medium.com/the-60-second-programmer/tcp-vs-udp-0aa306dab435?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/0aa306dab435</guid>
            <category><![CDATA[protocol]]></category>
            <category><![CDATA[transport-layer]]></category>
            <category><![CDATA[udp]]></category>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-11-09T09:31:01.406Z</atom:updated>
            <content:encoded><![CDATA[<h4>Reliable delivery versus raw speed, in one minute.</h4><p>Both move data over IP, but they make opposite trade-offs. Pick based on whether you’d rather lose a packet or wait for it.</p><h3>TCP — reliable &amp; ordered</h3><p>Connection-based: a handshake (SYN, SYN-ACK, ACK) sets things up first. Guarantees delivery and order; lost packets are retransmitted. Flow &amp; congestion control built in. Cost: more overhead and latency. Used by HTTP, SSH, SMTP, database connections.</p><h3>UDP — fast &amp; fire-and-forget</h3><p>Connectionless: just send datagrams, no handshake. No retransmission, no ordering, no congestion control. Tiny header, minimal latency. Used by DNS, video/voice calls, gaming, QUIC/HTTP3.</p><pre>TCP:  A --SYN--&gt;  B<br>      A &lt;-SYN/ACK- B   (then ordered, acked data)<br>      A --ACK--&gt;  B</pre><pre>UDP:  A --datagram--&gt; B   (no reply expected)</pre><p>A quick way to see TCP setup in action:</p><pre>curl -v https://example.com   # watch &quot;Connected to&quot; before any data</pre><p><strong>TL;DR:</strong> TCP trades speed for reliability; UDP trades reliability for speed.</p><p>Next time you design an API or stream, ask: can I tolerate a dropped packet?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0aa306dab435" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/tcp-vs-udp-0aa306dab435">TCP vs UDP 📦</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Props and Emits ]]></title>
            <link>https://medium.com/the-60-second-programmer/props-and-emits-f8d8a73b02f8?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8d8a73b02f8</guid>
            <category><![CDATA[components]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[composition-api]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 09:26:01 GMT</pubDate>
            <atom:updated>2026-11-06T09:26:01.697Z</atom:updated>
            <content:encoded><![CDATA[<h4>How Vue components pass data down and send events up.</h4><p>Vue’s data flow is one-way: parents pass <strong>props</strong> down, children send <strong>emits</strong> up. Props are read-only inside the child.</p><h3>Defining props</h3><p>Use defineProps — no import needed in &lt;script setup&gt;.</p><pre>&lt;script setup&gt;<br>const props = defineProps({<br>  title: { type: String, required: true },<br>  count: { type: Number, default: 0 }<br>})<br>&lt;/script&gt;</pre><pre>&lt;template&gt;<br>  &lt;h2&gt;{{ props.title }} ({{ count }})&lt;/h2&gt;<br>&lt;/template&gt;</pre><h3>Emitting events</h3><p>Declare events with defineEmits, then call the emitter. The parent listens with @event.</p><pre>&lt;script setup&gt;<br>const emit = defineEmits([&#39;increment&#39;])</pre><pre>function add() {<br>  emit(&#39;increment&#39;, 1) // send a payload up<br>}<br>&lt;/script&gt;</pre><pre>&lt;template&gt;<br>  &lt;button @click=&quot;add&quot;&gt;+&lt;/button&gt;<br>&lt;/template&gt;</pre><p>The parent wires it together:</p><pre>&lt;Counter :title=&quot;&#39;Score&#39;&quot; @increment=&quot;score += $event&quot; /&gt;</pre><h3>Why one-way?</h3><p>Never mutate a prop directly. If a child needs to change a value, it emits an event and lets the parent own the update. This keeps state predictable and easy to trace.</p><p><strong>TL;DR:</strong> Props flow data down (read-only); emits send events up so the parent can update state.</p><p>Build a tiny counter component and pass its value entirely through props and emits — no shared state needed!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8d8a73b02f8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/props-and-emits-f8d8a73b02f8">Props and Emits 📨</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Hash Maps Work ️]]></title>
            <link>https://medium.com/the-60-second-programmer/how-hash-maps-work-%EF%B8%8F-17e9eabfd9bc?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/17e9eabfd9bc</guid>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[dictionary]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 09:26:01 GMT</pubDate>
            <atom:updated>2026-11-04T09:26:01.718Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why a dictionary can find a key in roughly one step.</h4><p>A hash map (dict, hash table) stores key-value pairs and finds any key in roughly <strong>O(1)</strong> time. The trick is turning the key into an array index.</p><h3>The core idea</h3><p>1. A <strong>hash function</strong> converts your key into a number.<br>2. That number maps to a <strong>bucket</strong> (an index in an internal array).<br>3. The value gets stored in that bucket — so lookup goes straight there.</p><pre>def bucket_index(key, size):<br>    return hash(key) % size   # turn key into an array index</pre><pre># Conceptually:<br>buckets = [[] for _ in range(8)]<br>def put(key, value):<br>    buckets[bucket_index(key, 8)].append((key, value))</pre><h3>Collisions</h3><p>Two keys can land in the same bucket. Maps handle this by <strong>chaining</strong> (storing a small list per bucket) or <strong>open addressing</strong> (probing for the next free slot). With a good hash function, collisions stay rare and lookups stay fast.</p><h3>When it slows down</h3><p>If too many keys crowd into too few buckets, lookups degrade toward <strong>O(n)</strong>. Real implementations <strong>resize</strong> (rehash into a bigger array) once they get too full, keeping operations near constant time on average.</p><p><strong>TL;DR:</strong> A hash map turns keys into array indices via a hash function, giving average O(1) lookup — collisions and resizing are the details that keep it honest.</p><p>Reach for a dict whenever you find yourself scanning a list to find one item.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17e9eabfd9bc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/how-hash-maps-work-%EF%B8%8F-17e9eabfd9bc">How Hash Maps Work 🗺️</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Union & Literal Types ]]></title>
            <link>https://medium.com/the-60-second-programmer/union-literal-types-9a8e590d4dcb?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/9a8e590d4dcb</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[type]]></category>
            <category><![CDATA[unions]]></category>
            <category><![CDATA[type-safety]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 09:21:01 GMT</pubDate>
            <atom:updated>2026-11-02T09:21:01.751Z</atom:updated>
            <content:encoded><![CDATA[<h4>Model ‘one of these exact values’ precisely.</h4><p>A union (|) says a value is <em>one of several</em> types. A literal type narrows it to <em>one exact value</em>. Together they&#39;re TypeScript&#39;s superpower.</p><h3>Literal types</h3><p>Instead of string, accept only specific strings:</p><pre>type Direction = &quot;up&quot; | &quot;down&quot; | &quot;left&quot; | &quot;right&quot;;</pre><pre>function move(d: Direction) { /* ... */ }</pre><pre>move(&quot;up&quot;);   // ok<br>move(&quot;north&quot;); // error: not a Direction</pre><h3>Narrowing</h3><p>TypeScript narrows the type as you check it:</p><pre>type Status = &quot;loading&quot; | &quot;success&quot; | &quot;error&quot;;</pre><pre>function render(s: Status) {<br>  if (s === &quot;error&quot;) {<br>    // s is &quot;error&quot; here<br>    return &quot;Something broke&quot;;<br>  }<br>  return s; // s is &quot;loading&quot; | &quot;success&quot;<br>}</pre><p>Combine with switch for exhaustive handling — every case covered, compiler-verified.</p><p><strong>TL;DR:</strong> Unions + literals replace loose string/number with a precise set of allowed values.</p><p>Swap a stringly-typed parameter for a literal union and watch the bugs vanish.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a8e590d4dcb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/union-literal-types-9a8e590d4dcb">Union &amp; Literal Types 🔀</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Goroutines Explained ]]></title>
            <link>https://medium.com/the-60-second-programmer/goroutines-explained-5ee853a93ea3?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/5ee853a93ea3</guid>
            <category><![CDATA[goroutines]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 09:16:01 GMT</pubDate>
            <atom:updated>2026-10-30T09:16:01.574Z</atom:updated>
            <content:encoded><![CDATA[<h4>Concurrency that costs almost nothing to start.</h4><p>Want to run something concurrently in Go? Put go in front of it. Done.</p><h3>What is a goroutine?</h3><p>A goroutine is a lightweight thread managed by the Go runtime. They start with a tiny stack (a few KB) and grow as needed, so you can spawn thousands without breaking a sweat. The scheduler multiplexes them onto OS threads for you.</p><h3>Starting one</h3><pre>package main</pre><pre>import (<br>	&quot;fmt&quot;<br>	&quot;sync&quot;<br>)</pre><pre>func main() {<br>	var wg sync.WaitGroup<br>	for i := 0; i</pre><h3>Watch out</h3><p>main returning kills every goroutine, so coordinate with sync.WaitGroup or a channel. Goroutines run independently. Use channels or mutexes to share data safely. Capture loop variables explicitly (pass i as an argument) unless you&#39;re on Go 1.22+.</p><p><strong>TL;DR:</strong> go f() launches concurrent work; use WaitGroup or channels to wait for it.</p><p>Try spawning 1,000 goroutines and watch how fast they finish. 🐹</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ee853a93ea3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/goroutines-explained-5ee853a93ea3">Goroutines Explained 🚀</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMs Explained ]]></title>
            <link>https://medium.com/the-60-second-programmer/llms-explained-13a6d2493fec?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/13a6d2493fec</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[fundamentals]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Wed, 28 Oct 2026 09:06:01 GMT</pubDate>
            <atom:updated>2026-10-28T09:06:01.493Z</atom:updated>
            <content:encoded><![CDATA[<h4>What a large language model actually does, in plain terms.</h4><p>An <strong>LLM</strong> (Large Language Model) is a neural network trained on huge amounts of text to predict the next token. That’s it. Everything else — answering questions, writing code, summarizing — emerges from doing that one thing extremely well.</p><h3>How it works</h3><p>Your text is split into <strong>tokens</strong> (roughly word-fragments). The model assigns a probability to every possible next token, picks one, appends it, and repeats. A paragraph is just the model running that prediction step hundreds of times.</p><pre>&quot;The capital of France is&quot; → [Paris: 0.92] [Lyon: 0.01] ... → &quot;Paris&quot;</pre><h3>What it is NOT</h3><p>Not a database — it doesn’t “look up” facts; it predicts plausible text, so it can be wrong (a “hallucination”). Not deterministic by default — sampling makes outputs vary between runs. Not stateful — each request is independent. You resend the full conversation every time.</p><h3>Calling one</h3><pre>import anthropic</pre><pre>client = anthropic.Anthropic()<br>resp = client.messages.create(<br>    model=&quot;claude-opus-4-8&quot;,<br>    max_tokens=1024,<br>    messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Explain an LLM in one sentence.&quot;}],<br>)<br>print(resp.content[0].text)</pre><p><strong>TL;DR:</strong> An LLM is a next-token predictor trained at scale — powerful, but it generates plausible text, not verified truth.</p><p>Try one against a real prompt before you trust it for anything that matters. →</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13a6d2493fec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/llms-explained-13a6d2493fec">LLMs Explained 🧠</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[em vs rem Explained ]]></title>
            <link>https://medium.com/the-60-second-programmer/em-vs-rem-explained-8234797a5193?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/8234797a5193</guid>
            <category><![CDATA[remote-work]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[me]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 03:41:01 GMT</pubDate>
            <atom:updated>2026-10-26T03:41:01.516Z</atom:updated>
            <content:encoded><![CDATA[<h4>Two relative units — one inherits, one stays fixed to the root.</h4><p>Both are relative font-size units, but they measure against different things — and that difference matters.</p><h3>em → relative to the parent</h3><p>1em equals the <strong>parent element&#39;s</strong> font size. So em values compound as you nest.</p><pre>.parent { font-size: 20px; }<br>.child  { font-size: 1.5em; } /* 30px */<br>.grandchild { font-size: 1.5em; } /* 45px — compounds! */</pre><p>That cascading can surprise you when components nest deeply.</p><h3>rem → relative to the root</h3><p>1rem always equals the <strong>root</strong> (&lt;html&gt;) font size, no matter how deep you are. No compounding.</p><pre>html { font-size: 16px; }<br>.title { font-size: 2rem;  } /* always 32px */<br>.body  { font-size: 1rem;  } /* always 16px */</pre><h3>When to use which</h3><p>rem for font sizes and most layout — predictable and accessibility-friendly (it respects the user&#39;s browser font setting). em for spacing that <em>should</em> scale with its own text, like button padding:</p><pre>.btn {<br>  font-size: 1.25rem;<br>  padding: 0.5em 1em; /* scales with the button&#39;s text */<br>}</pre><p><strong>TL;DR:</strong> Use rem for consistent, accessible sizing; reach for em when you want a value to scale with its local font size.</p><p>Set padding in em on a button, then bump its font-size — the padding scales right along with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8234797a5193" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/em-vs-rem-explained-8234797a5193">em vs rem Explained 📏</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling NULL in SQL ️]]></title>
            <link>https://medium.com/the-60-second-programmer/handling-null-in-sql-%EF%B8%8F-b789e231be28?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/b789e231be28</guid>
            <category><![CDATA[coalesce]]></category>
            <category><![CDATA[database-administration]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-quality]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Fri, 23 Oct 2026 02:36:01 GMT</pubDate>
            <atom:updated>2026-10-23T02:36:01.600Z</atom:updated>
            <content:encoded><![CDATA[<h4>NULL isn’t zero, and it isn’t empty — it’s unknown.</h4><p>NULL means “unknown,” not zero or empty string. Treat it like a value and your filters quietly drop rows.</p><h3>NULL breaks equality</h3><p>Comparisons with NULL return <em>unknown</em>, never true:</p><pre>-- These NEVER match, even when the column is NULL:<br>WHERE status = NULL      -- wrong<br>WHERE status != &#39;active&#39; -- silently skips NULL rows!</pre><pre>-- Use IS NULL / IS NOT NULL instead:<br>WHERE status IS NULL<br>WHERE status IS NOT NULL;</pre><p>Because status != &#39;active&#39; is <em>unknown</em> for NULL rows, they get excluded. Add OR status IS NULL if you want them.</p><h3>COALESCE picks the first non-NULL</h3><p>Supply a fallback so NULLs don’t poison your output or math:</p><pre>SELECT<br>  name,<br>  COALESCE(nickname, name)        AS display_name,<br>  COALESCE(discount, 0) * price   AS amount_off<br>FROM users;</pre><p>COALESCE(discount, 0) turns a NULL discount into 0, so the multiplication stays a number instead of becoming NULL.</p><h3>Gotchas</h3><p>NULL + 5 is NULL. Any arithmetic with NULL is NULL. COUNT(col) skips NULLs; COUNT(*) counts every row. NULL = NULL is <em>unknown</em>. Use IS NOT DISTINCT FROM to treat two NULLs as equal.</p><p><strong>TL;DR:</strong> Use IS NULL / IS NOT NULL to test for NULL, and COALESCE to supply a default.</p><p>👉 Scan your WHERE clauses for != — they’re probably hiding NULL rows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b789e231be28" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/handling-null-in-sql-%EF%B8%8F-b789e231be28">Handling NULL in SQL 🕳️</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hashing vs Encryption ]]></title>
            <link>https://medium.com/the-60-second-programmer/hashing-vs-encryption-4c32080c2c82?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/4c32080c2c82</guid>
            <category><![CDATA[passwords]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 02:26:01 GMT</pubDate>
            <atom:updated>2026-10-21T02:26:01.582Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why passwords get hashed, not encrypted.</h4><p>They sound similar but solve opposite problems. <strong>Encryption is reversible. Hashing is not.</strong> That one difference decides which to use.</p><h3>Encryption — two-way</h3><p>Encryption scrambles data with a key so it can be <strong>decrypted</strong> back with that key. Use it when you genuinely need the original value later: credit card numbers, private messages, data at rest.</p><h3>Hashing — one-way</h3><p>A hash turns input into a fixed-length fingerprint that <strong>can’t be reversed</strong> back to the original. Same input always gives the same hash. Use it to <em>verify</em> a value without storing the value itself.</p><h3>Why passwords get hashed</h3><p>You never need to know a user’s actual password — only whether the one they typed matches. So you store a hash. If your database leaks, attackers get fingerprints, not passwords.</p><p>Use a slow, salted password hash like <strong>bcrypt</strong> or <strong>argon2</strong> (not fast hashes like MD5 or SHA-256). The salt makes every hash unique, and the slowness makes brute-forcing impractical.</p><pre>import bcrypt</pre><pre># On signup — store this hash, never the password<br>hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt())</pre><pre># On login — compare, don&#39;t decrypt<br>ok = bcrypt.checkpw(attempt.encode(), hashed)</pre><p>bcrypt builds the salt in and verifies by re-hashing the attempt — there&#39;s no &quot;decrypt&quot; step, by design.</p><p><strong>TL;DR:</strong> Encrypt data you need to read back. Hash data you only need to verify — and hash passwords with bcrypt or argon2.</p><p>Open your auth code: if a password is encrypted (or worse, plaintext), switch it to a salted bcrypt/argon2 hash.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c32080c2c82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/hashing-vs-encryption-4c32080c2c82">Hashing vs Encryption 🔐</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Props vs State ⚛️]]></title>
            <link>https://medium.com/the-60-second-programmer/props-vs-state-%EF%B8%8F-e8a0f436f595?source=rss----bfb12ca1d1bb---4</link>
            <guid isPermaLink="false">https://medium.com/p/e8a0f436f595</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[united-states]]></category>
            <dc:creator><![CDATA[Marcelo Domingues]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 02:16:01 GMT</pubDate>
            <atom:updated>2026-10-19T02:16:01.661Z</atom:updated>
            <content:encoded><![CDATA[<h4>Two ways data flows — one you own, one you receive.</h4><p>Both hold data a component renders. The difference is <em>who controls it</em>.</p><h3>Props: passed in, read-only</h3><p>A parent passes props down. The child reads them but never reassigns them.</p><pre>function Greeting({ name }) {<br>  return &lt;h1&gt;Hello, {name}!&lt;/h1&gt;;<br>}</pre><pre>&lt;Greeting name=&quot;Ada&quot; /&gt;;</pre><h3>State: owned, changeable</h3><p>State lives inside a component and changes over time via its setter.</p><pre>function Toggle() {<br>  const [on, setOn] = useState(false);<br>  return &lt;button onClick={() =&gt; setOn((o) =&gt; !o)}&gt;{on ? &quot;ON&quot; : &quot;OFF&quot;}&lt;/button&gt;;<br>}</pre><h3>The mental model</h3><p><strong>Props</strong> flow <em>down</em> from parent to child. Immutable to the receiver.<br><strong>State</strong> is <em>local</em> and mutable through its setter.<br>Need to share state? Lift it to the closest common parent and pass it down as props.</p><p><strong>TL;DR:</strong> Props come from above and are read-only; state is owned locally and changes over time.</p><p>Look at a component you wrote — is that data really state, or could it just be a prop? 🤔</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8a0f436f595" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-60-second-programmer/props-vs-state-%EF%B8%8F-e8a0f436f595">Props vs State ⚛️</a> was originally published in <a href="https://medium.com/the-60-second-programmer">The 60-Second Programmer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>