<?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: Kinuri Mahoshadhi Edirisinghe</title>
    <description>The latest articles on DEV Community by Kinuri Mahoshadhi Edirisinghe (@kinuri_mahoshadhiedirisi).</description>
    <link>https://dev.to/kinuri_mahoshadhiedirisi</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4059065%2F6b9b8063-ba82-4f58-b775-236cb7bb731e.png</url>
      <title>DEV Community: Kinuri Mahoshadhi Edirisinghe</title>
      <link>https://dev.to/kinuri_mahoshadhiedirisi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kinuri_mahoshadhiedirisi"/>
    <language>en</language>
    <item>
      <title>🕰️ Where Programming Began — The Journey from Machines to Modern Code</title>
      <dc:creator>Kinuri Mahoshadhi Edirisinghe</dc:creator>
      <pubDate>Tue, 08 Sep 2026 12:11:58 +0000</pubDate>
      <link>https://dev.to/kinuri_mahoshadhiedirisi/where-programming-began-the-journey-from-machines-to-modern-code-2a0e</link>
      <guid>https://dev.to/kinuri_mahoshadhiedirisi/where-programming-began-the-journey-from-machines-to-modern-code-2a0e</guid>
      <description>&lt;p&gt;**_&lt;/p&gt;

&lt;h2&gt;
  
  
  Have you ever wondered how humans first learned to communicate with computers?
&lt;/h2&gt;

&lt;p&gt;_**&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Today, we write code using languages such as Python, JavaScript, Java, and C++. But programming didn’t start there.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the early days of computing, computers had to be given instructions in machine language — a system based on binary instructions that computers could directly understand.&lt;/p&gt;

&lt;p&gt;💻 &lt;em&gt;Machine Language&lt;/em&gt;&lt;br&gt;
Computers understood instructions represented using 0s and 1s. It was powerful, but extremely difficult for humans to work with.&lt;/p&gt;

&lt;p&gt;⬇️&lt;/p&gt;

&lt;p&gt;⚙️_ Assembly Language_&lt;br&gt;
Assembly introduced symbolic instructions, making programming more understandable and manageable.&lt;/p&gt;

&lt;p&gt;⬇️&lt;/p&gt;

&lt;p&gt;🧠_ High-Level Languages_&lt;br&gt;
Languages such as FORTRAN, LISP, and COBOL brought programming closer to human-readable concepts.&lt;/p&gt;

&lt;p&gt;⬇️&lt;/p&gt;

&lt;p&gt;🌐 &lt;em&gt;Modern Programming&lt;/em&gt;&lt;br&gt;
Over decades of innovation, programming languages continued to evolve — eventually leading to the technologies we use today for web development, artificial intelligence, data science, software engineering, and much more.&lt;/p&gt;

&lt;p&gt;💡 The interesting part?&lt;/p&gt;

&lt;p&gt;Programming didn’t become powerful because computers suddenly became smarter.&lt;/p&gt;

&lt;p&gt;Humans kept finding better ways to communicate with them.&lt;/p&gt;

&lt;p&gt;And that evolution is still happening today. 🚀&lt;/p&gt;

&lt;p&gt;As I continue learning Python, Web Development, AI, and Creative Technology, I’m becoming more interested not only in how to write code, but also in where these technologies came from and why they evolved.&lt;/p&gt;

&lt;p&gt;This is Post 01 of my “Programming Through Time” series.&lt;/p&gt;

&lt;p&gt;Next → The Birth of Python 🐍&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KME Luxury Designs&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where Creativity Meets Technology. 🖤✨&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>kmeluxurydesigns</category>
      <category>python</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I ASKED AI TO CREATE SCARIEST GAMES 🫢😱</title>
      <dc:creator>Kinuri Mahoshadhi Edirisinghe</dc:creator>
      <pubDate>Mon, 24 Aug 2026 05:20:34 +0000</pubDate>
      <link>https://dev.to/kinuri_mahoshadhiedirisi/i-asked-ai-to-create-scariest-games-48e1</link>
      <guid>https://dev.to/kinuri_mahoshadhiedirisi/i-asked-ai-to-create-scariest-games-48e1</guid>
      <description>&lt;h1&gt;
  
  
  I Asked AI to Create the Scariest Games 🫢😱
