<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: VALENTINE ACHIENG</title>
    <description>The latest articles on DEV Community by VALENTINE ACHIENG (@vallentinah).</description>
    <link>https://dev.to/vallentinah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3288150%2F6c1cfc3d-3837-47da-821d-cbc582f1450f.png</url>
      <title>DEV Community: VALENTINE ACHIENG</title>
      <link>https://dev.to/vallentinah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vallentinah"/>
    <language>en</language>
    <item>
      <title>What I Learned from the Lisk Summer Bootcamp day one: A Beginner’s Guide to Blockchain Concepts</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Thu, 17 Jul 2025 07:18:06 +0000</pubDate>
      <link>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-4hl7</link>
      <guid>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-4hl7</guid>
      <description>&lt;p&gt;What Is Blockchain?&lt;br&gt;
Blockchain is a special kind of digital database or ledger. But unlike a normal database (like Excel or Google Sheets), it has three unique characteristics:&lt;/p&gt;

&lt;p&gt;It's decentralized (not controlled by one person or company),&lt;/p&gt;

&lt;p&gt;It's secure and tamper-proof, and&lt;/p&gt;

&lt;p&gt;It's built with blocks of data that are chained together in order.&lt;/p&gt;

&lt;p&gt;🗳️ 1. Understanding Consensus Mechanisms&lt;br&gt;
Consensus mechanisms are how blockchain networks agree on what's true — without a central authority like a bank or government.&lt;/p&gt;

&lt;p&gt;🔍 How I Understood It:&lt;br&gt;
Think of it like a group chat of friends trying to decide where to meet. Everyone has a say, but you need a fair system so people don’t vote twice or lie. Blockchain has to reach agreement (consensus) every time someone adds a new transaction.&lt;/p&gt;

&lt;p&gt;💡 Common Consensus Types:&lt;br&gt;
Proof of Work (PoW): Like solving a complex puzzle. Whoever solves it first gets to add the next block. It's secure but slow and uses a lot of energy.&lt;br&gt;
Proof of Stake (PoS): Like picking validators based on how many tokens they’ve locked (or “staked”) as a sign of trust.&lt;br&gt;
Delegated Proof of Stake (DPoS) (used by Lisk): Instead of everyone trying to validate, token holders vote for a small group of “delegates” to validate blocks on behalf of the network.&lt;br&gt;
🧠 For me, DPoS felt like classroom group work — instead of everyone shouting answers, the class elects a few trusted students to speak and represent everyone fairly.&lt;/p&gt;

&lt;p&gt;💻 2. Nodes and Clients&lt;br&gt;
A node is a computer that runs the blockchain software and helps maintain the network.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Nodes:&lt;br&gt;
I thought of nodes like editors in a shared Google Doc — they check every update to the document and make sure it follows the rules. Some editors have full access to the whole history, while others only see current versions.&lt;/p&gt;

&lt;p&gt;🔧 Types of Nodes:&lt;br&gt;
Type    Explanation&lt;br&gt;
Full Node   Stores the entire blockchain and validates all transactions. Like having the whole document history.&lt;br&gt;
Archive Node    Keeps every past state — even data that's not needed anymore, in case you want detailed analysis. Like having a time machine for the document.&lt;br&gt;
Each node uses software called a client. In Lisk, the client is powered by the Lisk SDK, which developers can use to build, run, and customize their own blockchains.&lt;/p&gt;

&lt;p&gt;🏛️ 3. DAOs — Decentralized Autonomous Organizations&lt;br&gt;
A DAO is like a company that runs on code instead of managers.&lt;/p&gt;

&lt;p&gt;🧠 How I Understood It:&lt;br&gt;
Imagine a club where every rule, decision, and vote is written into a smart contract. Members don’t rely on a president or CEO — everything is voted on, and the results are automatic.&lt;/p&gt;

&lt;p&gt;In DAOs:&lt;/p&gt;

&lt;p&gt;Proposals are made by members&lt;br&gt;
Votes happen on-chain&lt;br&gt;
Rules are enforced automatically by smart contracts&lt;br&gt;
🎯 I pictured a DAO like a community-run vending machine — everyone votes on what snacks to restock, and the vending machine updates itself based on those votes, no human needed.&lt;/p&gt;

&lt;p&gt;🔓 4. Public vs Private Blockchains&lt;br&gt;
At first, I was confused about why we even have private blockchains if the whole point is decentralization. Here’s what I learned:&lt;/p&gt;

&lt;p&gt;🌍 Public Blockchains:&lt;br&gt;
Anyone can join, view, or participate&lt;br&gt;
Decentralized and transparent&lt;br&gt;
Examples: Lisk, Ethereum, Bitcoin&lt;br&gt;
🏢 Private Blockchains:&lt;br&gt;
Restricted access — only authorized users can join&lt;br&gt;
Common in enterprise, banking, or internal systems&lt;br&gt;
Faster and more controlled, but less transparent&lt;br&gt;
🔐 I saw public blockchains like public libraries — open for anyone. Private blockchains are like company databases — only employees have keys to enter.&lt;/p&gt;

&lt;p&gt;🔁 5. Hashing: The Blockchain Glue&lt;br&gt;
Hashing was a tricky one at first, but this is how I got it.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Hashing:&lt;br&gt;
Hashing takes any input (a file, message, or block) and converts it into a unique string of letters and numbers. It’s a one-way street — you can’t reverse it to get the original.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Input: "Hello world"&lt;br&gt;
Hash (using SHA-256): a591a6d40bf420404a011733cfb7b190...&lt;br&gt;
Even a small change in the input changes the entire hash.&lt;/p&gt;

&lt;p&gt;💡 Why It's Used:&lt;br&gt;
Each block’s hash depends on the previous one, forming a secure chain.&lt;br&gt;
It guarantees that the data hasn’t been changed.&lt;br&gt;
It helps with fast verification.&lt;br&gt;
🧩 I thought of hashing like a digital fingerprint — two people (or files) can’t have the same one. If the fingerprint changes, the file has changed.&lt;/p&gt;

&lt;p&gt;🔐 6. Cryptography and Security&lt;br&gt;
At the heart of blockchain is cryptography — it keeps our wallets, transactions, and identities safe.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding:&lt;br&gt;
Each user has a private key (like a password) and a public key (like a username). You sign transactions with your private key, and others can verify it with your public key.&lt;/p&gt;

&lt;p&gt;🖊️ Digital Signatures:&lt;br&gt;
When you sign a transaction, it proves you made it and no one changed it.&lt;br&gt;
Others on the network can verify the signature without needing to trust you personally.&lt;br&gt;
🧠 It helped me to compare it to sending a sealed, signed envelope — only you could’ve sealed it, and anyone can check the seal is genuine.&lt;/p&gt;

&lt;p&gt;🧠 Summary: What I Took Away&lt;br&gt;
Concept What I Learned&lt;br&gt;
Lisk    A JavaScript-friendly blockchain for building apps&lt;br&gt;
Consensus   Blockchain’s way of agreeing on truth&lt;br&gt;
Nodes   Computers keeping the network alive and honest&lt;br&gt;
DAOs    Online communities governed by smart contracts&lt;br&gt;
Public vs Private Chains    Open vs restricted systems&lt;br&gt;
Hashing A way to secure and verify data&lt;br&gt;
Cryptography    Math-powered security that replaces human trust&lt;br&gt;
🙌 Final Thoughts&lt;br&gt;
This session of the Lisk Summer Bootcamp helped me go from “blockchain sounds cool” to “I actually get what makes it work.” Each concept built on the last, and using analogies helped me connect it to the real world.&lt;/p&gt;

&lt;p&gt;If you’re starting your blockchain journey, I highly recommend attending a bootcamp like this — it’s beginner-friendly, well-paced, and you learn by doing, not just reading.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Let’s keep learning and building together. 💙&lt;/p&gt;

&lt;p&gt;💬 Over to You&lt;br&gt;
Have you learned any of these concepts recently? Which one confused you the most when starting out?&lt;br&gt;
Let’s chat in the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What I Learned from the Lisk Summer Bootcamp day one: A Beginner’s Guide to Blockchain Concepts</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Thu, 17 Jul 2025 07:18:06 +0000</pubDate>
      <link>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-151a</link>
      <guid>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-151a</guid>
      <description>&lt;p&gt;What Is Blockchain?&lt;br&gt;
Blockchain is a special kind of digital database or ledger. But unlike a normal database (like Excel or Google Sheets), it has three unique characteristics:&lt;/p&gt;

&lt;p&gt;It's decentralized (not controlled by one person or company),&lt;/p&gt;

&lt;p&gt;It's secure and tamper-proof, and&lt;/p&gt;

&lt;p&gt;It's built with blocks of data that are chained together in order.&lt;/p&gt;

&lt;p&gt;🗳️ 1. Understanding Consensus Mechanisms&lt;br&gt;
Consensus mechanisms are how blockchain networks agree on what's true — without a central authority like a bank or government.&lt;/p&gt;

&lt;p&gt;🔍 How I Understood It:&lt;br&gt;
Think of it like a group chat of friends trying to decide where to meet. Everyone has a say, but you need a fair system so people don’t vote twice or lie. Blockchain has to reach agreement (consensus) every time someone adds a new transaction.&lt;/p&gt;

&lt;p&gt;💡 Common Consensus Types:&lt;br&gt;
Proof of Work (PoW): Like solving a complex puzzle. Whoever solves it first gets to add the next block. It's secure but slow and uses a lot of energy.&lt;br&gt;
Proof of Stake (PoS): Like picking validators based on how many tokens they’ve locked (or “staked”) as a sign of trust.&lt;br&gt;
Delegated Proof of Stake (DPoS) (used by Lisk): Instead of everyone trying to validate, token holders vote for a small group of “delegates” to validate blocks on behalf of the network.&lt;br&gt;
🧠 For me, DPoS felt like classroom group work — instead of everyone shouting answers, the class elects a few trusted students to speak and represent everyone fairly.&lt;/p&gt;