&lt;/h1&gt;

&lt;p&gt;What happens when you ask AI to design the scariest game it can imagine?&lt;/p&gt;

&lt;p&gt;I decided to find out.&lt;/p&gt;

&lt;p&gt;Instead of creating a normal game concept, I gave AI one simple challenge:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Create the scariest horror game you can imagine.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The results were… interesting. 👀&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 The Experiment
&lt;/h2&gt;

&lt;p&gt;My goal wasn't to build a complete horror game.&lt;/p&gt;

&lt;p&gt;I wanted to see how AI would approach &lt;strong&gt;fear, atmosphere, mystery, and storytelling&lt;/strong&gt; when given almost no creative restrictions.&lt;/p&gt;

&lt;p&gt;I asked AI to think about things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The setting&lt;/li&gt;
&lt;li&gt;The atmosphere&lt;/li&gt;
&lt;li&gt;The main mystery&lt;/li&gt;
&lt;li&gt;What makes the player feel uncomfortable&lt;/li&gt;
&lt;li&gt;The final twist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And then I started developing the ideas visually.&lt;/p&gt;

&lt;h2&gt;
  
  
  👻 Concept #1 — The Abandoned Place
&lt;/h2&gt;

&lt;p&gt;The first concept started with a seemingly abandoned location.&lt;/p&gt;

&lt;p&gt;At first, everything looked normal.&lt;/p&gt;

&lt;p&gt;An empty building.&lt;/p&gt;

&lt;p&gt;Dark surroundings.&lt;/p&gt;

&lt;p&gt;No people.&lt;/p&gt;

&lt;p&gt;But the more details AI added, the more unusual the environment became.&lt;/p&gt;

&lt;p&gt;That made me realize something interesting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Horror doesn't always need a monster.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes the feeling that &lt;em&gt;something is wrong&lt;/em&gt; is enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌑 Concept #2 — Something Is Watching
&lt;/h2&gt;

&lt;p&gt;For the second concept, I asked AI to make the environment feel less safe.&lt;/p&gt;

&lt;p&gt;Instead of immediately showing a creature, I wanted the viewer to wonder:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Is someone watching?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is where AI-generated visuals became especially useful.&lt;/p&gt;

&lt;p&gt;Small changes in lighting, shadows, fog, and background details can completely change the mood of an image.&lt;/p&gt;

&lt;h2&gt;
  
  
  😨 The Interesting Part
&lt;/h2&gt;

&lt;p&gt;The most interesting thing about this experiment wasn't the scary images.&lt;/p&gt;

&lt;p&gt;It was seeing how &lt;strong&gt;AI interprets fear&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;AI doesn't experience fear like a human does.&lt;/p&gt;

&lt;p&gt;It learns patterns from human-created stories, movies, games, artwork, and descriptions.&lt;/p&gt;

&lt;p&gt;So when we ask AI to create something frightening, it combines those patterns into something new.&lt;/p&gt;

&lt;p&gt;That raises an interesting question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can AI actually be creative, or is it remixing what humans have already created?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't think there's a simple answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤖 AI Is a Creative Tool
&lt;/h2&gt;

&lt;p&gt;For me, the experiment showed that AI is most interesting when you don't simply ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Make me an image.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead, you give it a &lt;strong&gt;creative problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Create a place that looks beautiful at first, but becomes increasingly unsettling the longer you look at it.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's much more interesting.&lt;/p&gt;

&lt;p&gt;The AI becomes part of the creative process rather than just an image generator.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎬 From Experiment to Short Video
&lt;/h2&gt;

&lt;p&gt;After creating the concepts, I decided to turn the experiment into a short-form video.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I asked AI to create the scariest games possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then I show the concepts one by one, making each one stranger than the previous one.&lt;/p&gt;

&lt;p&gt;The goal isn't just to scare people.&lt;/p&gt;

&lt;p&gt;It's to make them curious enough to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“What would the next one look like?”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🔥 What Would You Ask AI?
&lt;/h2&gt;