&lt;p&gt;💻 2. Nodes and Clients&lt;br&gt;
A node is a computer that runs the blockchain software and helps maintain the network.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Nodes:&lt;br&gt;
I thought of nodes like editors in a shared Google Doc — they check every update to the document and make sure it follows the rules. Some editors have full access to the whole history, while others only see current versions.&lt;/p&gt;

&lt;p&gt;🔧 Types of Nodes:&lt;br&gt;
Type    Explanation&lt;br&gt;
Full Node   Stores the entire blockchain and validates all transactions. Like having the whole document history.&lt;br&gt;
Archive Node    Keeps every past state — even data that's not needed anymore, in case you want detailed analysis. Like having a time machine for the document.&lt;br&gt;
Each node uses software called a client. In Lisk, the client is powered by the Lisk SDK, which developers can use to build, run, and customize their own blockchains.&lt;/p&gt;

&lt;p&gt;🏛️ 3. DAOs — Decentralized Autonomous Organizations&lt;br&gt;
A DAO is like a company that runs on code instead of managers.&lt;/p&gt;

&lt;p&gt;🧠 How I Understood It:&lt;br&gt;
Imagine a club where every rule, decision, and vote is written into a smart contract. Members don’t rely on a president or CEO — everything is voted on, and the results are automatic.&lt;/p&gt;

&lt;p&gt;In DAOs:&lt;/p&gt;

&lt;p&gt;Proposals are made by members&lt;br&gt;
Votes happen on-chain&lt;br&gt;
Rules are enforced automatically by smart contracts&lt;br&gt;
🎯 I pictured a DAO like a community-run vending machine — everyone votes on what snacks to restock, and the vending machine updates itself based on those votes, no human needed.&lt;/p&gt;

&lt;p&gt;🔓 4. Public vs Private Blockchains&lt;br&gt;
At first, I was confused about why we even have private blockchains if the whole point is decentralization. Here’s what I learned:&lt;/p&gt;

&lt;p&gt;🌍 Public Blockchains:&lt;br&gt;
Anyone can join, view, or participate&lt;br&gt;
Decentralized and transparent&lt;br&gt;
Examples: Lisk, Ethereum, Bitcoin&lt;br&gt;
🏢 Private Blockchains:&lt;br&gt;
Restricted access — only authorized users can join&lt;br&gt;
Common in enterprise, banking, or internal systems&lt;br&gt;
Faster and more controlled, but less transparent&lt;br&gt;
🔐 I saw public blockchains like public libraries — open for anyone. Private blockchains are like company databases — only employees have keys to enter.&lt;/p&gt;

&lt;p&gt;🔁 5. Hashing: The Blockchain Glue&lt;br&gt;
Hashing was a tricky one at first, but this is how I got it.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Hashing:&lt;br&gt;
Hashing takes any input (a file, message, or block) and converts it into a unique string of letters and numbers. It’s a one-way street — you can’t reverse it to get the original.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Input: "Hello world"&lt;br&gt;
Hash (using SHA-256): a591a6d40bf420404a011733cfb7b190...&lt;br&gt;
Even a small change in the input changes the entire hash.&lt;/p&gt;

&lt;p&gt;💡 Why It's Used:&lt;br&gt;
Each block’s hash depends on the previous one, forming a secure chain.&lt;br&gt;
It guarantees that the data hasn’t been changed.&lt;br&gt;
It helps with fast verification.&lt;br&gt;
🧩 I thought of hashing like a digital fingerprint — two people (or files) can’t have the same one. If the fingerprint changes, the file has changed.&lt;/p&gt;

&lt;p&gt;🔐 6. Cryptography and Security&lt;br&gt;
At the heart of blockchain is cryptography — it keeps our wallets, transactions, and identities safe.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding:&lt;br&gt;
Each user has a private key (like a password) and a public key (like a username). You sign transactions with your private key, and others can verify it with your public key.&lt;/p&gt;

&lt;p&gt;🖊️ Digital Signatures:&lt;br&gt;
When you sign a transaction, it proves you made it and no one changed it.&lt;br&gt;
Others on the network can verify the signature without needing to trust you personally.&lt;br&gt;
🧠 It helped me to compare it to sending a sealed, signed envelope — only you could’ve sealed it, and anyone can check the seal is genuine.&lt;/p&gt;

&lt;p&gt;🧠 Summary: What I Took Away&lt;br&gt;
Concept What I Learned&lt;br&gt;
Lisk    A JavaScript-friendly blockchain for building apps&lt;br&gt;
Consensus   Blockchain’s way of agreeing on truth&lt;br&gt;
Nodes   Computers keeping the network alive and honest&lt;br&gt;
DAOs    Online communities governed by smart contracts&lt;br&gt;
Public vs Private Chains    Open vs restricted systems&lt;br&gt;
Hashing A way to secure and verify data&lt;br&gt;
Cryptography    Math-powered security that replaces human trust&lt;br&gt;
🙌 Final Thoughts&lt;br&gt;
This session of the Lisk Summer Bootcamp helped me go from “blockchain sounds cool” to “I actually get what makes it work.” Each concept built on the last, and using analogies helped me connect it to the real world.&lt;/p&gt;

&lt;p&gt;If you’re starting your blockchain journey, I highly recommend attending a bootcamp like this — it’s beginner-friendly, well-paced, and you learn by doing, not just reading.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Let’s keep learning and building together. 💙&lt;/p&gt;

&lt;p&gt;💬 Over to You&lt;br&gt;
Have you learned any of these concepts recently? Which one confused you the most when starting out?&lt;br&gt;
Let’s chat in the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What I Learned from the Lisk Summer Bootcamp day one: A Beginner’s Guide to Blockchain Concepts</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Thu, 17 Jul 2025 07:18:06 +0000</pubDate>
      <link>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-341h</link>
      <guid>https://dev.to/vallentinah/what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-341h</guid>
      <description>&lt;p&gt;What Is Blockchain?&lt;br&gt;
Blockchain is a special kind of digital database or ledger. But unlike a normal database (like Excel or Google Sheets), it has three unique characteristics:&lt;/p&gt;

&lt;p&gt;It's decentralized (not controlled by one person or company),&lt;/p&gt;

&lt;p&gt;It's secure and tamper-proof, and&lt;/p&gt;

&lt;p&gt;It's built with blocks of data that are chained together in order.&lt;/p&gt;

&lt;p&gt;🗳️ 1. Understanding Consensus Mechanisms&lt;br&gt;
Consensus mechanisms are how blockchain networks agree on what's true — without a central authority like a bank or government.&lt;/p&gt;

&lt;p&gt;🔍 How I Understood It:&lt;br&gt;
Think of it like a group chat of friends trying to decide where to meet. Everyone has a say, but you need a fair system so people don’t vote twice or lie. Blockchain has to reach agreement (consensus) every time someone adds a new transaction.&lt;/p&gt;

&lt;p&gt;💡 Common Consensus Types:&lt;br&gt;
Proof of Work (PoW): Like solving a complex puzzle. Whoever solves it first gets to add the next block. It's secure but slow and uses a lot of energy.&lt;br&gt;
Proof of Stake (PoS): Like picking validators based on how many tokens they’ve locked (or “staked”) as a sign of trust.&lt;br&gt;
Delegated Proof of Stake (DPoS) (used by Lisk): Instead of everyone trying to validate, token holders vote for a small group of “delegates” to validate blocks on behalf of the network.&lt;br&gt;
🧠 For me, DPoS felt like classroom group work — instead of everyone shouting answers, the class elects a few trusted students to speak and represent everyone fairly.&lt;/p&gt;

&lt;p&gt;💻 2. Nodes and Clients&lt;br&gt;
A node is a computer that runs the blockchain software and helps maintain the network.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Nodes:&lt;br&gt;
I thought of nodes like editors in a shared Google Doc — they check every update to the document and make sure it follows the rules. Some editors have full access to the whole history, while others only see current versions.&lt;/p&gt;

&lt;p&gt;🔧 Types of Nodes:&lt;br&gt;
Type    Explanation&lt;br&gt;
Full Node   Stores the entire blockchain and validates all transactions. Like having the whole document history.&lt;br&gt;
Archive Node    Keeps every past state — even data that's not needed anymore, in case you want detailed analysis. Like having a time machine for the document.&lt;br&gt;
Each node uses software called a client. In Lisk, the client is powered by the Lisk SDK, which developers can use to build, run, and customize their own blockchains.&lt;/p&gt;

&lt;p&gt;🏛️ 3. DAOs — Decentralized Autonomous Organizations&lt;br&gt;
A DAO is like a company that runs on code instead of managers.&lt;/p&gt;

&lt;p&gt;🧠 How I Understood It:&lt;br&gt;
Imagine a club where every rule, decision, and vote is written into a smart contract. Members don’t rely on a president or CEO — everything is voted on, and the results are automatic.&lt;/p&gt;

&lt;p&gt;In DAOs:&lt;/p&gt;

&lt;p&gt;Proposals are made by members&lt;br&gt;
Votes happen on-chain&lt;br&gt;
Rules are enforced automatically by smart contracts&lt;br&gt;
🎯 I pictured a DAO like a community-run vending machine — everyone votes on what snacks to restock, and the vending machine updates itself based on those votes, no human needed.&lt;/p&gt;

&lt;p&gt;🔓 4. Public vs Private Blockchains&lt;br&gt;
At first, I was confused about why we even have private blockchains if the whole point is decentralization. Here’s what I learned:&lt;/p&gt;