&lt;p&gt;Now I'm curious about your ideas.&lt;/p&gt;

&lt;p&gt;If you could give an AI &lt;strong&gt;one instruction&lt;/strong&gt; to create the most terrifying fictional game concept possible, what would you tell it?&lt;/p&gt;

&lt;p&gt;Would you choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🏚️ An abandoned building?&lt;/li&gt;
&lt;li&gt;🌲 A mysterious forest?&lt;/li&gt;
&lt;li&gt;🚪 A house with no exit?&lt;/li&gt;
&lt;li&gt;🌌 Something in space?&lt;/li&gt;
&lt;li&gt;🤖 An AI-controlled world?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or something completely different?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tell me your idea.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maybe I'll use one of them for the next experiment. 👀&lt;/p&gt;




&lt;h3&gt;
  
  
  Final Thought
&lt;/h3&gt;

&lt;p&gt;This experiment reminded me that AI isn't only useful for writing code or answering questions.&lt;/p&gt;

&lt;p&gt;It can also be a &lt;strong&gt;creative playground&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Give it a strange idea.&lt;/p&gt;

&lt;p&gt;Add your own imagination.&lt;/p&gt;

&lt;p&gt;Then see what happens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And sometimes… what happens is genuinely creepy. 🫢😱&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>FetchAI - Quantum Dog Breed Scanner &amp; Story Generator</title>
      <dc:creator>Kinuri Mahoshadhi Edirisinghe</dc:creator>
      <pubDate>Sat, 15 Aug 2026 07:14:01 +0000</pubDate>
      <link>https://dev.to/kinuri_mahoshadhiedirisi/fetchai-quantum-dog-breed-scanner-story-generator-j70</link>
      <guid>https://dev.to/kinuri_mahoshadhiedirisi/fetchai-quantum-dog-breed-scanner-story-generator-j70</guid>
      <description>&lt;p&gt;&lt;strong&gt;## What I Built&lt;/strong&gt;&lt;br&gt;
I built &lt;strong&gt;FetchAI&lt;/strong&gt;, an intelligent, cyberpunk-styled dark mode web application that acts as a quantum dog breed scanner and an AI story generator. &lt;/p&gt;

&lt;p&gt;When a user uploads a portrait of their dog, the application connects directly to the Google AI matrix using the latest Gemini API (&lt;code&gt;gemini-2.0-flash&lt;/code&gt;). It instantly extracts the exact breed classification, creates a behavioral profile, provides care metrics, and writes a beautiful, unique 3-sentence short story featuring the dog as a heroic character!&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Chosen
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best use of Google AI&lt;/strong&gt; 🤖 (Powered by Gemini API via Google AI Studio).&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Here is the repository link containing the full source code and preview details:&lt;br&gt;
&lt;strong&gt;[&lt;a href="https://edirisinghekinurimahoshadhi-debug.github.io/Dog/" rel="noopener noreferrer"&gt;https://edirisinghekinurimahoshadhi-debug.github.io/Dog/&lt;/a&gt;]&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;I am a 14-year-old student (Grade 9) from Sri Lanka, currently learning coding through freeCodeCamp and AI concepts via the Elements of AI course. &lt;/p&gt;

&lt;p&gt;When I saw the "Dog Days Edition" challenge, I wanted to build something highly functional but with a premium, engaging UI. I designed the front-end using clean HTML5 and modern CSS3 featuring a glowing golden dog-paw pulse animation (&lt;code&gt;🐾&lt;/code&gt;) inspired by the classic Google search Easter egg. &lt;/p&gt;

&lt;p&gt;The hardest part was converting the uploaded image into a Base64 stream inside vanilla JavaScript and passing it down to the Gemini API securely without using any heavy back-end frameworks. With strict prompts, the AI now successfully identifies the breed and automatically generates a creative narrative ("The Hero's Tale") giving the dog a random name!&lt;/p&gt;

&lt;p&gt;This project taught me how seamlessly Google AI can be integrated into everyday client-side web applications to build fast, intelligent, and user-centric features.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>googleaichallenge</category>
      <category>javascript</category>
    </item>
    <item>
      <title>My Comfort Food Project: Interactive Sri Lankan Spicy 🧀 Kottu Calculator! 🍜</title>
      <dc:creator>Kinuri Mahoshadhi Edirisinghe</dc:creator>
      <pubDate>Sun, 02 Aug 2026 13:40:38 +0000</pubDate>
      <link>https://dev.to/kinuri_mahoshadhiedirisi/my-comfort-food-project-interactive-sri-lankan-spicy-kottu-calculator-2gg6</link>
      <guid>https://dev.to/kinuri_mahoshadhiedirisi/my-comfort-food-project-interactive-sri-lankan-spicy-kottu-calculator-2gg6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hi everyone!&lt;/strong&gt; 🇱🇰&lt;/p&gt;

&lt;p&gt;For the DEV Frontend Challenge: Comfort Food Edition, I wanted to build a web page inspired by the ultimate street comfort food from my home country, Sri Lanka — *&lt;em&gt;Spicy Cheese Kottu!&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Kottu is a legendary Sri Lankan street food made with shredded parotta roti, aromatic spices, fresh vegetables, eggs, and meat. In this special version, we add a massive amount of melted cheese to balance out the heavy spice. It's warm, comforting, and the perfect meal for a quiet midnight craving.&lt;/p&gt;
&lt;h3&gt;
  
  
  🚀 Live Demo
&lt;/h3&gt;

&lt;p&gt;You can try out my live interactive web app here:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://edirisinghekinurimahoshadhi-debug.github.io/-kottu-challenge/" rel="noopener noreferrer"&gt;Click Here to See My Cozy Kottu Website&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What I Built 🛠️
&lt;/h3&gt;

&lt;p&gt;Inspired by a cozy midnight ramen illustration, I created a dark-themed UI featuring a soft glowing moon, stars, a warm lamp effect, and a steaming Kottu bowl. &lt;/p&gt;

&lt;p&gt;I implemented an &lt;strong&gt;Interactive Ingredient Portion Calculator&lt;/strong&gt; using vanilla JavaScript. When a user adjusts the number of servings, the application dynamically calculates the exact amount of Parotta Roti, Melted Cheese, and Chicken needed in real-time!&lt;/p&gt;
&lt;h3&gt;
  
  
  The Code Snippet 💻
&lt;/h3&gt;

&lt;p&gt;Here is the JavaScript logic I used to handle the real-time serving calculations based on the input element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;servingsInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;servings&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rotiSpan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;roti&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cheeseSpan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cheese&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;baseRoti&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;baseCheese&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;servingsInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;servings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;servingsInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;rotiSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;baseRoti&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;servings&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;cheeseSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;baseCheese&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;servings&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;
  
  
  Why this is my Comfort Food ❤️
&lt;/h3&gt;

&lt;p&gt;In Sri Lanka, Kottu isn't just food; it's an experience. The rhythmic sound of metal blades chopping the roti on hot iron griddles can be heard down every street at night. Whenever we gather with friends or family after a long day, a warm, cheesy bowl of Kottu always makes us feel right at home.&lt;/p&gt;

&lt;p&gt;I would love to hear your feedback! Have you ever tasted authentic Sri Lankan Kottu or any spicy street food like this? Let me know in the comments below! 🍜🧀&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>comfortfood</category>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>5 Common CSS Mistakes Beginners Make and How to Fix Them</title>
      <dc:creator>Kinuri Mahoshadhi Edirisinghe</dc:creator>
      <pubDate>Sun, 02 Aug 2026 12:31:08 +0000</pubDate>
      <link>https://dev.to/kinuri_mahoshadhiedirisi/5-common-css-mistakes-beginners-make-and-how-to-fix-them-1b42</link>
      <guid>https://dev.to/kinuri_mahoshadhiedirisi/5-common-css-mistakes-beginners-make-and-how-to-fix-them-1b42</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Learning CSS can feel like magic, but it can also be incredibly frustrating. One minute your website looks perfect, and the next minute, a single line of code breaks the entire layout.If you are struggling to get your web pages to look exactly how you want, don't worry. Here are 5 of the most common CSS mistakes beginners make and exactly how you can fix them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;1. Forgetting the CSS Box Model (Adding Padding Breaks Width)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Mistake&lt;/em&gt;: You set a box's width to 100%, but as soon as you add &lt;code&gt;padding: 20px;&lt;/code&gt; or a border, horizontal scrollbars appear and your layout breaks.Why it happens: By default, CSS adds padding and borders on top of the width you specified. So, 100% width + 20px padding left + 20px padding right = wider than the screen!The Fix: Always use box-sizing: border-box; at the top of your CSS file. This forces the browser to include padding and borders inside the specified width.&lt;/p&gt;

&lt;p&gt;/* Add this to the very top of your CSS file */&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;{
box-sizing: border-box;
margin: 0;
padding: 0;
}&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Confusing Block vs. Inline Elements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Mistake: You try to add a vertical margin, width, or height to a &lt;span&gt; or an &lt;a&gt; tag, but nothing changes on the screen.Why it happens: Tags like &lt;span&gt;, &lt;/span&gt;&lt;/a&gt;&lt;a&gt;, and &lt;strong&gt; are inline elements. By default, inline elements ignore top/bottom margins, heights, and widths.The Fix: Change the element's display property to inline-block or block.&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a&gt;&lt;strong&gt;

&lt;p&gt;/* Fix: This will now respect your width and margin settings */&lt;br&gt;
a {&lt;br&gt;
  display: inline-block;&lt;br&gt;
  width: 150px;&lt;br&gt;
  margin-top: 20px;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Overusing Absolute Positioning (position: absolute)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Mistake: Using position: absolute; to push elements around the screen until they look "perfect" on your laptop, only to find the layout completely scrambled on a mobile screen.Why it happens: Absolute positioning takes elements out of the normal document flow. It makes your website completely rigid and unresponsive.The Fix: Stop using absolute positioning for general layouts. Instead, learn and use CSS Flexbox or CSS Grid to build flexible layouts.&lt;/p&gt;

&lt;p&gt;/* Instead of absolute position, use Flexbox to center things easily */&lt;br&gt;
.container {&lt;br&gt;
  display: flex;&lt;br&gt;
  justify-content: center;&lt;br&gt;
  align-items: center;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Hardcoding Fixed Widths (width: 800px)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Mistake: Setting major containers or image wrappers to a hardcoded pixel size like width: 1200px;.Why it happens: A fixed pixel width looks great on a large desktop monitor, but when viewed on a smartphone (which usually has a width under 400px), your content will get cut off.The Fix: Use relative units like percentages (%), viewport width (vw), or combine max-width with a percentage.&lt;/p&gt;

&lt;p&gt;/* Fix: The container will shrink safely on smaller mobile screens */&lt;br&gt;
.main-container {&lt;br&gt;
  width: 100%;&lt;br&gt;
  max-width: 1200px; &lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Using the Wrong Color and Font Units&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Mistake: Using px for text sizing everywhere, making it difficult for users with accessibility needs to scale up the text on their browsers.Why it happens: Pixels are absolute units. If a user sets their default browser font larger for better readability, your px fonts will ignore their preference.The Fix: Use rem for font sizes. 1rem is typically equal to the browser's default font size (usually 16px).&lt;/p&gt;

&lt;p&gt;/* Fix: Responsive typography that respects user settings &lt;em&gt;/&lt;br&gt;
h1 {&lt;br&gt;
  font-size: 2.5rem; /&lt;/em&gt; Equals 40px on standard settings &lt;em&gt;/&lt;br&gt;
}&lt;br&gt;
p {&lt;br&gt;
  font-size: 1rem;   /&lt;/em&gt; Equals 16px on standard settings */&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ConclusionCSS&lt;/strong&gt; &lt;br&gt;
&lt;em&gt;isn't broken; it just has specific rules! By using box-sizing: border-box, switching to Flexbox, and using relative units like rem and %, you will instantly eliminate 90% of your layout bugs.What is the most frustrating CSS bug you've encountered so far? Let me know in the comments below!&lt;/em&gt;&lt;/p&gt;

&lt;/strong&gt;&lt;/a&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