&lt;p&gt;🌍 Public Blockchains:&lt;br&gt;
Anyone can join, view, or participate&lt;br&gt;
Decentralized and transparent&lt;br&gt;
Examples: Lisk, Ethereum, Bitcoin&lt;br&gt;
🏢 Private Blockchains:&lt;br&gt;
Restricted access — only authorized users can join&lt;br&gt;
Common in enterprise, banking, or internal systems&lt;br&gt;
Faster and more controlled, but less transparent&lt;br&gt;
🔐 I saw public blockchains like public libraries — open for anyone. Private blockchains are like company databases — only employees have keys to enter.&lt;/p&gt;

&lt;p&gt;🔁 5. Hashing: The Blockchain Glue&lt;br&gt;
Hashing was a tricky one at first, but this is how I got it.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding of Hashing:&lt;br&gt;
Hashing takes any input (a file, message, or block) and converts it into a unique string of letters and numbers. It’s a one-way street — you can’t reverse it to get the original.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Input: "Hello world"&lt;br&gt;
Hash (using SHA-256): a591a6d40bf420404a011733cfb7b190...&lt;br&gt;
Even a small change in the input changes the entire hash.&lt;/p&gt;

&lt;p&gt;💡 Why It's Used:&lt;br&gt;
Each block’s hash depends on the previous one, forming a secure chain.&lt;br&gt;
It guarantees that the data hasn’t been changed.&lt;br&gt;
It helps with fast verification.&lt;br&gt;
🧩 I thought of hashing like a digital fingerprint — two people (or files) can’t have the same one. If the fingerprint changes, the file has changed.&lt;/p&gt;

&lt;p&gt;🔐 6. Cryptography and Security&lt;br&gt;
At the heart of blockchain is cryptography — it keeps our wallets, transactions, and identities safe.&lt;/p&gt;

&lt;p&gt;🧠 My Understanding:&lt;br&gt;
Each user has a private key (like a password) and a public key (like a username). You sign transactions with your private key, and others can verify it with your public key.&lt;/p&gt;

&lt;p&gt;🖊️ Digital Signatures:&lt;br&gt;
When you sign a transaction, it proves you made it and no one changed it.&lt;br&gt;
Others on the network can verify the signature without needing to trust you personally.&lt;br&gt;
🧠 It helped me to compare it to sending a sealed, signed envelope — only you could’ve sealed it, and anyone can check the seal is genuine.&lt;/p&gt;

&lt;p&gt;🧠 Summary: What I Took Away&lt;br&gt;
Concept What I Learned&lt;br&gt;
Lisk    A JavaScript-friendly blockchain for building apps&lt;br&gt;
Consensus   Blockchain’s way of agreeing on truth&lt;br&gt;
Nodes   Computers keeping the network alive and honest&lt;br&gt;
DAOs    Online communities governed by smart contracts&lt;br&gt;
Public vs Private Chains    Open vs restricted systems&lt;br&gt;
Hashing A way to secure and verify data&lt;br&gt;
Cryptography    Math-powered security that replaces human trust&lt;br&gt;
🙌 Final Thoughts&lt;br&gt;
This session of the Lisk Summer Bootcamp helped me go from “blockchain sounds cool” to “I actually get what makes it work.” Each concept built on the last, and using analogies helped me connect it to the real world.&lt;/p&gt;

&lt;p&gt;If you’re starting your blockchain journey, I highly recommend attending a bootcamp like this — it’s beginner-friendly, well-paced, and you learn by doing, not just reading.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Let’s keep learning and building together. 💙&lt;/p&gt;

&lt;p&gt;💬 Over to You&lt;br&gt;
Have you learned any of these concepts recently? Which one confused you the most when starting out?&lt;br&gt;
Let’s chat in the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>## 🌐 What I Learned from the Lisk Summer Bootcamp day one: A Beginner’s Guide to Blockchain Concepts</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Wed, 16 Jul 2025 12:45:58 +0000</pubDate>
      <link>https://dev.to/vallentinah/-what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-48pj</link>
      <guid>https://dev.to/vallentinah/-what-i-learned-from-the-lisk-summer-bootcamp-day-one-a-beginners-guide-to-blockchain-concepts-48pj</guid>
      <description>&lt;h2&gt;
  
  
  💙 What Is Lisk?
&lt;/h2&gt;

&lt;p&gt;Before getting into the techy stuff, let’s start with the platform that made this learning journey possible — &lt;strong&gt;Lisk&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 My Understanding of Lisk:
&lt;/h3&gt;

&lt;p&gt;Imagine you want to build a custom blockchain app, but you only know &lt;strong&gt;JavaScript&lt;/strong&gt; (not fancy cryptography or low-level languages). That’s where &lt;strong&gt;Lisk&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lisk&lt;/strong&gt; is a blockchain platform that allows developers to build their own blockchains using &lt;strong&gt;JavaScript and TypeScript&lt;/strong&gt; — languages most web developers already know. It also uses a &lt;strong&gt;Delegated Proof of Stake (DPoS)&lt;/strong&gt; consensus model and offers tools like the &lt;strong&gt;Lisk SDK&lt;/strong&gt; to simplify blockchain development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧩 I understood Lisk as “WordPress for blockchains” — it gives you the templates, plugins, and infrastructure, so you can focus on building your own thing without reinventing everything from scratch.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🗳️ 1. Understanding Consensus Mechanisms
&lt;/h2&gt;

&lt;p&gt;Consensus mechanisms are how blockchain networks agree on what's true — without a central authority like a bank or government.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 How I Understood It:
&lt;/h3&gt;

&lt;p&gt;Think of it like a group chat of friends trying to decide where to meet. Everyone has a say, but you need a fair system so people don’t vote twice or lie. Blockchain has to reach agreement (consensus) every time someone adds a new transaction.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Common Consensus Types:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proof of Work (PoW)&lt;/strong&gt;: Like solving a complex puzzle. Whoever solves it first gets to add the next block. It's secure but slow and uses a lot of energy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proof of Stake (PoS)&lt;/strong&gt;: Like picking validators based on how many tokens they’ve locked (or “staked”) as a sign of trust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delegated Proof of Stake (DPoS)&lt;/strong&gt; (used by Lisk): Instead of everyone trying to validate, token holders vote for a small group of “delegates” to validate blocks on behalf of the network.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 For me, DPoS felt like &lt;strong&gt;classroom group work&lt;/strong&gt; — instead of everyone shouting answers, the class elects a few trusted students to speak and represent everyone fairly.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  💻 2. Nodes and Clients
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;node&lt;/strong&gt; is a computer that runs the blockchain software and helps maintain the network.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 My Understanding of Nodes:
&lt;/h3&gt;

&lt;p&gt;I thought of nodes like &lt;strong&gt;editors in a shared Google Doc&lt;/strong&gt; — they check every update to the document and make sure it follows the rules. Some editors have full access to the whole history, while others only see current versions.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔧 Types of Nodes:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Full Node&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stores the entire blockchain and validates all transactions. Like having the whole document history.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Archive Node&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Keeps every past state — even data that's not needed anymore, in case you want detailed analysis. Like having a time machine for the document.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each node uses software called a &lt;strong&gt;client&lt;/strong&gt;. In Lisk, the client is powered by the &lt;strong&gt;Lisk SDK&lt;/strong&gt;, which developers can use to build, run, and customize their own blockchains.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ 3. DAOs — Decentralized Autonomous Organizations
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;DAO&lt;/strong&gt; is like a company that runs on code instead of managers.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 How I Understood It:
&lt;/h3&gt;

&lt;p&gt;Imagine a club where every rule, decision, and vote is written into a smart contract. Members don’t rely on a president or CEO — everything is voted on, and the results are automatic.&lt;/p&gt;

&lt;p&gt;In DAOs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proposals are made by members&lt;/li&gt;
&lt;li&gt;Votes happen on-chain&lt;/li&gt;
&lt;li&gt;Rules are enforced automatically by smart contracts&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 I pictured a DAO like a &lt;strong&gt;community-run vending machine&lt;/strong&gt; — everyone votes on what snacks to restock, and the vending machine updates itself based on those votes, no human needed.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔓 4. Public vs Private Blockchains
&lt;/h2&gt;

&lt;p&gt;At first, I was confused about why we even have private blockchains if the whole point is decentralization. Here’s what I learned:&lt;/p&gt;

&lt;h3&gt;
  
  
  🌍 Public Blockchains:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Anyone can join, view, or participate&lt;/li&gt;
&lt;li&gt;Decentralized and transparent&lt;/li&gt;
&lt;li&gt;Examples: Lisk, Ethereum, Bitcoin&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏢 Private Blockchains:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Restricted access — only authorized users can join&lt;/li&gt;
&lt;li&gt;Common in enterprise, banking, or internal systems&lt;/li&gt;
&lt;li&gt;Faster and more controlled, but less transparent&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔐 I saw public blockchains like &lt;strong&gt;public libraries&lt;/strong&gt; — open for anyone. Private blockchains are like &lt;strong&gt;company databases&lt;/strong&gt; — only employees have keys to enter.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔁 5. Hashing: The Blockchain Glue
&lt;/h2&gt;

&lt;p&gt;Hashing was a tricky one at first, but this is how I got it.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 My Understanding of Hashing:
&lt;/h3&gt;

&lt;p&gt;Hashing takes any input (a file, message, or block) and converts it into a &lt;strong&gt;unique string of letters and numbers&lt;/strong&gt;. It’s a one-way street — you can’t reverse it to get the original.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Input: "Hello world"&lt;/li&gt;
&lt;li&gt;Hash (using SHA-256):
&lt;code&gt;a591a6d40bf420404a011733cfb7b190...&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even a small change in the input changes the entire hash.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Why It's Used:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Each block’s hash depends on the previous one, forming a secure chain.&lt;/li&gt;
&lt;li&gt;It guarantees that the data hasn’t been changed.&lt;/li&gt;
&lt;li&gt;It helps with fast verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧩 I thought of hashing like a &lt;strong&gt;digital fingerprint&lt;/strong&gt; — two people (or files) can’t have the same one. If the fingerprint changes, the file has changed.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔐 6. Cryptography and Security
&lt;/h2&gt;

&lt;p&gt;At the heart of blockchain is &lt;strong&gt;cryptography&lt;/strong&gt; — it keeps our wallets, transactions, and identities safe.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 My Understanding:
&lt;/h3&gt;

&lt;p&gt;Each user has a &lt;strong&gt;private key&lt;/strong&gt; (like a password) and a &lt;strong&gt;public key&lt;/strong&gt; (like a username). You sign transactions with your private key, and others can verify it with your public key.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖊️ Digital Signatures:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you sign a transaction, it proves &lt;strong&gt;you made it&lt;/strong&gt; and &lt;strong&gt;no one changed it&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Others on the network can verify the signature without needing to trust you personally.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🧠 It helped me to compare it to &lt;strong&gt;sending a sealed, signed envelope&lt;/strong&gt; — only you could’ve sealed it, and anyone can check the seal is genuine.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🧠 Summary: What I Took Away
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What I Learned&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lisk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A JavaScript-friendly blockchain for building apps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consensus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Blockchain’s way of agreeing on truth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Nodes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Computers keeping the network alive and honest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DAOs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Online communities governed by smart contracts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Public vs Private Chains&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Open vs restricted systems&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hashing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A way to secure and verify data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cryptography&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Math-powered security that replaces human trust&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  🙌 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;This session of the Lisk Summer Bootcamp helped me go from “blockchain sounds cool” to “I actually get what makes it work.” Each concept built on the last, and using analogies helped me connect it to the real world.&lt;/p&gt;

&lt;p&gt;If you’re starting your blockchain journey, I highly recommend attending a bootcamp like this — it’s beginner-friendly, well-paced, and you learn by doing, not just reading.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Let’s keep learning and building together. 💙&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Over to You
&lt;/h2&gt;

&lt;p&gt;Have you learned any of these concepts recently? Which one confused you the most when starting out?&lt;br&gt;
Let’s chat in the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🛠️ Setting Up MetaMask 🦊 and Adding Lisk Networks via Chainlist: A Step-by-Step Walkthrough</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Wed, 16 Jul 2025 12:05:16 +0000</pubDate>
      <link>https://dev.to/vallentinah/setting-up-metamask-and-adding-lisk-networks-via-chainlist-a-step-by-step-walkthrough-55ij</link>
      <guid>https://dev.to/vallentinah/setting-up-metamask-and-adding-lisk-networks-via-chainlist-a-step-by-step-walkthrough-55ij</guid>
      <description>&lt;h3&gt;
  
  
  👋 Hello Devs!
&lt;/h3&gt;

&lt;p&gt;I recently had to set up MetaMask and add &lt;strong&gt;custom blockchain networks&lt;/strong&gt; — specifically &lt;strong&gt;Lisk Mainnet&lt;/strong&gt; and &lt;strong&gt;Lisk Sepolia Testnet&lt;/strong&gt; — as part of a class assignment. Since it was my first time doing this, I decided to document everything I did, step by step.&lt;/p&gt;

&lt;p&gt;This post is for anyone who's new to MetaMask, EVM networks, or just wants a super simple guide to using &lt;a href="https://chainlist.org" rel="noopener noreferrer"&gt;Chainlist.org&lt;/a&gt; with MetaMask.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧩 What Is MetaMask?
&lt;/h3&gt;

&lt;p&gt;If you're totally new to Web3, &lt;strong&gt;MetaMask&lt;/strong&gt; is a browser-based wallet that allows you to store crypto, interact with dApps, and switch between multiple blockchains — not just Ethereum.&lt;/p&gt;

&lt;p&gt;By default, it only includes &lt;strong&gt;Ethereum Mainnet&lt;/strong&gt;, so if you want to use networks like &lt;strong&gt;Polygon, Arbitrum, BNB Chain, or Lisk&lt;/strong&gt;, you need to add them manually or through a tool like Chainlist.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔧 Step 1: Installing MetaMask
&lt;/h3&gt;

&lt;p&gt;I started by heading to:&lt;br&gt;
👉 &lt;a href="https://metamask.io" rel="noopener noreferrer"&gt;https://metamask.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Installed the Chrome browser extension.&lt;/li&gt;
&lt;li&gt;Created a new wallet (and safely saved my recovery phrase — never skip this!).&lt;/li&gt;
&lt;li&gt;Opened the MetaMask extension popup, ready to go.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🌐 Step 2: Connecting MetaMask to Chainlist
&lt;/h3&gt;

&lt;p&gt;Next, I visited &lt;a href="https://chainlist.org" rel="noopener noreferrer"&gt;https://chainlist.org&lt;/a&gt; to add the Lisk networks.&lt;/p&gt;

&lt;p&gt;Here’s what I did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clicked &lt;strong&gt;“Connect Wallet”&lt;/strong&gt; on Chainlist.&lt;/li&gt;
&lt;li&gt;MetaMask popped up and I approved the connection.&lt;/li&gt;
&lt;li&gt;Searched for &lt;strong&gt;“Lisk”&lt;/strong&gt; — found both &lt;strong&gt;Lisk Mainnet&lt;/strong&gt; and &lt;strong&gt;Lisk Sepolia Testnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Clicked &lt;strong&gt;“Add to MetaMask”&lt;/strong&gt; for each network.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💡 Funny thing: &lt;strong&gt;no popup appeared&lt;/strong&gt; after I clicked “Add to MetaMask,” but when I checked MetaMask, both networks were already listed and enabled!&lt;/p&gt;




&lt;h3&gt;
  
  
  🔄 Step 3: Switching Between Networks
&lt;/h3&gt;

&lt;p&gt;Once the networks were added, I switched between them in MetaMask like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lisk Mainnet&lt;/strong&gt; appeared under my regular network list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lisk Sepolia Testnet&lt;/strong&gt; was visible under the &lt;strong&gt;Test Networks&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;I clicked each one, and they loaded perfectly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  📸 Screenshots of My Setup
&lt;/h3&gt;

&lt;p&gt;Here are screenshots I took while confirming everything was working:&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Lisk Mainnet selected in MetaMask:
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhhbnx5gq4ivcp7izvt5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhhbnx5gq4ivcp7izvt5.png" alt=" " width="493" height="756"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Lisk Sepolia Testnet selected in MetaMask:
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpk0kgkuqznz7jm1xtjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpk0kgkuqznz7jm1xtjk.png" alt=" " width="498" height="757"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚠️ A Quick Note About RPC URLs
&lt;/h3&gt;

&lt;p&gt;When I clicked the Lisk network in MetaMask, I noticed it listed &lt;strong&gt;two RPC URLs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rpc.api.lisk.com&lt;/code&gt; ✅ (official and recommended)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lisk.drpc.org&lt;/code&gt; (an alternative)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I chose the first one since it’s the official RPC used by Lisk.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✅ What I Learned
&lt;/h3&gt;

&lt;p&gt;Even though I didn’t see any popups, I learned that MetaMask &lt;strong&gt;can still add networks silently&lt;/strong&gt; as long as it's connected to Chainlist.&lt;/p&gt;

&lt;p&gt;It was super helpful to see how EVM-compatible networks work — and now I feel more confident adding others in the future.&lt;/p&gt;




&lt;h3&gt;
  
  
  🙌 Wrapping Up
&lt;/h3&gt;

&lt;p&gt;If you're just getting started with MetaMask and blockchain networks, I highly recommend exploring Chainlist. It’s a beginner-friendly way to add networks quickly — even if the process isn’t always 100% predictable.&lt;/p&gt;

&lt;p&gt;Thanks for reading! I hope this post saves you some time. Let me know if you’ve had similar experiences or want help adding other networks.&lt;/p&gt;




&lt;h2&gt;
  
  
  📝 TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Installed MetaMask ✅&lt;/li&gt;
&lt;li&gt;Connected to Chainlist ✅&lt;/li&gt;
&lt;li&gt;Added Lisk Mainnet and Lisk Sepolia Testnet ✅&lt;/li&gt;
&lt;li&gt;Switched between networks ✅&lt;/li&gt;
&lt;li&gt;Took screenshots to verify ✅&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Django MVT vs MVC Explained Simply for Beginners</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Tue, 01 Jul 2025 14:46:30 +0000</pubDate>
      <link>https://dev.to/vallentinah/django-mvt-vs-mvc-explained-simply-for-beginners-3ome</link>
      <guid>https://dev.to/vallentinah/django-mvt-vs-mvc-explained-simply-for-beginners-3ome</guid>
      <description>&lt;p&gt;I’ve been learning Django recently, and I kept seeing two things: &lt;strong&gt;MVC&lt;/strong&gt; and &lt;strong&gt;MVT&lt;/strong&gt;. At first, they looked like the same thing — just a different name — but the more I dug into Django’s docs and tutorials, the more confused I got. 😅&lt;/p&gt;

&lt;p&gt;So if you're just getting started with Django (like me) and scratching your head over these two acronyms, don't worry — you’re not alone. Let me walk you through how I finally made sense of it all.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚧 The Initial Confusion: What the Heck is MVT?
&lt;/h3&gt;

&lt;p&gt;When I first saw MVT, I thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Wait, isn't this just MVC with a different hat on?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But the thing is — &lt;strong&gt;Django doesn’t fully follow MVC&lt;/strong&gt;. It uses a pattern called &lt;strong&gt;Model-View-Template (MVT)&lt;/strong&gt;, and while it &lt;em&gt;looks&lt;/em&gt; similar to MVC, there are some tricky naming differences that can throw you off.&lt;/p&gt;




&lt;h3&gt;
  
  
  🍽️ How I Finally Understood MVT — The Restaurant Analogy
&lt;/h3&gt;

&lt;p&gt;To really &lt;em&gt;get it&lt;/em&gt;, I had to break things down in a way even my little cousin could understand.&lt;/p&gt;

&lt;p&gt;Let’s imagine Django is a restaurant.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Real Life&lt;/th&gt;
&lt;th&gt;In Django&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Customer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;You (user visiting)&lt;/td&gt;
&lt;td&gt;Browser/user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Waiter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Talks to kitchen&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;View&lt;/strong&gt; (logic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Chef&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cooks the food&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Model&lt;/strong&gt; (data)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Plate + Food&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;What you get served&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Template&lt;/strong&gt; (HTML)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Here’s how it plays out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You (user) request a webpage, like “show me blog posts.”&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;View&lt;/strong&gt; (waiter) takes that request and goes to the &lt;strong&gt;Model&lt;/strong&gt; (chef).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Model&lt;/strong&gt; gets the data (blog posts) from the database.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;View&lt;/strong&gt; hands that data to the &lt;strong&gt;Template&lt;/strong&gt; (plate).&lt;/li&gt;
&lt;li&gt;You get a delicious HTML page in your browser!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That simple story helped me so much. Once I saw Django like a restaurant, I stopped trying to overthink the technical jargon.&lt;/p&gt;




&lt;h3&gt;
  
  
  🤔 So… Is Django MVT or MVC?
&lt;/h3&gt;

&lt;p&gt;After understanding the MVT flow, I still had one big question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Does Django use MVT or MVC? I keep seeing both…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And here’s the answer:&lt;/p&gt;

&lt;p&gt;🔑 &lt;strong&gt;Django is an MVT framework&lt;/strong&gt; — but it’s &lt;em&gt;very similar&lt;/em&gt; to MVC.&lt;br&gt;
The difference lies mostly in how the roles are named and slightly how they’re implemented.&lt;/p&gt;

&lt;p&gt;Let’s break it down side by side:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;MVC (Model-View-Controller)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;MVT (Model-View-Template)&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Handles data and business logic&lt;/td&gt;
&lt;td&gt;Same — &lt;code&gt;models.py&lt;/code&gt; in Django&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Shows data to the user (UI)&lt;/td&gt;
&lt;td&gt;This is the &lt;strong&gt;Template&lt;/strong&gt; in Django&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Controls the flow, connects model/view&lt;/td&gt;
&lt;td&gt;This is Django’s &lt;strong&gt;View&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Django:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You write the &lt;strong&gt;Model&lt;/strong&gt; (&lt;code&gt;models.py&lt;/code&gt;) to define your data.&lt;/li&gt;
&lt;li&gt;You write the &lt;strong&gt;View&lt;/strong&gt; (&lt;code&gt;views.py&lt;/code&gt;) to handle the logic.&lt;/li&gt;
&lt;li&gt;You create &lt;strong&gt;Templates&lt;/strong&gt; (&lt;code&gt;.html&lt;/code&gt; files) to render your UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But Django &lt;strong&gt;handles the "controller" part for you&lt;/strong&gt; — internally through its URL dispatcher and view functions.&lt;/p&gt;


&lt;h3&gt;
  
  
  🧠 TL;DR — Django’s MVT in Plain English
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Talks to the database (the chef)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fetches data and sends to template&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Template&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Displays the final page (plate)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;💡 Django's View ≠ UI&lt;br&gt;
Django's View = The logic that connects the data to the UI.&lt;/p&gt;


&lt;h3&gt;
  
  
  🛠️ A Real Tiny Example (the restaurant in code)
&lt;/h3&gt;

&lt;p&gt;Here’s how the restaurant analogy might look in Django code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# models.py (Chef)
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;CharField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# views.py (Waiter)
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Post&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;post_list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;blog/post_list.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;posts&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;# post_list.html (Template - the plate)
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;All&lt;/span&gt; &lt;span class="n"&gt;Posts&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;endfor&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧩 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Understanding MVT vs MVC isn’t about memorizing definitions — it’s about seeing how they &lt;strong&gt;work in practice&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you're just getting started with Django like I am, don’t stress about the names. Just focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Model = your data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;View = your logic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Template = your HTML&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you're ever confused again, just think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Django is a restaurant 🍽️ — and I'm just the hungry user waiting for my plate of blog posts.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Thanks for reading! Let me know if this helped or if you’ve got your own funny way of remembering the difference. 🍕&lt;/p&gt;

&lt;p&gt;Happy coding! 💻&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started with Django: A Two-App Project with Individual Templates</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:25:44 +0000</pubDate>
      <link>https://dev.to/vallentinah/-getting-started-with-django-a-two-app-project-with-individual-templates-2mah</link>
      <guid>https://dev.to/vallentinah/-getting-started-with-django-a-two-app-project-with-individual-templates-2mah</guid>
      <description>&lt;p&gt;As a beginner learning Django, I wanted to go beyond the usual single-app setup and try something more practical: a Django project with &lt;strong&gt;two apps&lt;/strong&gt;, where each app has its own &lt;strong&gt;templates&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post walks you through exactly how I set it up — with actual code and screenshots from my own project. If you’re getting started or want to organize your project more cleanly, this guide is for you. &lt;/p&gt;




&lt;h2&gt;
  
  
  Folder Structure
&lt;/h2&gt;

&lt;p&gt;Here’s what the structure looks like in my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web_project/
│
├── hello/
│   ├── templates/
│   │   └── hello/
│   │       ├── sample.html
│   │       └── sample.css
│   ├── views.py
│   ├── urls.py
│
├── users/
│   ├── templates/
│   │   └── users/
│   │       └── register.html
│   ├── views.py
│   ├── urls.py
│
├── web_project/
│   └── settings.py
│   └── urls.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;✅ Step-by-Step Setup&lt;/p&gt;

&lt;p&gt;Step 0: Create &amp;amp; Activate a Virtual Environment&lt;/p&gt;

&lt;p&gt;Before working on your Django project, it's best to set up a &lt;strong&gt;virtual environment&lt;/strong&gt; so your project dependencies are isolated from your system Python.&lt;/p&gt;

&lt;p&gt;🌀 1. Create the Virtual Environment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a folder named &lt;code&gt;venv/&lt;/code&gt; in your project directory.&lt;/p&gt;




&lt;p&gt;⚡ 2. Activate the Virtual Environment&lt;/p&gt;

&lt;p&gt;Now, depending on your operating system, run one of the following:&lt;br&gt;
 ✅ On &lt;strong&gt;Windows&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ On &lt;strong&gt;Linux/macOS&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧪 3. Confirm It’s Activated
&lt;/h3&gt;

&lt;p&gt;Once activated, you’ll see the environment name (like &lt;code&gt;(venv)&lt;/code&gt;) in your terminal prompt.&lt;/p&gt;

&lt;p&gt;Then you can install Django safely inside the environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Create the Project and Apps
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;django-admin startproject web_project
&lt;span class="nb"&gt;cd &lt;/span&gt;web_project
python manage.py startapp hello
python manage.py startapp &lt;span class="nb"&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Register Apps in &lt;code&gt;settings.py&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Write Your Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/views.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/sample.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Create Templates
&lt;/h3&gt;

&lt;h4&gt;
  
  
  📄 &lt;code&gt;hello/templates/hello/sample.html&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;About django&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Hello, World!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a sample Django web project.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Welcome to the Hello World page!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;


#### 📄 `users/templates/users/register.html`

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
html&lt;/p&gt;

&lt;h2&gt;This is the user registration page&lt;/h2&gt;




&lt;h3&gt;
  
  
  5. Set Up URL Routing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;users/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/register.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;register&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;web_project/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;admin/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. Run the Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open your browser and visit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/hello/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/hello/&lt;/a&gt; → You’ll see the "Hello, World!" template&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/users/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/users/&lt;/a&gt; → You’ll see the user register page&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Each app can and should have its own &lt;code&gt;templates/&lt;/code&gt; folder for better organization.&lt;/li&gt;
&lt;li&gt;Always remember to include each app’s URL configuration inside the main project &lt;code&gt;urls.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Restart the dev server when you make changes to settings or URL configurations.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>## 🚀 Getting Started with Django: A Two-App Project with Individual Templates</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:12:39 +0000</pubDate>
      <link>https://dev.to/vallentinah/-getting-started-with-django-a-two-app-project-with-individual-templates-5848</link>
      <guid>https://dev.to/vallentinah/-getting-started-with-django-a-two-app-project-with-individual-templates-5848</guid>
      <description>&lt;h2&gt;
  
  
  🚀 Getting Started with Django: A Two-App Project with Individual Templates
&lt;/h2&gt;




&lt;p&gt;As a beginner learning Django, I wanted to go beyond the usual single-app setup and try something more practical: a Django project with &lt;strong&gt;two apps&lt;/strong&gt;, where each app has its own &lt;strong&gt;templates&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post walks you through exactly how I set it up — with actual code and screenshots from my own project. If you’re getting started or want to organize your project more cleanly, this guide is for you. 🧠✨&lt;/p&gt;




&lt;h2&gt;
  
  
  🗂️ Folder Structure
&lt;/h2&gt;

&lt;p&gt;Here’s what the structure looks like in my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web_project/
│
├── hello/
│   ├── templates/
│   │   └── hello/
│   │       ├── sample.html
│   │       └── sample.css
│   ├── views.py
│   ├── urls.py
│
├── users/
│   ├── templates/
│   │   └── users/
│   │       └── register.html
│   ├── views.py
│   ├── urls.py
│
├── web_project/
│   └── settings.py
│   └── urls.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✅ Step-by-Step Setup
&lt;/h2&gt;

&lt;h2&gt;
  
  
  ⚙️ Step 0: Set Up a Virtual Environment
&lt;/h2&gt;

&lt;p&gt;Before we even touch Django, let's set up a clean Python environment for the project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a virtual environment&lt;/strong&gt; (you can name it &lt;code&gt;venv&lt;/code&gt; or anything):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Activate it&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Windows&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;Linux/macOS&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Django&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Once Django is installed inside your virtual environment, you’re ready to create your Django project!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Create the Project and Apps
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;django-admin startproject web_project
&lt;span class="nb"&gt;cd &lt;/span&gt;web_project
python manage.py startapp hello
python manage.py startapp &lt;span class="nb"&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Register Apps in &lt;code&gt;settings.py&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Write Your Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/views.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/sample.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📸 &lt;em&gt;Here’s how my code looks in VS Code:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbldzyv2qwtuojvbwk0ne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbldzyv2qwtuojvbwk0ne.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Create Templates
&lt;/h3&gt;

&lt;h4&gt;
  
  
  📄 &lt;code&gt;hello/templates/hello/sample.html&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;About django&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Hello, World!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a sample Django web project.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Welcome to the Hello World page!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📸 Here’s my actual file in action:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-TYQDZxRmGSb3z2dL23vEVK" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-TYQDZxRmGSb3z2dL23vEVK" alt="sample html" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  📄 &lt;code&gt;users/templates/users/register.html&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;This is the user registration page&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  5. Set Up URL Routing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;users/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/register.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;register&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;web_project/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;admin/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. Run the Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open your browser and visit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/hello/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/hello/&lt;/a&gt; → You’ll see the "Hello, World!" template&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/users/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/users/&lt;/a&gt; → You’ll see the user register page&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Each app can and should have its own &lt;code&gt;templates/&lt;/code&gt; folder for better organization.&lt;/li&gt;
&lt;li&gt;Always remember to include each app’s URL configuration inside the main project &lt;code&gt;urls.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Restart the dev server when you make changes to settings or URL configurations.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Setting this up helped me understand Django’s project structure and how templates work. It also taught me how to keep things clean when scaling to multiple apps.&lt;/p&gt;

&lt;p&gt;Let me know in the comments if you're trying something similar or hit a wall—I’ll be happy to help out!&lt;/p&gt;




&lt;p&gt;Would you like this in &lt;strong&gt;Markdown format&lt;/strong&gt; or as a &lt;strong&gt;PDF export&lt;/strong&gt; ready for Dev.to upload?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By: Vall Achieng&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;As a beginner learning Django, I wanted to go beyond the usual single-app setup and try something more practical: a Django project with &lt;strong&gt;two apps&lt;/strong&gt;, where each app has its own &lt;strong&gt;templates&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This post walks you through exactly how I set it up — with actual code and screenshots from my own project. If you’re getting started or want to organize your project more cleanly, this guide is for you. 🧠✨&lt;/p&gt;




&lt;h2&gt;
  
  
  🗂️ Folder Structure
&lt;/h2&gt;

&lt;p&gt;Here’s what the structure looks like in my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web_project/
│
├── hello/
│   ├── templates/
│   │   └── hello/
│   │       ├── sample.html
│   │       └── sample.css
│   ├── views.py
│   ├── urls.py
│
├── users/
│   ├── templates/
│   │   └── users/
│   │       └── register.html
│   ├── views.py
│   ├── urls.py
│
├── web_project/
│   └── settings.py
│   └── urls.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✅ Step-by-Step Setup
&lt;/h2&gt;




&lt;h3&gt;
  
  
  1. Create the Project and Apps
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;django-admin startproject web_project
&lt;span class="nb"&gt;cd &lt;/span&gt;web_project
python manage.py startapp hello
python manage.py startapp &lt;span class="nb"&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. Register Apps in &lt;code&gt;settings.py&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Write Your Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/views.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/sample.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📸 &lt;em&gt;Here’s how my code looks in VS Code:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-Jt6tVDZ11Yw6ic9DB7sBnh" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-Jt6tVDZ11Yw6ic9DB7sBnh" alt="hello view" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Create Templates
&lt;/h3&gt;

&lt;h4&gt;
  
  
  📄 &lt;code&gt;hello/templates/hello/sample.html&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;About django&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Hello, World!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a sample Django web project.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Welcome to the Hello World page!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📸 Here’s my actual file in action:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-TYQDZxRmGSb3z2dL23vEVK" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ffiles.chat.openai.com%2Ffile-TYQDZxRmGSb3z2dL23vEVK" alt="sample html" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  📄 &lt;code&gt;users/templates/users/register.html&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;This is the user registration page&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  5. Set Up URL Routing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;hello/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;users/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/register.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;register&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;web_project/urls.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;admin/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;users.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. Run the Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open your browser and visit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/hello/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/hello/&lt;/a&gt; → You’ll see the "Hello, World!" template&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://127.0.0.1:8000/users/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/users/&lt;/a&gt; → You’ll see the user register page&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Each app can and should have its own &lt;code&gt;templates/&lt;/code&gt; folder for better organization.&lt;/li&gt;
&lt;li&gt;Always remember to include each app’s URL configuration inside the main project &lt;code&gt;urls.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Restart the dev server when you make changes to settings or URL configurations.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Setting this up helped me understand Django’s project structure and how templates work. It also taught me how to keep things clean when scaling to multiple apps.&lt;/p&gt;

&lt;p&gt;Let me know in the comments if you're trying something similar or hit a wall—I’ll be happy to help out!&lt;/p&gt;

</description>
    </item>
    <item>
      <title># 🐍 Python Data Types: The Ultimate Beginner's Guide (with Examples)</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Fri, 27 Jun 2025 10:22:35 +0000</pubDate>
      <link>https://dev.to/vallentinah/-python-data-types-the-ultimate-beginners-guide-with-examples-4o0d</link>
      <guid>https://dev.to/vallentinah/-python-data-types-the-ultimate-beginners-guide-with-examples-4o0d</guid>
      <description>&lt;p&gt;Understanding &lt;strong&gt;data types&lt;/strong&gt; is one of the most important parts of learning Python. Whether you're building a calculator, a web app, or analyzing data, everything you do involves data — and that data always has a type.&lt;/p&gt;

&lt;p&gt;In this article, we’ll dive deep into Python's data types, show real code examples &lt;strong&gt;with outputs&lt;/strong&gt;, explain &lt;strong&gt;why each type matters&lt;/strong&gt;, and even explore how to use &lt;strong&gt;arrays in Python&lt;/strong&gt; using &lt;code&gt;array&lt;/code&gt; and &lt;code&gt;NumPy&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧐 What Are Data Types in Python?
&lt;/h2&gt;

&lt;p&gt;In Python, a data type tells the interpreter &lt;strong&gt;what kind of value&lt;/strong&gt; a variable holds — is it a number? a list? a sentence?&lt;/p&gt;

&lt;p&gt;Python is &lt;strong&gt;dynamically typed&lt;/strong&gt;, meaning you don’t have to declare data types. It figures them out when the code runs.&lt;/p&gt;




&lt;h2&gt;
  
  
  📆 1. Numeric Types
&lt;/h2&gt;

&lt;p&gt;Numeric types represent numbers, and Python supports three main numeric types:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔢 &lt;code&gt;int&lt;/code&gt; (Integer)
&lt;/h3&gt;

&lt;p&gt;Used to store whole numbers (positive or negative) without decimal points.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# 42
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;     &lt;span class="c1"&gt;# &amp;lt;class 'int'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Integers can be very large in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;big&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12345678901234567890&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;big&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# 12345678901234567890
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔢 &lt;code&gt;float&lt;/code&gt; (Floating-point)
&lt;/h3&gt;

&lt;p&gt;Represents numbers with decimal points. These are useful for measurements, scores, percentages, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14159&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# 3.14159
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;     &lt;span class="c1"&gt;# &amp;lt;class 'float'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python also supports scientific notation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sci&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.2e3&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sci&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# 1200.0
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Floats can have rounding errors due to binary representation.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔢 &lt;code&gt;complex&lt;/code&gt; (Complex numbers)
&lt;/h3&gt;

&lt;p&gt;Stores numbers with a real and imaginary part. Mostly used in scientific computing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;z&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;3j&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# (2+3j)
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;real&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# 2.0
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;imag&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# 3.0
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📝 2. Text Type
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;str&lt;/code&gt; (String)
&lt;/h3&gt;

&lt;p&gt;A string is a sequence of characters. Strings are used to represent text data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Vall&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Hello, world!&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# Vall
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# &amp;lt;class 'str'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Strings support many operations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upper&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;     &lt;span class="c1"&gt;# VALL
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;      &lt;span class="c1"&gt;# P
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Vall&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;f-strings&lt;/strong&gt; are used to embed variables in strings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;My name is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; and I am &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; years old.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# My name is Vall and I am 21 years old.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📚 3. Sequence Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;list&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A list is an ordered collection of items. It is mutable, meaning it can be changed after creation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fruits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apple&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;banana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cherry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;        &lt;span class="c1"&gt;# apple
&lt;/span&gt;&lt;span class="n"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;orange&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fruits&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# ['apple', 'banana', 'cherry', 'orange']
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;code&gt;tuple&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A tuple is similar to a list but immutable — once created, it can't be changed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;point&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;point&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;# (10, 20)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attempting to modify it causes an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# point[0] = 15  # TypeError: 'tuple' object does not support item assignment
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;code&gt;range&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Used to generate a sequence of numbers, often in loops.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;          &lt;span class="c1"&gt;# [0, 1, 2, 3, 4]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧽 4. Set Types
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;set&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A set is an unordered, mutable collection of &lt;strong&gt;unique&lt;/strong&gt; elements. That means no duplicates are allowed, and the order is not guaranteed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;colors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;red&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;green&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;blue&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;red&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# {'green', 'red', 'blue'}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can add or remove elements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yellow&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;green&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mathematical set operations are supported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# intersection: {3}
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# union: {1, 2, 3, 4, 5}
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# difference: {1, 2}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sets are useful for checking membership and removing duplicates from a list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;unique_nums&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;unique_nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# {1, 2, 3, 4, 5}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;code&gt;frozenset&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;frozenset&lt;/code&gt; is like a set, but &lt;strong&gt;immutable&lt;/strong&gt; — once created, you can't add or remove elements. This makes it hashable and usable as a dictionary key or element in another set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;frozenset&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# frozenset({1, 2, 3})
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can perform the same operations as with a set (except mutation):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fs1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;frozenset&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;fs2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;frozenset&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fs1&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;fs2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# intersection: frozenset({3})
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this will raise an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# fs.add(6)  # AttributeError: 'frozenset' object has no attribute 'add'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;frozenset&lt;/code&gt; when you need a constant set of values that should not be changed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🗘️ 5. Mapping Type
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;dict&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A dictionary stores key-value pairs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;student&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Vall&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;age&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;course&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;   &lt;span class="c1"&gt;# Vall
&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;age&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# {'name': 'Vall', 'age': 22, 'course': 'CS'}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✨ 6. Boolean Type
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;bool&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Boolean values represent &lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt;. They are commonly used in conditions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;is_active&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;is_active&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;is_active&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# &amp;lt;class 'bool'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expressions that return booleans:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# False
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ❌ 7. None Type
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;NoneType&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Represents the absence of a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                &lt;span class="c1"&gt;# None
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;          &lt;span class="c1"&gt;# &amp;lt;class 'NoneType'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Often used for default values or empty returns.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Type Checking and Conversion
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;              &lt;span class="c1"&gt;# &amp;lt;class 'int'&amp;gt;
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# True
&lt;/span&gt;
&lt;span class="n"&gt;str_x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;str_x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                &lt;span class="c1"&gt;# '100'
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;str_x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;          &lt;span class="c1"&gt;# &amp;lt;class 'str'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ♻️ Mutable vs Immutable
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Mutable?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;str&lt;/code&gt;, &lt;code&gt;tuple&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt;, &lt;code&gt;None&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;list&lt;/code&gt;, &lt;code&gt;dict&lt;/code&gt;, &lt;code&gt;set&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  📌 Arrays in Python
&lt;/h2&gt;

&lt;p&gt;Python doesn’t have a native array type like Java or C++, but we can use:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;array&lt;/code&gt; module (basic)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;array&lt;/span&gt;
&lt;span class="n"&gt;nums&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;i&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                &lt;span class="c1"&gt;# array('i', [1, 2, 3, 4])
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;             &lt;span class="c1"&gt;# 1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;'i'&lt;/code&gt; indicates integers. &lt;code&gt;'f'&lt;/code&gt; for float, &lt;code&gt;'d'&lt;/code&gt; for double.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. NumPy Arrays (powerful &amp;amp; preferred for data science)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="n"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                 &lt;span class="c1"&gt;# [10 20 30]
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# int64 (platform dependent)
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c1"&gt;# [15 25 35]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NumPy arrays are faster, more efficient, and used in machine learning, AI, and data science.&lt;/p&gt;

&lt;p&gt;Install with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;numpy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 Mini Challenge
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# ?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt;: &lt;code&gt;[1, 2, 3, 4]&lt;/code&gt; because both &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; point to the same list (mutable).&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Data types are the foundation of Python programming. Mastering them helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store and process data effectively&lt;/li&gt;
&lt;li&gt;Avoid bugs&lt;/li&gt;
&lt;li&gt;Build real applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From &lt;code&gt;int&lt;/code&gt; to &lt;code&gt;dict&lt;/code&gt;, from &lt;code&gt;list&lt;/code&gt; to &lt;code&gt;NumPy&lt;/code&gt; arrays — Python gives you tools to handle any kind of data.&lt;/p&gt;

&lt;p&gt;Happy coding 🐍🚀!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering Git &amp; GitHub: A Beginner’s Guide to Collaboration and Code Management</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Thu, 26 Jun 2025 11:03:08 +0000</pubDate>
      <link>https://dev.to/vallentinah/mastering-git-github-a-beginners-guide-to-collaboration-and-code-management-3ic0</link>
      <guid>https://dev.to/vallentinah/mastering-git-github-a-beginners-guide-to-collaboration-and-code-management-3ic0</guid>
      <description>&lt;p&gt;description: Understand forking, cloning, pull requests, merge conflicts, collaboration, and Git commands using Git and GitHub.&lt;/p&gt;

&lt;p&gt;Whether you’re a beginner in coding or collaborating on your first group project, understanding &lt;strong&gt;version control&lt;/strong&gt; is a must. In this article, I’ll walk you through the basics of version control using Git and GitHub, including essential workflows like &lt;strong&gt;forking, cloning, collaboration, pull requests, resolving merge conflicts&lt;/strong&gt;, and more.&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 What is Version Control?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Version control&lt;/strong&gt; is a system that tracks changes to your code over time. It allows multiple developers to work on the same codebase without overwriting each other’s work.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Imagine it like Google Docs for code — you can go back to older versions, see who made changes, and collaborate in real-time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👉 Read more: &lt;a href="https://www.atlassian.com/git/tutorials/what-is-version-control" rel="noopener noreferrer"&gt;Atlassian’s guide on Version Control&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 Git vs GitHub
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt; is the actual version control system. It's installed on your computer and helps manage local code changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt; is a cloud-based platform where your Git repositories are hosted online, allowing collaboration.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌱 Forking a Repository
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Forking&lt;/strong&gt; is creating a personal copy of someone else's repository on your GitHub account.&lt;/p&gt;

&lt;p&gt;Why fork?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To propose changes to someone else's project&lt;/li&gt;
&lt;li&gt;To experiment safely without affecting the original repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;➡️ Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the repo on GitHub&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Fork&lt;/strong&gt; button (top right)&lt;/li&gt;
&lt;li&gt;You now have your own copy to work on!&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🧭 Forking vs Cloning a Repository: What’s the Difference?
&lt;/h2&gt;

&lt;p&gt;If you're just starting out with GitHub, you might wonder:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"When should I fork a repo, and when should I clone one?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Although they may seem similar, &lt;strong&gt;forking&lt;/strong&gt; and &lt;strong&gt;cloning&lt;/strong&gt; serve different purposes and are used in different situations.&lt;/p&gt;

&lt;h3&gt;
  
  
  🍴 What is Forking?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Forking&lt;/strong&gt; a repository means creating a &lt;strong&gt;copy of someone else’s GitHub repo&lt;/strong&gt; under your &lt;strong&gt;own GitHub account&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;✅ Use it when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;don’t have write access&lt;/strong&gt; to the original repo (e.g. open source)&lt;/li&gt;
&lt;li&gt;You want to &lt;strong&gt;suggest changes&lt;/strong&gt; via a pull request&lt;/li&gt;
&lt;li&gt;You want to &lt;strong&gt;customize or experiment&lt;/strong&gt; without affecting the original project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔁 After forking, you can then &lt;strong&gt;clone&lt;/strong&gt; your fork to your local machine to begin working on it.&lt;/p&gt;




&lt;h3&gt;
  
  
  📥 What is Cloning?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Cloning&lt;/strong&gt; is when you &lt;strong&gt;download a GitHub repository to your local computer&lt;/strong&gt; using Git.&lt;/p&gt;

&lt;p&gt;✅ Use it when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want to &lt;strong&gt;work on the project locally&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You already have access to the repo (e.g. your own project or team project)&lt;/li&gt;
&lt;li&gt;You want to run, edit, or explore the code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🛠️ The clone creates a &lt;strong&gt;local working copy&lt;/strong&gt; of the repository. Any changes you make locally won’t reflect on GitHub until you push them.&lt;/p&gt;




&lt;h3&gt;
  
  
  🆚 Key Differences
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Forking&lt;/th&gt;
&lt;th&gt;Cloning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Creates GitHub Copy?&lt;/td&gt;
&lt;td&gt;✅ Yes (in your GitHub account)&lt;/td&gt;
&lt;td&gt;❌ No (just on your computer)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requires GitHub?&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (can be done with just a repo URL)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Common Use Case&lt;/td&gt;
&lt;td&gt;Contribute to open source or copy someone’s project&lt;/td&gt;
&lt;td&gt;Work on your own or team repo locally&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access Level&lt;/td&gt;
&lt;td&gt;You don’t need write access to the original repo&lt;/td&gt;
&lt;td&gt;Typically used if you have access or after forking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next Step&lt;/td&gt;
&lt;td&gt;Usually followed by cloning the fork&lt;/td&gt;
&lt;td&gt;Can push changes directly if you have access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  🧪 Real-World Example
&lt;/h3&gt;

&lt;p&gt;Let’s say you find a cool open source project like &lt;code&gt;weather-app&lt;/code&gt; on GitHub, and you want to contribute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option A: Fork + Clone (Open Source)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Fork&lt;/strong&gt; → You now have your own copy on GitHub.&lt;/li&gt;
&lt;li&gt;Run:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/your-username/weather-app.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make changes locally.&lt;/li&gt;
&lt;li&gt;Push and create a &lt;strong&gt;pull request&lt;/strong&gt; to contribute back.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Option B: Clone Directly (Your Own Project)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
   git clone https://github.com/your-username/my-portfolio.git&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make changes, then push directly to the same repo.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🔑 Summary
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;🔹 &lt;strong&gt;Forking = Copy a GitHub repo to your account&lt;/strong&gt;&lt;br&gt;
🔹 &lt;strong&gt;Cloning = Copy a GitHub repo to your local machine&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They often work together:&lt;br&gt;
👉 &lt;strong&gt;Fork first → then clone → make changes → push → pull request&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Collaboration &amp;amp; Pull Requests
&lt;/h2&gt;

&lt;p&gt;After forking and making your changes locally, you’ll want to &lt;strong&gt;contribute back&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s how collaboration happens:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`bash&lt;/p&gt;

&lt;h1&gt;
  
  
  Clone your fork
&lt;/h1&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/your-username/project-name.git" rel="noopener noreferrer"&gt;https://github.com/your-username/project-name.git&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create a new branch
&lt;/h1&gt;

&lt;p&gt;git checkout -b feature-branch&lt;/p&gt;

&lt;h1&gt;
  
  
  Make changes and commit
&lt;/h1&gt;

&lt;p&gt;git add .&lt;br&gt;
git commit -m "Added a new feature"&lt;/p&gt;

&lt;h1&gt;
  
  
  Push to GitHub
&lt;/h1&gt;

&lt;p&gt;git push origin feature-branch&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, go to your GitHub repo and open a &lt;strong&gt;Pull Request (PR)&lt;/strong&gt; — this asks the original repo owner to review and merge your changes.&lt;/p&gt;

&lt;p&gt;🔗 Learn more: &lt;a href="https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources" rel="noopener noreferrer"&gt;GitHub Learning Resources&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚔️ Merge Conflicts
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;merge conflict&lt;/strong&gt; happens when two people edit the same line of code in different ways.&lt;/p&gt;

&lt;p&gt;Git will ask you to manually fix the conflict:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`bash&lt;br&gt;
&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD&lt;/p&gt;

&lt;h1&gt;
  
  
  your code
&lt;/h1&gt;

&lt;p&gt;incoming change&lt;/p&gt;

&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;feature-branch&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;Fix the section, then:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git add .&lt;br&gt;
git commit -m "Resolved merge conflict"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pro tip: Use VS Code or GitHub’s web editor to visualize and resolve conflicts easily.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Code Review
&lt;/h2&gt;

&lt;p&gt;Once a pull request is opened, teammates (or repo owners) can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Suggest changes&lt;/li&gt;
&lt;li&gt;Approve the PR&lt;/li&gt;
&lt;li&gt;Leave comments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This encourages better code quality and team learning!&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 GitHub Issues
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt; are like to-do tasks or bug reports. Use them to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track features&lt;/li&gt;
&lt;li&gt;Report bugs&lt;/li&gt;
&lt;li&gt;Start discussions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can label issues with tags like &lt;code&gt;bug&lt;/code&gt;, &lt;code&gt;good first issue&lt;/code&gt;, or &lt;code&gt;help wanted&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Must-Know Git Commands
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git clone&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Download a project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;See changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stage changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git commit -m "msg"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save a snapshot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Upload to GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Download changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git branch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List branches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git checkout -b branch-name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create/switch to new branch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Pushing Changes to GitHub
&lt;/h2&gt;

&lt;p&gt;After editing your code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git add .&lt;br&gt;
git commit -m "your message"&lt;br&gt;
git push origin branch-name&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This sends your code to your GitHub repo — ready for collaboration or deployment!&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Learning Git and GitHub is a &lt;strong&gt;game-changer&lt;/strong&gt; in modern software development. Whether you're working on solo projects or contributing to open source, these skills will help you stay organized, avoid mistakes, and work better with teams.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://skills.github.com" rel="noopener noreferrer"&gt;GitHub Learning Lab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources" rel="noopener noreferrer"&gt;GitHub Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/resources/articles/software-development/what-is-version-control" rel="noopener noreferrer"&gt;GitHub: What is Version Control?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✍️ &lt;em&gt;Have questions or feedback? Drop them in the comments or connect with me on GitHub. Happy coding!&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>From Zero to Dev Environment Hero: My Setup with Git, Python, Docker &amp; More</title>
      <dc:creator>VALENTINE ACHIENG</dc:creator>
      <pubDate>Tue, 24 Jun 2025 21:29:31 +0000</pubDate>
      <link>https://dev.to/vallentinah/from-zero-to-dev-environment-hero-my-setup-with-git-python-docker-more-37m</link>
      <guid>https://dev.to/vallentinah/from-zero-to-dev-environment-hero-my-setup-with-git-python-docker-more-37m</guid>
      <description>&lt;p&gt;Setting up a dev environment can feel overwhelming at first, especially with tools like Git, WSL, Docker, and SSH. I recently went through this process and wanted to share how I did it — including tips, common mistakes, and useful links to help you avoid frustration.&lt;/p&gt;




&lt;p&gt;✅ What I Installed and Why&lt;/p&gt;

&lt;p&gt;Git – for version control and working with repositories&lt;br&gt;
👉 Download: &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;https://git-scm.com/downloads&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python 3.10+ – needed for scripting and backend development&lt;br&gt;
👉 Download: &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;https://www.python.org/downloads/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;VS Code / PyCharm – code editors for writing and debugging&lt;br&gt;
👉 VS Code: &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;https://code.visualstudio.com/&lt;/a&gt;&lt;br&gt;
👉 PyCharm: &lt;a href="https://www.jetbrains.com/pycharm/download/" rel="noopener noreferrer"&gt;https://www.jetbrains.com/pycharm/download/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WSL (Windows Subsystem for Linux) – for Linux tooling on Windows&lt;br&gt;
👉 Guide: &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/install" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/wsl/install&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docker – to run containers and keep dev environments clean&lt;br&gt;
👉 Download: &lt;a href="https://www.docker.com/products/docker-desktop/" rel="noopener noreferrer"&gt;https://www.docker.com/products/docker-desktop/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SSH with GitHub – to connect to GitHub securely&lt;br&gt;
👉 Guide: &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh" rel="noopener noreferrer"&gt;https://docs.github.com/en/authentication/connecting-to-github-with-ssh&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🔧 Step-by-Step Setup&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Git and SSH&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installed Git and configured my name and email:&lt;/p&gt;

&lt;p&gt;git config --global user.name "Your Name"&lt;br&gt;
git config --global user.email "&lt;a href="mailto:you@example.com"&gt;you@example.com&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;Generated SSH keys:&lt;/p&gt;

&lt;p&gt;ssh-keygen -t ed25519 -C "&lt;a href="mailto:you@example.com"&gt;you@example.com&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;Added my public key to GitHub via Settings → SSH &amp;amp; GPG keys&lt;/p&gt;

&lt;p&gt;Started the SSH agent and added the key:&lt;/p&gt;

&lt;p&gt;eval "$(ssh-agent -s)"&lt;br&gt;
ssh-add ~/.ssh/id_ed25519&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Python and Code Editors&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installed Python 3.10+ and verified the version:&lt;/p&gt;

&lt;p&gt;python --version&lt;/p&gt;

&lt;p&gt;Installed PyCharm for heavy projects, and VS Code for lighter edits&lt;/p&gt;

&lt;p&gt;Set up a virtual environment:&lt;/p&gt;

&lt;p&gt;python -m venv venv&lt;br&gt;
source venv/bin/activate  # On Linux/macOS&lt;br&gt;
.\venv\Scripts\activate   # On Windows&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;WSL (for Windows Users)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Enabled WSL by running:&lt;/p&gt;

&lt;p&gt;wsl --install&lt;/p&gt;

&lt;p&gt;Downloaded Ubuntu from the Microsoft Store&lt;/p&gt;

&lt;p&gt;Updated and installed essentials:&lt;/p&gt;

&lt;p&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade&lt;br&gt;
sudo apt install python3 python3-pip git&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installed Docker Desktop and enabled WSL 2 integration&lt;/p&gt;

&lt;p&gt;Tested Docker installation:&lt;/p&gt;

&lt;p&gt;docker run hello-world&lt;/p&gt;




&lt;p&gt;⚠️ What Went Wrong (And How I Fixed It)&lt;/p&gt;

&lt;p&gt;SSH wouldn’t connect – I forgot to start the SSH agent&lt;/p&gt;

&lt;p&gt;Docker didn’t work – WSL was not set to version 2&lt;/p&gt;

&lt;p&gt;Wrong Python version – I was using Windows Python instead of WSL’s&lt;/p&gt;

&lt;p&gt;These challenges helped me understand the tools better and troubleshoot on my own.&lt;/p&gt;




&lt;p&gt;💡 Helpful Extras&lt;/p&gt;

&lt;p&gt;Installed VS Code extensions: Python, Docker, GitLens, Remote - WSL&lt;/p&gt;

&lt;p&gt;Added some Git aliases for speed:&lt;/p&gt;

&lt;p&gt;git config --global alias.st status&lt;br&gt;
git config --global alias.ci "commit -m"&lt;/p&gt;




&lt;p&gt;🎯 Final Thoughts&lt;/p&gt;

&lt;p&gt;After setting all this up, I now have a complete dev environment that allows me to:&lt;/p&gt;

&lt;p&gt;Build and test apps easily&lt;/p&gt;

&lt;p&gt;Use Linux tools while staying on Windows&lt;/p&gt;

&lt;p&gt;Push to GitHub securely using SSH&lt;/p&gt;

&lt;p&gt;Run isolated projects in Docker containers&lt;/p&gt;

&lt;p&gt;It might seem like a lot at first, but every step taught me something useful. If you’re just getting started, take your time and embrace the errors — they’re part of the process&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
