<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paresh Singh Rajput on Medium]]></title>
        <description><![CDATA[Stories by Paresh Singh Rajput on Medium]]></description>
        <link>https://medium.com/@pareshsingh799?source=rss-83ae71bc6a41------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ExMv1gZLW1wED_pwsakbfg.jpeg</url>
            <title>Stories by Paresh Singh Rajput on Medium</title>
            <link>https://medium.com/@pareshsingh799?source=rss-83ae71bc6a41------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:05:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pareshsingh799/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Buzzwords Explained (The Terms Everyone Talks About)]]></title>
            <link>https://medium.com/@pareshsingh799/ai-buzzwords-explained-the-terms-everyone-talks-about-d93c8dc083b0?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/d93c8dc083b0</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-terms]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Fri, 03 Oct 2025 08:48:53 GMT</pubDate>
            <atom:updated>2025-10-03T08:48:53.680Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JSSvtMMn2mqvaOJB9kiEzQ.png" /></figure><p>AI buzzwords sound cool until you realize you’ve been nodding at meetings<br>without knowing what they mean. 😅<br>Don’t worry — here’s a blog for breaking down the jargon into pizza, coffee, and Netflix-level examples. 🍕☕📺</p><p>Because understanding AI shouldn’t feel like debugging at 3 AM. 🤖✨</p><h3>1. LLM (Large Language Model)</h3><p><strong>Technical:</strong> A type of AI model trained on massive amounts of text. Its main job is to predict the next token in a sequence, which allows it to understand and generate human-like language.</p><p><strong>Analogy:</strong> Like that one friend who has read every WhatsApp forward, every novel, and every news piece. They can talk about almost anything — but sometimes, they just make stuff up.</p><h3>2. RAG (Retrieval-Augmented Generation)</h3><p><strong>Technical:</strong> An approach where the AI retrieves relevant information from an external source (like a search engine or database) and uses it with its own knowledge to give better answers.</p><p><strong>Analogy:</strong> Your know-it-all cousin who finally Googles things before arguing at family dinners 😂 .</p><h3>3. Agentic AI (AI Agents)</h3><p><strong>Technical:</strong> AI that doesn’t just chat — it can plan, take actions, and use tools to complete tasks automatically, like booking tickets or analysing files.</p><p><strong>Analogy:</strong> Like hiring a personal assistant who not only reminds you about a trip but also books the flight, calls the cab, and sets an alarm so you don’t oversleep.</p><h3>4. Fine-Tuning</h3><p><strong>Technical:</strong> Taking a general-purpose model and training it on a smaller, domain-specific dataset so it becomes an expert in a niche task.</p><p><strong>Analogy:</strong> Like teaching your pet parrot to say “Welcome!” only when guests arrive. It already knows many words, but now it has a special skill.</p><h3>5. Prompt Engineering</h3><p><strong>Technical:</strong> The practice of designing clever and precise prompts so the AI understands exactly what you want.</p><p><strong>Analogy:</strong> Like asking your mom for money. Say it the wrong way, you’re broke. Say it the right way, she’s already reaching for her purse 😂 .</p><h3>6. Multimodal AI</h3><p><strong>Technical:</strong> AI that can understand and generate across multiple forms of input — text, images, audio, or even video.</p><p><strong>Analogy:</strong> Like your bestie who can read your texts, laugh at your memes, enjoy your playlist, and still judge your selfies.</p><h3>7. AI Hallucination</h3><p><strong>Technical:</strong> When AI generates false or made-up information that sounds convincing, because it’s predicting patterns without checking real-world facts.</p><p><strong>Analogy:</strong> Like your overconfident friend who swears Goa is in Gujarat. Wrong, but very confident.</p><h3>8. Foundation Model</h3><p><strong>Technical:</strong> A large model trained on a wide variety of data. It acts as a base that can later be adapted (via fine-tuning or prompting) for specific tasks.</p><p><strong>Analogy:</strong> Like plain rice. By itself, basic. Add butter chicken, sambhar, or curd — suddenly it’s a new dish.</p><h3>9. Synthetic Data</h3><p><strong>Technical:</strong> Artificially created data used for training when real-world data is scarce, private, or expensive to collect.</p><p><strong>Analogy:</strong> Like practicing cricket indoors with a plastic ball. Not the real game, but still helps sharpen your skills.</p><h3>10. Embeddings (Buzzword Version)</h3><p><strong>Technical:</strong> A way to represent words, sentences, or images as numerical vectors so the model can understand meaning and compare similarity.</p><p><strong>Analogy:</strong> Like condensing your whole personality into a Tinder bio. Not the full you, but enough to find a “match.”</p><h3>11. Tokens</h3><p><strong>Technical:</strong> Tokens are the smallest units of text that an AI model can process. Instead of looking at full sentences, AI breaks everything into smaller pieces — a word, part of a word, or even symbols. The model then predicts the next token step by step to build language.</p><p><strong>Analogy:</strong> Like eating a chocolate bar piece by piece. You don’t stuff the whole bar into your mouth, and AI doesn’t swallow a whole paragraph at once — it bites it into chunks.</p><h3>12. Parameters</h3><p><strong>Technical:</strong> Parameters are the internal values (also called weights) that a model uses to decide how tokens relate to each other. The more parameters a model has, the more patterns it can capture, and the “smarter” it appears. GPT-4 has over a trillion parameters.</p><p><strong>Analogy:</strong> Imagine billions of knobs in a giant sound system. Training the model is like adjusting those knobs until the music (answers) sounds right.</p><h3>13. Training Data</h3><p><strong>Technical:</strong> The large collection of text, images, and other data used to teach an AI model how language and patterns work. The broader and cleaner the data, the better the model’s understanding.</p><p><strong>Analogy:</strong> Like everything you’ve ever read, heard, or watched shaping how you think. AI just binges way more “content” than you ever could.</p><h3>14. Context Window</h3><p><strong>Technical:</strong> The maximum number of tokens an AI can handle at one time. It defines how much of your conversation or document the AI can remember while generating answers.</p><p><strong>Analogy:</strong> Like your short-term memory. Some people only remember what you said 2 minutes ago, while others can recall the entire day’s chat.</p><h3>15. Inference</h3><p><strong>Technical:</strong> Inference is the process of using a trained model to generate predictions or answers. No more training — just applying what it has already learned.</p><p><strong>Analogy:</strong> Like answering an exam from memory. You don’t learn again in the exam hall; you just recall what you studied before.</p><h3>16. Latency</h3><p><strong>Technical:</strong> The time it takes for an AI model to respond after you send a prompt. Lower latency = faster answers.</p><p><strong>Analogy:</strong> Like texting your crush — those 5 seconds of waiting feel like an eternity.</p><h3>17. Temperature</h3><p><strong>Technical:</strong> A setting that controls how random or creative AI responses are. Lower temperature = more precise and predictable answers. Higher temperature = more diverse, imaginative, or even weird ones.</p><p><strong>Analogy:</strong> At temperature 0, AI is like a serious lawyer giving safe replies. At temperature 1, it’s like your best friend at 2 a.m. giving crazy “what if” ideas.</p><h3>18. Epoch (Training Term)</h3><p><strong>Technical:</strong> One full cycle of running the entire training dataset through the model. More epochs generally mean better learning — but too many can lead to overfitting.</p><p><strong>Analogy:</strong> Like rewatching the whole <em>Friends</em> series from start to finish. Doing it 10 times = 10 epochs.</p><h3>19. Overfitting</h3><p><strong>Technical:</strong> When a model memorizes the training data too closely instead of learning general patterns. It performs well on old data but fails on new situations.</p><p><strong>Analogy:</strong> Like memorizing answers from a guidebook word-for-word and then panicking when the exam question is slightly different.</p><p>At the end of the day, AI isn’t some alien magic — it’s just math with a cool marketing team.So don’t get lost in the buzzwords. Learn them, laugh at them, and then go build something smarter than your yesterday’s code.</p><p>Because the only real ‘intelligence’ you need… is the courage to keep learning (and enough coffee to survive the errors). ☕😉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d93c8dc083b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lost in Tech Land? Here’s A Beginner’s Road map to Development]]></title>
            <link>https://medium.com/@pareshsingh799/lost-in-tech-land-heres-a-beginner-s-road-map-to-development-95a7af53f13e?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/95a7af53f13e</guid>
            <category><![CDATA[developer-roadmap]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[beginner-coder]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 11:56:01 GMT</pubDate>
            <atom:updated>2025-09-26T11:56:01.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CBsPIKtrBS3bzjby83vwGA.png" /></figure><p>So you typed “how to become a developer” and the internet threw you into a tornado of words: <strong><em>frontend, backend, full stack, React, Next.js, Laravel, Nest, Django, MVC</em>.</strong><br>Feels like Avengers assembling, but you don’t know who fights whom.</p><p>Relax. Let’s go part by part.</p><h3>Frontend — The Face of the App 😍</h3><p>Imagine your app is a human.</p><ul><li>The <strong>frontend</strong> is the face, clothes, hairstyle, makeup.</li><li>It’s what users see and interact with — buttons, text, colors, animations.</li></ul><p><strong>Tech stack here:</strong></p><ul><li>Basics: HTML, CSS, JavaScript.</li><li>Level Up: React (Next.js) , Angular, Vue.</li></ul><p>👉 If you love designing, making things pretty, or impressing people with buttons that “glow on hover” — start here.</p><h3>Backend — The Brain 🧠</h3><p>Now, a pretty face without a brain = disaster.</p><ul><li>The <strong>backend</strong> is the brain. It handles logic, talks to the database, and makes decisions.</li><li>Example: You press “Login.” The backend checks if you’re a real human or just your cat walking on the keyboard.</li></ul><p><strong>Tech stack here:</strong></p><ul><li>Node.js (JavaScript brain),</li><li>Python with Django/Flask,</li><li>PHP with Laravel,</li><li>Java with Spring,</li><li>Go, Rust (for superheroes).</li></ul><p>👉 If you enjoy solving puzzles, writing logic, or being the “smart kid” behind the scenes, backend is your vibe.</p><h3>Database — The Memory 🗄️</h3><p>Every brain needs memory. That’s the <strong>database</strong>.</p><ul><li>It stores usernames, passwords, posts, cat memes, literally everything.</li></ul><p><strong>Types:</strong></p><ul><li>Relational (SQL): MySQL, PostgreSQL (organized like spreadsheets).</li><li>NoSQL: MongoDB (like a messy but useful diary).</li></ul><p>👉 You don’t have to “love databases,” but you can’t escape them.</p><h3>How Frontend &amp; Backend Talk — The Friendship Bridge 🌉</h3><p>Imagine frontend (the face) and backend (the brain) are two people.</p><ul><li>The <strong>frontend</strong> is like: “Hey, user clicked ‘Login’!”</li><li>The <strong>backend</strong> replies: “Cool, give me their username &amp; password, I’ll check my database fridge.”</li></ul><p>How do they communicate? Through <strong>APIs</strong>.</p><p><strong>APIs: The Waiter Between Kitchen &amp; Table 🍽️ :</strong></p><p>Think of <strong>API (Application Programming Interface)</strong> as the waiter in a restaurant:</p><ul><li>Frontend (table) says: “One pizza please 🍕.”</li><li>API (waiter) carries the order to backend (kitchen).</li><li>Backend cooks it, puts it on a plate, and API brings it back to frontend.</li></ul><p>👉 APIs usually use <strong>HTTP requests</strong> (GET, POST, PUT, DELETE).</p><ul><li><strong>GET</strong>: “Give me data.”</li><li><strong>POST</strong>: “Take this new data.”</li><li><strong>PUT</strong>: “Update this data.”</li><li><strong>DELETE</strong>: “Remove this data.”</li></ul><p><strong>Example Flow 🔄 :</strong></p><ol><li>You fill a login form on frontend (React/HTML/CSS).</li><li>Frontend sends data → API request (POST /login).</li><li>Backend (Node/Django/Laravel) receives it, checks DB.</li><li>If correct → sends back a response: { &quot;status&quot;: &quot;success&quot;, &quot;user&quot;: &quot;Haribol&quot; }.</li><li>Frontend shows: “Welcome Haribol🎉”.</li></ol><p>Simple handshake 🤝.</p><h3>Without Connection?</h3><p>Frontend without backend = Instagram showing UI but never actually logging you in.<br>Backend without frontend = a brain locked in a jar, smart but no one to talk to.</p><h3>Libraries vs Frameworks — The Tools 🍴</h3><p>This is where 90% of students scratch their heads 🤯.<br> So let’s end the confusion. <a href="https://medium.com/@pareshsingh799/libraries-vs-frameworks-no-more-confusion-3e44d6814f2e">Detailed Blog</a></p><h3>Library = A Toolkit</h3><ul><li>A <strong>library</strong> is a collection of pre-written code you use whenever you need it.</li><li><strong>You are the boss</strong> → you decide when, where, and how to use it.</li><li>Think of it like a <strong>knife</strong> in the kitchen: you pick it up only when you want to chop onions.</li></ul><p><strong>Frontend Examples:</strong></p><ul><li><strong>React</strong> → Makes building UI components easier.</li><li><strong>jQuery</strong> (old but gold) → Helps with DOM manipulation.</li></ul><p><strong>Backend Examples:</strong></p><ul><li><strong>Express.js</strong> → A thin layer for routing &amp; middleware on top of Node.js.</li><li><strong>NumPy</strong> (Python) → Helps with calculations, not a full framework.</li></ul><h3>Framework = A Full Kitchen with Rules</h3><ul><li>A <strong>framework</strong> is an entire structure for your app.</li><li><strong>Framework is the boss</strong> → it tells you how things should be done.</li><li>Think of it like a <strong>restaurant kitchen</strong>: everything has a place, rules, and workflow. You just follow the system.</li></ul><p><strong>Frontend Examples:</strong></p><ul><li><strong>Next.js</strong> (built on top of React, but with routing, server-side rendering, SEO tools baked in).</li><li><strong>Angular</strong> (a complete frontend framework, not just UI components).</li></ul><p><strong>Backend Examples:</strong></p><ul><li><strong>Django (Python)</strong> → Comes with admin panel, auth, ORM, security.</li><li><strong>Laravel (PHP)</strong> → Beginner-friendly, elegant, all-in-one solution.</li><li><strong>Nest.js (Node.js)</strong> → Structured, modular, and TypeScript-based.</li></ul><h3>What to Learn After What? 🛣️</h3><p>Okay, now you’re probably thinking: <em>“Cool, but what should I actually learn in order?”</em><br> Here’s the no-nonsense roadmap:</p><ol><li><strong>Basics</strong>: HTML → CSS → JavaScript.</li><li><strong>Frontend Library</strong>: React (library).</li><li><strong>Frontend Framework (optional, once React is clear …not fully clear just hands on </strong>⚡<strong> )</strong>: Next.js.</li><li><strong>Backend Basics</strong>: Node.js + Express (library) OR Python basics.</li><li><strong>Backend Framework</strong>: Django (Python) OR Laravel (PHP) OR Nest.js (Node).</li><li><strong>Database</strong>: MySQL → PostgreSQL → MongoDB (later, when comfy).</li><li><strong>Projects</strong>: Mix frontend + backend via APIs.</li><li><strong>Advanced Tools</strong>: State management (Redux, Zustand), Auth, Deployment.</li></ol><h3>Final Words 🎤</h3><p>Becoming a developer is like playing a video game.</p><ul><li>First, learn to move your character (HTML/CSS/JS).</li><li>Then get weapons (backend &amp; database).</li><li>Then unlock superpowers (frameworks &amp; full-stack).</li><li>And finally, fight the boss level: building real projects.</li></ul><p><strong>Stop overthinking. Start building. Break it. Fix it. Repeat. <br>That’s the real roadmap.</strong></p><h3>Conclusion</h3><p>Once you start coding, you <strong>will</strong> feel stuck. That’s the rule of the game.<br>You’ll stare at errors, question your life choices, maybe even fight with semicolons. But here’s the truth: <strong>that’s how everyone learns.</strong></p><p>One of my senior colleagues once told me:<em>“The more you mess around, the more you find out.”</em></p><p>And that’s exactly it. Every bug you fix, every error you crush, every tiny project you complete … it makes you <strong>better than yesterday.</strong></p><p>That’s enough. That’s progress.<br>Keep going, keep breaking things, keep building. One day you’ll look back and realize you’ve come further than you ever thought. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95a7af53f13e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C With Spice : Memory Managers, Recursive Thinkers & Magic Spells ( Part-4)]]></title>
            <link>https://medium.com/@pareshsingh799/c-with-spice-memory-managers-recursive-thinkers-magic-spells-part-4-02842b51551d?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/02842b51551d</guid>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[factorials]]></category>
            <category><![CDATA[dynamic-memory-allocation]]></category>
            <category><![CDATA[preprocessor-directive]]></category>
            <category><![CDATA[c-programming]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Thu, 15 May 2025 06:34:05 GMT</pubDate>
            <atom:updated>2025-05-15T06:34:05.376Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XW0azDc18u-msPTNTWJH0w.png" /></figure><h3>C With Spice : Memory Managers, Recursive Thinkers &amp; Magic Spells ( Part-4)</h3><p><em>Welcome to the grand finale! You’ve learned variables, loops, structs, and now it’s time to talk to the real grown-ups of C. These are the features that make your code powerful, flexible, and… just a tiny bit scary (but in a fun way).</em></p><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><h3>🧠 Dynamic Memory — “malloc”, the Memory Hiring Manager</h3><p>Normal variables are like roommates — they move in when your code starts and leave when it’s done.</p><p>But sometimes, you need memory <strong>on the fly</strong>, depending on the situation. That’s where malloc and free come in — <strong>C’s HR department for memory.</strong></p><h4>💼 malloc in action:</h4><pre>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br><br>int main() {<br>    int *arr;<br>    int n = 5;<br><br>    arr = (int *)malloc(n * sizeof(int)); // Hire memory!<br><br>    if (arr == NULL) {<br>        printf(&quot;Hiring failed 😭\n&quot;);<br>        return 1;<br>    }<br><br>    for (int i = 0; i &lt; n; i++) {<br>        arr[i] = i * 10;<br>        printf(&quot;arr[%d] = %d\n&quot;, i, arr[i]);<br>    }<br><br>    free(arr); // Fire when done!<br>    return 0;<br>}</pre><h4>🔍 Why this matters:</h4><ul><li>malloc() = <strong>“Memory Allocation”</strong>, gives you memory at runtime.</li><li>free() = <strong>Return the memory to the universe</strong> when you&#39;re done.</li></ul><h4>Analogy:</h4><ul><li>malloc is like renting a room on Airbnb.</li><li>free is checking out before you get charged for an extra night.</li></ul><h3>🔁 Recursion — The Function with Identity Crisis</h3><p>Recursion is when a function <strong>calls itself</strong>.<br>Sounds weird? Let’s explain with a relatable example.</p><blockquote><strong><em>You asking your sibling to call mom. Your sibling says, “No, you call mom.”</em></strong><em> Eventually, someone calls mom. (Hopefully.)</em></blockquote><h4>🌀 Factorial with Recursion</h4><pre>#include &lt;stdio.h&gt;<br><br>int factorial(int n) {<br>    if (n == 0) return 1;<br>    return n * factorial(n - 1);<br>}<br><br>int main() {<br>    printf(&quot;5! = %d\n&quot;, factorial(5));<br>    return 0;<br>}</pre><h4>🧠 How this works:</h4><ul><li>Base case: n == 0, stop the madness.</li><li>Recursive case: n * factorial(n - 1), call yourself again with smaller input.</li></ul><h4>Analogy:</h4><ul><li>Trying to find a charger. You ask your brother. He asks your cousin. Cousin asks grandma. Grandma finally finds it. Everyone passes it back.</li></ul><h3>🧙 Preprocessor Directives — C’s Magic Spells</h3><p>Before your C code even <strong>compiles</strong>, it goes through a <strong>preprocessing stage</strong> where these spells (starting with #) do their thing.</p><h4>🪄 The most common spells:</h4><pre>#include &lt;stdio.h&gt; // Adds standard I/O functionality<br><br>#define PI 3.14 // Replaces PI with 3.14 EVERYWHERE</pre><h4>🧠 How this works:</h4><ul><li>#include – Like importing a pizza menu before you order.</li><li>#define – Create a shortcut word for a value or code.</li><li>#ifdef, #ifndef, etc. – Conditional compiling (like &quot;only compile this on Tuesdays when Mercury is in retrograde&quot;).</li></ul><h4>🧪 Example:</h4><pre>#include &lt;stdio.h&gt;<br>#define GREETING &quot;Hello, C Wizard!&quot;<br><br>int main() {<br>    printf(&quot;%s\n&quot;, GREETING);<br>    return 0;<br>}</pre><pre>//Output<br>Hello, C Wizard!</pre><blockquote><em>Imagine writing GREETING 20 times instead of “Hello, C Wizard!” — you’d be crying in semicolons.</em></blockquote><h3>🎯 Final Challenge: Memory Wizardry &amp; Recursion Drama</h3><p><strong>The Ultimate Combo:</strong></p><ol><li>Ask the user how many numbers they want to store.</li><li>Use malloc() to create an array.</li><li>Let the user input numbers.</li><li>Create a recursive function to find the sum of all numbers.</li><li>Print the result and clean up using free().</li></ol><p>💡 Bonus:</p><ul><li>Use #define to set a custom prompt like #define PROMPT &quot;Enter a number: &quot;</li><li>Be sure to handle if malloc fails gracefully (with a funny message, of course!)</li></ul><h3>🎉 You Did It, Code Warrior!</h3><p>You’ve now learned:</p><p>✅ Memory management with malloc/free<br> ✅ Self-calling drama with recursion<br> ✅ C&#39;s magic spells with preprocessor directives</p><p>From “Hello, world!” to memory allocation and function wizardry — you’ve come far 🥹💻</p><p><strong><em>Until next time — keep your pointers sharp, your syntax clean, and never trust a missing semicolon.</em></strong></p><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02842b51551d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C With Spice : Pointers, Packing & Personal Diaries ( Part-3)]]></title>
            <link>https://medium.com/@pareshsingh799/c-with-spice-pointers-packing-personal-diaries-part-3-6c74c421a72b?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c74c421a72b</guid>
            <category><![CDATA[pointers-in-c]]></category>
            <category><![CDATA[structure-in-c]]></category>
            <category><![CDATA[union-in-c]]></category>
            <category><![CDATA[file-handling]]></category>
            <category><![CDATA[c-programming]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Thu, 15 May 2025 04:50:33 GMT</pubDate>
            <atom:updated>2025-05-15T04:55:52.918Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFRKBMcSn75lGb_0Hqqzvg.png" /></figure><h3>C With Spice : Pointers, Packing &amp; Personal Diaries ( Part-3)</h3><p><em>Welcome back, brave learner! If you’ve survived </em><em>if, </em><em>for, arrays, and that one cursed semicolon – you’re officially not a beginner anymore. Now it’s time to handle memory, organise data, and even make your program keep secrets (in files).</em></p><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><h3>❤️ POINTERS — C’s Love Language: Clingy but Powerful</h3><p>Imagine someone so obsessed with you, they don’t remember your name — they just follow your <strong>home address</strong> everywhere.<br>That’s what a <strong>pointer</strong> is. It doesn’t hold a value, it holds the <strong>address</strong> of a variable. Like C saying:</p><blockquote>“I don’t care what your value is, just tell me where you live.”</blockquote><h4>👉 Basic Pointer Example</h4><pre>#include &lt;stdio.h&gt;<br><br>int main() {<br>    int age = 21;<br>    int *ptr = &amp;age;<br><br>    printf(&quot;Age: %d\n&quot;, age);<br>    printf(&quot;Address of age: %p\n&quot;, &amp;age);<br>    printf(&quot;Pointer pointing to age: %p\n&quot;, ptr);<br>    printf(&quot;Value at that address: %d\n&quot;, *ptr);<br><br>    return 0;<br>}</pre><h4>🔍 What’s going on?</h4><ul><li>int *ptr; means &quot;hey, I’m a pointer to an int&quot;.</li><li>&amp;age is the address-of operator – like giving your Google Maps location.</li><li>*ptr is the dereference operator – it means “go to this address and bring me what’s inside.”</li></ul><h4>🔍 Analogy:</h4><ul><li>age = Your snacks</li><li>&amp;age = The shelf number in the kitchen</li><li>ptr = A sticky note with that shelf number</li><li>*ptr = Someone going to that shelf and grabbing the snack</li></ul><h3>📦 STRUCTURES — Organize Like an Adult (Or at Least Pretend To)</h3><p>Let’s say you’re collecting data about a student: name, age, grade.<br>You could do:</p><pre>char name[50];<br>int age;<br>char grade;</pre><p>But that’s like carrying three separate bags for one person’s info. C’s like, “bro just get a <strong>structure</strong>”.</p><h4>👉 Example</h4><pre>#include &lt;stdio.h&gt;<br><br>struct Student {<br>    char name[50];<br>    int age;<br>    char grade;<br>};<br><br>int main() {<br>    struct Student s1 = {&quot;Riya&quot;, 18, &#39;A&#39;};<br><br>    printf(&quot;Name: %s\n&quot;, s1.name);<br>    printf(&quot;Age: %d\n&quot;, s1.age);<br>    printf(&quot;Grade: %c\n&quot;, s1.grade);<br><br>    return 0;<br>}</pre><h4>🧠 Why use structs?</h4><ul><li>Groups different <strong>data types</strong> under one name.</li><li>Keeps things neat — like packing socks, pants, and awkward memories into a single suitcase.</li></ul><h3>🎭 UNIONS — The Roommate Who Shares Everything</h3><p>Unions are like structs… <strong>but cheaper and more chaotic</strong>.<br>In a union, <strong>all members share the same memory</strong>. So, changing one affects the others.</p><h4>🤯 Example:</h4><pre>#include &lt;stdio.h&gt;<br><br>union Data {<br>    int i;<br>    float f;<br>};<br><br>int main() {<br>    union Data d;<br>    d.i = 10;<br>    printf(&quot;Integer: %d\n&quot;, d.i);<br><br>    d.f = 3.14;<br>    printf(&quot;Float: %.2f\n&quot;, d.f);<br>    printf(&quot;Integer now (spoiled): %d\n&quot;, d.i);<br><br>    return 0;<br>}</pre><h4>🧠 Why use unions?</h4><ul><li>Saves memory when you need <strong>one value at a time</strong>.</li><li>Like having one plate — you can eat curry, rice, or dessert, but <strong>not all at once</strong>.</li></ul><p><strong>NOTE:</strong> If you store a float after an int in the same union, the int will no longer be trustworthy. It’s like giving your password to two people and hoping they don’t overwrite each other.</p><h3>📓 FILE HANDLING — Letting C Write Its Own Diary</h3><p>Want your program to <strong>remember stuff even after it ends</strong>? That’s where file handling comes in.<br>Instead of printing to the screen, you print to a file.</p><blockquote>“Dear diary, today I looped 1000 times and still didn’t crash.”</blockquote><h4>✍️ Writing to a File</h4><pre>#include &lt;stdio.h&gt;<br><br>int main() {<br>    FILE *fptr = fopen(&quot;diary.txt&quot;, &quot;w&quot;);<br><br>    if (fptr == NULL) {<br>        printf(&quot;File creation failed 😢\n&quot;);<br>        return 1;<br>    }<br><br>    fprintf(fptr, &quot;Dear diary, I learned C today!\n&quot;);<br>    fclose(fptr);<br>    return 0;<br>}</pre><h4><strong>🧠 Explanation:</strong></h4><ul><li>fopen(&quot;file.txt&quot;, &quot;w&quot;) – Creates or overwrites file.</li><li>fprintf() – Writes text to file.</li><li>fclose() – Always close the file or C gets salty.</li></ul><h4>📖 Reading from a File</h4><pre>FILE *fptr = fopen(&quot;diary.txt&quot;, &quot;r&quot;);<br>char line[100];<br><br>while (fgets(line, sizeof(line), fptr)) {<br>    printf(&quot;%s&quot;, line);<br>}<br>fclose(fptr);</pre><h4>🧠 Why this matters:</h4><ul><li>You can store logs, scores, notes — anything!</li><li>Basically, giving your program memory beyond RAM.</li><li>It’s like your code whispering into a notebook: “I saw a segfault today. It was terrifying.”</li></ul><h3>🧪 Challenge Time: Pointer Chef 🍽️</h3><ul><li><strong>Your Mission:</strong></li></ul><ol><li>Create a struct Recipe with fields: char name[50], int calories</li><li>Use a <strong>pointer</strong> to access the struct and print its values.</li><li>Then, write that recipe into a file called menu.txt.</li><li>Finally, read from menu.txt and print the contents to the console.</li></ol><p><em>Extra spice: Add an array of 3 recipes and store them all in the file!</em></p><h3>🎉 Final Thoughts</h3><p>You now know:</p><ul><li>How to flirt with memory (pointers)</li><li>How to organize your data like a grown-up (structs)</li><li>How to save space by sharing… uncomfortably (unions)</li><li>And how to make your program immortal (file handling)</li></ul><p><strong>Next up in Part 4:</strong></p><ul><li>Dynamic memory (malloc — the boss of memory hiring)</li><li>Recursion (C calling itself like an overthinker)</li><li>Preprocessor directives (like #define, #include – C’s way of having secrets)</li></ul><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c74c421a72b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C With Spice : Decisions, Drama & Data ( Part-2)]]></title>
            <link>https://medium.com/@pareshsingh799/c-with-spice-decisions-drama-data-part-2-ec9377678d39?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec9377678d39</guid>
            <category><![CDATA[c-programming]]></category>
            <category><![CDATA[c-language]]></category>
            <category><![CDATA[beginers-guide]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Wed, 14 May 2025 09:21:38 GMT</pubDate>
            <atom:updated>2025-05-15T05:50:43.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKeiws-bA2Zx-lPyukHAVw.png" /></figure><h3>C With Spice : Decisions, Drama &amp; Data ( Part-2)</h3><p><em>AKA: Control Structures, Functions, Arrays &amp; Strings (told like a story your hungry cousin would love).</em></p><blockquote><strong><em>Missed Part 1?</em></strong><em> Don’t worry! Go </em><a href="https://medium.com/@pareshsingh799/meet-c-the-og-of-programming-part-1-02c820550fbc"><em>read it here</em></a><em>. We printed “Hello World”, learned how C starts from the bottom (like a real OG), and met our first semicolon.</em></blockquote><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><h3>🍱 CONTROL STRUCTURES — Making Decisions Like You’re Picking Dinner</h3><p>Imagine this: You open the fridge.</p><ul><li>If there’s pizza, eat pizza.</li><li>If not, check for a burger.</li><li>If nothing’s there… cry while eating dry cereal.</li></ul><p>That’s exactly what control structures do in C. They help your program <strong>make decisions</strong>, just like you do when you’re hungry, broke, or both.</p><h4>✅ if, else if, else – The Emotional Food Selector</h4><pre>#include &lt;stdio.h&gt;<br><br>int main() {<br>    int budget = 150;<br><br>    if (budget &gt; 500) {<br>        printf(&quot;Ordering sushi and bubble tea! 🍣🧋\n&quot;);<br>    } else if (budget &gt; 200) {<br>        printf(&quot;Let’s grab a pizza! 🍕\n&quot;);<br>    } else {<br>        printf(&quot;Instant noodles it is... again. 😭\n&quot;);<br>    }<br><br>    return 0;<br>}</pre><h4>🧠 Explanation:</h4><ul><li>if: Checks the first condition (budget &gt; 500).</li><li>If that fails, else if checks the second one.</li><li>If <em>everything</em> fails, else is your backup plan.</li></ul><p>So just like life:<br> → If rich → fine dining<br> → Else if okay-ish → junk food<br> → Else → maggie 🙂</p><h4>🗂️ switch – Like Ordering by Menu Number</h4><pre>int choice = 2;<br><br>switch (choice) {<br>    case 1:<br>        printf(&quot;You chose Pizza! 🍕\n&quot;);<br>        break;<br>    case 2:<br>        printf(&quot;Burger selected! 🍔\n&quot;);<br>        break;<br>    case 3:<br>        printf(&quot;Healthy... you chose Salad 🥗\n&quot;);<br>        break;<br>    default:<br>        printf(&quot;You chose nothing. Fasting? 😅\n&quot;);<br>}🧠 Explanation:</pre><h4>🧠 Explanation:</h4><ul><li>switch is perfect when you’re checking <em>one variable</em> for <em>many exact values</em>.</li><li>Think of choice as a restaurant menu.</li><li>break stops the switch from falling into the next case (unless you like chaos).</li></ul><p>Without break, if you choose pizza, you’ll get pizza, burger, and salad. Which sounds great... unless you&#39;re lactose intolerant.</p><h3>🔁 LOOPS — Doing Things Again &amp; Again (Like Procrastinating)</h3><p>Loops help us <strong>repeat code</strong> until a condition is met — like finishing a bag of chips one handful at a time.</p><h4>➿ while – Keep Doing Until It’s Time to Stop</h4><pre>int i = 0;<br><br>while (i &lt; 3) {<br>    printf(&quot;Snack #%d 🍪\n&quot;, i + 1);<br>    i++;<br>}</pre><h4>🧠 Explanation:</h4><ul><li>while checks the condition first.</li><li>If it’s true, it runs the loop.</li><li>If it’s false, it skips it completely.</li></ul><p>So if i starts at 5, you eat <strong>zero</strong> snacks. Sad.</p><h4>🔁 do-while – Eat First, Ask Later</h4><pre>int mood = 0;<br><br>do {<br>    printf(&quot;Trying a cookie. Maybe I feel better. 🍪\n&quot;);<br>    mood++;<br>} while (mood &lt; 1);</pre><h4>🧠 Explanation:</h4><ul><li>do-while <strong>runs once no matter what</strong>.</li><li>It checks the condition <strong>after</strong> the first run.</li></ul><p>Perfect for people who try something and then decide if they liked it.</p><h4>🔂 for – Gym Trainer Style Loop</h4><pre>for (int i = 1; i &lt;= 5; i++) {<br>    printf(&quot;Push-up #%d 💪\n&quot;, i);<br>}</pre><h4>🧠 Explanation:</h4><ul><li>Initialization (int i = 1) – Start</li><li>Condition (i &lt;= 5) – Keep going as long as true</li><li>Update (i++) – Increase counter</li></ul><p>Ideal when you <strong>know how many times</strong> you want to repeat.</p><h3>🛠️ FUNCTIONS — Reusing Excuses Like a Pro</h3><p><strong>Problem:</strong> Your teacher keeps asking why homework isn’t done.<br><strong>Solution:</strong> Instead of inventing 10 new excuses, just copy-paste your best one.</p><p>That’s what <strong>functions</strong> do. They let you <strong>write once and reuse</strong> anywhere.</p><h4>💁‍♀️ Basic Function Example</h4><pre>#include &lt;stdio.h&gt;<br><br>void excuse() {<br>    printf(&quot;I swear, my dog ate it. 🐶\n&quot;);<br>}<br><br>int main() {<br>    excuse(); // Call #1<br>    excuse(); // Call #2<br>    return 0;<br>}</pre><h4>🧠 Explanation:</h4><ul><li>void excuse() → Function definition. No return value (void).</li><li>You define it <em>once</em> and call it <em>wherever</em> you want.</li><li>Helps you avoid writing the same code again and again (and again…).</li></ul><h3>🛍️ ARRAYS — One Name, Many Snacks</h3><p>Let’s say you bought 3 snacks: chips, cookies, and chocolate.<br>Do you carry each in your hands separately? No!</p><p>You throw them in one <strong>bag</strong> and access them like:</p><ul><li>bag[0] → Chips</li><li>bag[1] → Cookies</li><li>bag[2] → Chocolate</li></ul><p>That’s an array.</p><pre>#include &lt;stdio.h&gt;<br><br>int main() {<br>    int snacks[3] = {200, 300, 400}; // Calories<br><br>    printf(&quot;Chips: %d cal\n&quot;, snacks[0]);<br>    printf(&quot;Cookies: %d cal\n&quot;, snacks[1]);<br>    printf(&quot;Chocolate: %d cal\n&quot;, snacks[2]);<br><br>    return 0;<br>}</pre><h4>🧠 Explanation:</h4><ul><li>Arrays store <strong>multiple values</strong> of the same type.</li><li>Indexing starts from <strong>0</strong>, because C believes in “zero-based hustle”.</li></ul><h3>💌 STRINGS — Texting in C</h3><p>In C, <strong>strings</strong> are actually just <strong>arrays of characters</strong>.<br> Each letter gets its own room, and the string ends with a special signal: &#39;\0&#39; (null terminator). Like a period at the end of a sentence.</p><h4>📏 Finding Length with strlen()</h4><pre>#include &lt;stdio.h&gt;<br>#include &lt;string.h&gt;<br><br>int main() {<br>    char msg[] = &quot;Hey&quot;;<br>    int length = strlen(msg);<br>    printf(&quot;Your message is %d characters long! 📝\n&quot;, length);<br>}</pre><h4>➕ Combining with strcat()</h4><pre>char greeting[50] = &quot;Hello, &quot;;<br>strcat(greeting, &quot;World!&quot;);<br>printf(&quot;%s\n&quot;, greeting);</pre><h4>🧠 Tips:</h4><ul><li>strcat() joins two strings.</li><li>Make sure the destination string has <strong>enough space</strong>.</li><li>Always #include &lt;string.h&gt; for string functions.</li></ul><h4>🧪 <strong>Challenge Time: Hungry Coder’s Mini Mission</strong></h4><p>Write a program that:</p><ol><li>Asks the user for a number from 1 to 3.</li><li>Uses a switch to print a meal:</li></ol><ul><li>1 = Pizza 🍕</li><li>2 = Burger 🍔</li><li>3 = Salad 🥗</li></ul><p>3. Then, use a for loop to say &quot;Nom Nom...&quot; that many times.</p><p>4. Then call a function called thankYou() that prints:<br> &quot;Thanks for feeding me, human! 😄&quot;</p><p><em>Bonus points if you give all food items calories using an array and print them with the meal!</em></p><h3>✨ Final Thought</h3><p>If you’re still here, congrats! You’ve:</p><ul><li>Made decisions (if/switch)</li><li>Repeated stuff without complaining (loops)</li><li>Reused logic like a pro (functions)</li><li>Packed multiple things (arrays )</li><li>Sent your first love note in code (strings)</li></ul><p>Next up :</p><ul><li>Pointers (C’s love language)</li><li>Structures &amp; Unions (for people who like folders and mess)</li><li>File Handling (aka, making your program write a diary)</li></ul><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec9377678d39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meet C — The OG of Programming (Part-1)]]></title>
            <link>https://medium.com/@pareshsingh799/meet-c-the-og-of-programming-part-1-02c820550fbc?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/02c820550fbc</guid>
            <category><![CDATA[c-programming]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[trending]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Tue, 13 May 2025 17:41:39 GMT</pubDate>
            <atom:updated>2025-05-15T04:54:44.142Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lj3SMLuFoaUE0kpzxfyaKQ.png" /></figure><h3>Meet C — The OG of Programming (Part-1)</h3><h3>🧓<em>The Grandfather Who Still Beats You at Chess (and Programming).</em></h3><p>Before Java wore a tie ☕ and Python became trendy 🐍, there was C – the grandpa of modern programming languages. Not the one who forgets things, but the one who teaches you <em>why</em> you forgot in the first place.</p><p>Why learn C?</p><ul><li>It&#39;s <strong>fast</strong>, like your friend who runs when the bill comes.</li><li>It&#39;s <strong>simple</strong>, in the “don’t expect it to do the dishes for you” way.</li><li>And it teaches you <strong>how computers actually think</strong>. Spoiler: they&#39;re logical, but not that smart.</li></ul><h3>🏗️ Structure of a C Program</h3><p>Let’s write the world’s most basic C program, the classic <strong>Hello, World!</strong> (a polite way to say “Hey Computer, I’m here now.”)</p><pre>#include &lt;stdio.h&gt; // This is like importing WhatsApp to say &#39;hi&#39;<br><br>int main() {<br>    // This is where the party starts 🍕<br>    printf(&quot;Hello, World!\n&quot;); // Print this on screen, duh!<br>    return 0; // Say goodbye nicely<br>}</pre><h4>💬 What’s going on here?</h4><ul><li>#include &lt;stdio.h&gt; → You&#39;re inviting the Standard Input Output library. Basically, telling the program, “Hey, I might need to talk to someone.”</li><li>int main() → Main function is where your code starts running. It’s the front door of your program. 🚪</li><li>{} → Curly braces are like hugging your code – they show what belongs together.</li><li>printf(&quot;Hello, World!\n&quot;); → You’re printing a message. \n just means go to the next line, like pressing Enter.</li><li>return 0; → This is your program saying, “All good, boss. I’m done.”</li></ul><h3>🎒 Variables and Data Types</h3><p>Think of <strong>variables</strong> as boxes with labels on them. You can put stuff in them and use them later. Like storing cookies in a jar labelled cookieCount.</p><pre>int age = 25; // Integer = whole number, not your age in dog years<br>float height = 5.9; // Float = decimal numbers, perfect for fake heights<br>char grade = &#39;A&#39;; // Char = single character, like your school grade</pre><h4>🧠 Why these data types?</h4><ul><li>int = Whole numbers, like how many samosas you ate 🍽️</li><li>float = Decimal numbers, like how much you regret the samosas 🫃</li><li>char = Single character, like the first letter of your ex’s name 😅</li></ul><h3>🧮 Operators — Math and Mood Swings</h3><p>In C, we have operators for everything:</p><pre>int a = 10, b = 5;<br>int sum = a + b;     // Addition<br>int diff = a - b;    // Subtraction<br>int prod = a * b;    // Multiplication<br>int div = a / b;     // Division (No remainder!)<br>int mod = a % b;     // Modulus = What&#39;s left after dividing</pre><h4>💡 Fun note:</h4><p>If you divide by 0 in C, it crashes harder than your plans for gym on Monday.</p><h3>🗣️ Input/Output — Talking to Your Code</h3><pre>#include &lt;stdio.h&gt;<br><br>int main() {<br>    int age;<br>    printf(&quot;Enter your age: &quot;);<br>    scanf(&quot;%d&quot;, &amp;age); // Read a number and store it in &#39;age&#39;<br><br>    printf(&quot;You are %d years old!\n&quot;, age);<br>    return 0;<br>}</pre><h4>🗯️ What’s this %d &amp; &amp;age?</h4><ul><li>%d = placeholder for a number</li><li>&amp;age = “Here’s the address of the variable ‘age’, go store it there.” (Yes, C likes to know where your stuff lives) .</li></ul><h3>💬 Comments — Talking to Future You</h3><pre>// This is a single-line comment<br>/* <br>   This is a <br>   multi-line comment <br>*/</pre><ul><li>Use comments to explain what’s happening or to leave passive-aggressive notes for your future self.</li></ul><blockquote>“I don’t know why this works, but don’t touch it.” — every C programmer ever.</blockquote><h3>🔚 Conclusion — What You Learned (Without Realizing It)</h3><ul><li>You now know what a C program looks like</li><li>You understand how to declare variables</li><li>You printed stuff on the screen and took input</li><li>And you did it while laughing (hopefully)</li></ul><h3>💡 Mini Challenge:</h3><p>Write a program that asks for your name and age, then says:</p><pre>Hello, [name]! You look young for [age] years old!</pre><p>Need help? Comment below or message your grandpa (aka me 😄).<br>here find the next part . <a href="https://medium.com/@pareshsingh799/c-with-spice-decisions-drama-data-part-2-ec9377678d39">PART-2</a></p><p><strong>Find the full series here</strong> : <a href="https://medium.com/@pareshsingh799/list/tech-with-fun-c-programming-86af2b8f5841">Tech With Fun — C Programming</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02c820550fbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDLC in Laravel]]></title>
            <link>https://medium.com/@pareshsingh799/sdlc-in-laravel-a-developers-powerful-and-seamless-journey-f1c39fc51d5a?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1c39fc51d5a</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[solid]]></category>
            <category><![CDATA[sdlc]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 12:05:42 GMT</pubDate>
            <atom:updated>2025-01-22T04:05:40.903Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ohXx_HRVmGLAfC7zCtg5VA.png" /></figure><p>Ah, <strong>Software Development Life Cycle (SDLC)</strong> — the magical process that transforms caffeine, hope, and occasional despair into a fully functional app. For those of us using Laravel, this process is smoother, though no less hilarious.</p><p>Let’s dive into the stages of SDLC, Laravel-style, with plenty of code snippets, funny quips, and relatable moments to keep you engaged. Buckle up, developer! It’s going to be a wild ride.</p><h3>1. Requirement Analysis</h3><p>In SDLC , this stage feels like trying to decode a cryptic text from a friend who’s had too much coffee. Clients will often give you requirements that sound something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBpX6bhF9stREZB9VCwzUg.png" /></figure><h3>Laravel Angle:</h3><p>It doesn’t have a built-in “mind-reading” package (yet), but it does help organise requirements effectively. Tools like <strong>Trello</strong>, <strong>Notion</strong>, or <strong>Google Docs</strong> integrate well into the planning phase. You can even write quick pseudo-code or ER diagrams directly into your notes.</p><h3>2.Planning</h3><p>Planning in SDLC is like drawing a treasure map — but you’re not sure where the treasure is, or if it even exists. In Laravel, this means deciding:</p><p><strong>What packages to use:</strong></p><ul><li>Authentication? (Hint: Breeze or Jetstream).</li><li>Permissions? (spatie/laravel-permission is a lifesaver).</li></ul><p><strong>How to structure the app:</strong></p><ul><li>Should you use a monolithic structure or microservices?</li><li>How will you scale when your app goes viral (fingers crossed)?</li></ul><h3>Example Planning Thought Process:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5C697XZqWgxMdHrpYYyOeQ.png" /></figure><p>Here’s where Laravel’s ecosystem shines. Tools like <strong>Horizon</strong> for queue management, <strong>Telescope</strong> for debugging, and <strong>Forge</strong> for deployment help you plan the right resources for each phase in SDLC.</p><h3>3. Design</h3><p>Now comes the fun part of SDLC : turning abstract ideas into something visually appealing. Here’s where designers hand over jaw-dropping Figma files that look great on their retina display but break on every browser under the sun.</p><h3>Laravel Angle:</h3><p>Laravel’s <strong>Blade templates</strong> and <strong>Tailwind CSS</strong> make implementing responsive designs a breeze. Whether it’s a dashboard, landing page, or complex user interface, you can whip up something visually stunning in no time.</p><p><strong>Example Blade Template:</strong></p><pre>&lt;div class=&quot;bg-gradient-to-r from-purple-400 via-pink-500 to-red-500 text-white p-8 rounded&quot;&gt;<br>    &lt;h1 class=&quot;text-4xl font-bold&quot;&gt;Welcome to Laravel Wonderland&lt;/h1&gt;<br>    &lt;p class=&quot;mt-2&quot;&gt;Where bugs are just misunderstood features.&lt;/p&gt;<br>&lt;/div&gt;</pre><blockquote>And voila! A page that screams “modern developer” while hiding the chaos underneath.</blockquote><h3>4. Development</h3><p>Time to get your hands dirty. This is where Laravel’s magic shines. You write code, feeling like a wizard, only to realize later that you’ve created spaghetti (again).</p><h3>Building Controllers:</h3><p>It makes creating functionality as simple as:</p><pre>php artisan make:controller PizzaController</pre><p>And then:</p><pre>// PizzaController.php<br>public function order($type)<br>{<br>    if ($type === &#39;pineapple&#39;) {<br>        return response()-&gt;json([&#39;error&#39; =&gt; &#39;Pineapple on pizza? Really?&#39;], 400);<br>    }<br><br>   return response()-&gt;json([&#39;message&#39; =&gt; &quot;Here&#39;s your $type pizza!&quot;], 200);<br>}</pre><blockquote><strong>Pro Tip: Always comment your code. If not for yourself, then for the poor soul (possibly you) who has to revisit it in six months.</strong></blockquote><p><strong>Relatable Debugging Moment:</strong></p><p>You’re five hours into a coding marathon and your brain whispers:</p><blockquote>“What if it’s not a bug? What if… it’s a feature?”</blockquote><h3>5. Testing</h3><p>In SDLC , Testing is where you find out just how fragile your code really is. If development is cooking a gourmet meal, testing is dropping it to see if it survives.</p><h3>Testing Tools:</h3><p>It comes with PHPUnit baked in. Writing tests might seem tedious, but it saves you from those 3 a.m. production crises.</p><p><strong>Example Test:</strong></p><pre>public function test_pizza_order()<br>{<br>    $response = $this-&gt;get(&#39;/order/margherita&#39;);<br>    $response-&gt;assertStatus(200)<br>             -&gt;assertJson([&#39;message&#39; =&gt; &quot;Here&#39;s your margherita pizza!&quot;]);<br>}</pre><blockquote><strong>Reality Check: You’ll still push untested code to production because, “It works on my machine!”</strong></blockquote><h3>6. Deployment</h3><p>The moment of truth. You’ve triple-checked everything, only to hear a tiny voice in your head: <em>“Did I run migrations?”</em></p><h3>Deployment in Laravel:</h3><p>Tools like <strong>Forge</strong> and <strong>Envoyer</strong> make deploying apps a breeze. But if you’re old-school, here’s the manual process:</p><pre>git push production main<br>ssh your-server<br>php artisan migrate --force</pre><blockquote><strong>Warning: Always back up your database. Always.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Zyl_TjnmvjnFFTskbdkMA.png" /></figure><h3>7. Maintenance</h3><p>Weeks (or days) after deployment, you’re back fixing bugs or adding features. Maintenance feels like solving a mystery: <em>“What did Past Me mean by this variable name?”</em></p><h3>Tools for Maintenance:</h3><ul><li><strong>Telescope:</strong> Debugging made easy.</li><li><strong>Log Viewer:</strong> Your best friend when production errors arise.</li></ul><p><strong>Real Life scenario</strong></p><blockquote><strong><em>A user submits a ticket: </em>“The app says ‘Something went wrong’ but doesn’t tell me what went wrong.”</strong></blockquote><p>You, combing through logs:</p><pre>[ERROR] Undefined variable: thingy in App/Http/Controllers/DashboardController.php</pre><blockquote><strong>“Oh, right… I named it </strong><strong>thingy. Great.&quot;</strong></blockquote><h3>Conclusion</h3><p><strong><em>SDLC with Laravel isn’t just a process — it’s an adventure. From hilarious client requests to the satisfaction of seeing your app live, every step brings its own set of challenges and triumphs. Laravel’s ecosystem simplifies the journey, allowing you to focus on what matters: writing code and occasionally laughing at your own mistakes</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1c39fc51d5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design: The Unsung Hero of Software Development]]></title>
            <link>https://medium.com/@pareshsingh799/system-design-the-unsung-hero-of-software-development-a8b85444f5e2?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8b85444f5e2</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 12:05:09 GMT</pubDate>
            <atom:updated>2025-01-06T07:23:18.693Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*be4wChu3OPbVM7nLGu_BbQ.png" /></figure><p>Imagine this: you walk into a kitchen to bake a cake. You have the ingredients, the recipe, and the motivation (probably a birthday or a bad day that needs sweetening). But here’s the catch — there’s no oven, no mixing bowls, and the fridge door doesn’t close properly. No matter how great your cake recipe is, the kitchen setup — or lack thereof — has doomed your masterpiece from the start.</p><p>That’s what software development feels like without system design. The code might be genius, the idea might be revolutionary, but if the “kitchen” (your system architecture) lacks order and forethought, the outcome will probably be… a mess.</p><p>In this blog, we’ll explore <strong>technical concepts in system design</strong> that every developer should know, and we’ll sprinkle in some humour to make sure you don’t doze off halfway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rurWND1EI_TLoCFRtp1jOg.jpeg" /></figure><h3>What is System Design?</h3><p>System design is the art of planning and structuring how various components of a software application interact, scale, and handle loads efficiently. It bridges the gap between high-level requirements and the actual implementation.</p><p>Imagine building a house. Would you start by hammering nails into random wooden planks? No! You’d create a blueprint first. Similarly, system design helps us lay out the “blueprint” for our application before writing the first line of code.</p><p>Skipping system design is like saying, <em>“Let’s figure it out as we go.”</em></p><h3>Core Technical Concepts in System Design</h3><p>Let’s dive into some fundamental concepts every developer should understand, with relatable analogies to keep it fun.</p><h3>1. Load Balancing: Sharing the Traffic</h3><p><strong>Definition:</strong> Load balancers distribute incoming network traffic across multiple servers to prevent any single server from being overwhelmed.</p><p><strong>How It Works:</strong></p><ul><li><strong>DNS Load Balancing:</strong> Distributes traffic at the domain name level.</li><li><strong>Application Layer Balancing:</strong> Handles traffic based on specific requests (e.g., /login vs. /checkout).</li></ul><p><strong>Analogy:</strong> Think of a load balancer as a wedding planner. Instead of 200 guests crowding around one buffet table (a single server), the planner opens multiple food stations (servers) to ensure everyone is fed without chaos.</p><h3>2. Caching: A Shortcut for Speed</h3><p><strong>Definition:</strong> Caching stores frequently accessed data temporarily to reduce the load on the primary storage or computation layer.</p><p><strong>Types of Caching:</strong></p><ul><li><strong>Database Caching:</strong> Keeps results of common queries in memory.</li><li><strong>Client-Side Caching (Browser Cache):</strong> Saves web pages locally for faster reloads.</li><li><strong>Server-Side Caching:</strong> Stores processed results (e.g., rendered HTML) for repeated requests.</li></ul><p><strong>Tech Stack Examples:</strong></p><ul><li><strong>Redis</strong> and <strong>Memcached</strong> are popular choices for in-memory caching.</li></ul><p><strong>Analogy:</strong> It’s like a coffee shop barista remembering your order after your third visit. Instead of asking every single time, they prepare it as soon as they see you walk in.</p><h3>3. Database Sharding: Divide and Conquer</h3><p><strong>Definition:</strong> Sharding splits a database into smaller, more manageable pieces (shards) to distribute the data and improve performance.</p><p><strong>Example Use Case:</strong> A social media app might store users in different shards based on geographic location.</p><p><strong>Challenges:</strong></p><ul><li>Cross-shard queries can become complex.</li><li>Ensuring data consistency across shards is tricky.</li></ul><p><strong>Analogy:</strong> Imagine splitting a classroom into smaller groups for a project. Each group works independently on a part of the task, and then they combine their efforts. Without proper coordination, chaos ensues.</p><h3>4. Message Queues: The Post Office of System Design</h3><p><strong>Definition:</strong> A message queue decouples services by allowing them to communicate asynchronously. Messages are sent to a queue, and the receiving service processes them when ready.</p><p><strong>Tech Stack Examples:</strong></p><ul><li><strong>RabbitMQ</strong>, <strong>Kafka</strong>, <strong>Amazon SQS</strong>.</li></ul><p><strong>Use Case:</strong></p><ul><li>Processing background jobs (e.g., sending emails, resizing images).</li><li>Handling spikes in traffic without overwhelming the system.</li></ul><p><strong>Analogy:</strong> It’s like a post office. You drop off a letter (message), and the recipient collects it later. There’s no need for both of you to be present at the same time.</p><h3>5. Rate Limiting: Play Fair</h3><p><strong>Definition:</strong> Rate limiting restricts the number of requests a user or system can make to prevent abuse and ensure fair resource distribution.</p><p><strong>How It Works:</strong></p><ul><li><strong>Fixed Window Algorithm:</strong> Allows a certain number of requests within a fixed time period.</li><li><strong>Leaky Bucket Algorithm:</strong> Requests are queued and processed at a steady rate.</li></ul><p><strong>Example Use Case:</strong> APIs limit how many requests a client can make to avoid overloading the system.</p><p><strong>Analogy:</strong> It’s like a bouncer at a club. Too many people trying to get in at once? He enforces a “one in, one out” policy.</p><h3>6. Event-Driven Architecture: Go With the Flow</h3><p><strong>Definition:</strong> In an event-driven system, components communicate through events rather than direct calls.</p><p><strong>Example Use Case:</strong></p><ul><li>A notification system that triggers an email when a user signs up.</li></ul><p><strong>Tech Stack Examples:</strong></p><ul><li><strong>AWS Lambda</strong> and <strong>Google Pub/Sub</strong> are common tools for event-driven architectures.</li></ul><p><strong>Analogy:</strong> It’s like a birthday surprise. The cake, balloons, and guests all arrive when they get the signal (the birthday boy walking in).</p><h3>7. CAP Theorem: Pick Two</h3><p><strong>Definition:</strong> In distributed systems, the CAP theorem states that you can only have two of the following three:</p><ul><li><strong>Consistency:</strong> Every read gets the most recent write.</li><li><strong>Availability:</strong> The system is always responsive.</li><li><strong>Partition Tolerance:</strong> The system continues to function despite network partitions.</li></ul><p><strong>Example:</strong></p><ul><li><strong>CP Systems (Consistency + Partition Tolerance):</strong> Banks prioritise accurate balances over immediate availability.</li><li><strong>AP Systems (Availability + Partition Tolerance):</strong> Social media platforms prioritise availability but may show slightly stale data.</li></ul><p><strong>Analogy:</strong> It’s like trying to be fast, cheap, and good at the same time. Pick two — because life isn’t that fair.</p><h3>Putting It All Together: Designing a Scalable Chat App</h3><p>System design is the art of planning and structuring how various components of a software application interact, scale, and handle loads efficiently. It bridges the gap between high-level requirements and the actual implementation.</p><p>Let’s say you’re building the next big messaging app. Here’s how system design comes into play:</p><ol><li><strong>Load Balancing:</strong> Distribute user requests across multiple servers.</li><li><strong>Caching:</strong> Store user profiles and chat histories for quick access.</li><li><strong>Database Sharding:</strong> Split users into shards based on geographic regions.</li><li><strong>Message Queues:</strong> Handle message delivery asynchronously to avoid delays.</li><li><strong>Rate Limiting:</strong> Prevent users from spamming the system with too many messages.</li><li><strong>Event-Driven Architecture:</strong> Trigger notifications and updates based on user actions.</li></ol><h3>Why System Design is Your Best Friend</h3><ul><li><strong>Scalability:</strong> Your app doesn’t crumble under a sudden traffic spike.</li><li><strong>Reliability:</strong> Users don’t lose data or experience crashes.</li><li><strong>Efficiency:</strong> Resources are used wisely, saving you money on infrastructure.</li><li><strong>Future-Proofing:</strong> Makes it easier to add new features without breaking the existing ones.</li></ul><h3>Final Thought: Design Before You Dive</h3><p>Good system design is like setting the table before a meal. It might seem tedious, but it ensures everyone has a plate, fork, and no one’s stuck eating soup with a knife.</p><p>So, next time you start a project, remember: don’t just write code. Design the system. Your future self will thank you (and so will Steve, your overworked delivery driver).</p><h3>Conclusion: Building Bridges, Not Walls</h3><p>System design is the foundation upon which every successful software application is built. It’s not just about creating something that works — it’s about crafting a solution that scales, performs efficiently, and adapts gracefully to change. Without it, even the most brilliant code can collapse under the weight of real-world challenges.</p><p>As developers, we often rush to start coding because it feels productive. But a well-thought-out system design saves us from sleepless nights debugging, rewriting, or explaining to our boss why the app went down during peak traffic.</p><p>Remember, great software isn’t just built — it’s designed. So take a step back, sketch the blueprint, think through the scenarios, and build something that not only works today but thrives tomorrow.</p><p><strong><em>Because in the end, a well-designed system is like a symphony — everything in harmony, playing its part to create something truly remarkable. And trust me, you’d rather be the conductor of a symphony than the firefighter of a tech disaster.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8b85444f5e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SOLID Principles in Laravel]]></title>
            <link>https://medium.com/@pareshsingh799/mastering-solid-principles-in-laravel-721ac036c1a4?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/721ac036c1a4</guid>
            <category><![CDATA[solid]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Wed, 18 Dec 2024 12:36:16 GMT</pubDate>
            <atom:updated>2025-01-20T12:09:47.351Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ox9G2dd0MO2oHH6z0M5tkg.png" /></figure><p>When you hear “SOLID principles,” do you think of a rock band or maybe the feeling of relief after completing a big meal? Nope, SOLID principles are actually a set of design principles that can turn your Laravel code into a masterpiece (or at least stop it from looking like spaghetti).</p><p>Let’s dive into SOLID principles and learn how to implement them in Laravel — all while having a bit of fun!</p><p><strong>What Are SOLID Principles?</strong></p><p>SOLID is an acronym for five principles that make software designs easier to understand, extend, and maintain. Think of it as the Avengers of programming principles: each hero (principle) is strong on their own, but together, they save your code from chaos.</p><p>Here’s what SOLID stands for:</p><ul><li><strong>S</strong>ingle Responsibility Principle (SRP)</li><li><strong>O</strong>pen/Closed Principle (OCP)</li><li><strong>L</strong>iskov Substitution Principle (LSP)</li><li><strong>I</strong>nterface Segregation Principle (ISP)</li><li><strong>D</strong>ependency Inversion Principle (DIP)</li></ul><h3>Single Responsibility Principle (SRP)</h3><p><em>“One class, one job. Period.”</em></p><p>Imagine your manager gives you a to-do list with 50 items. Overwhelming, right? Classes feel the same way when you dump multiple responsibilities on them. The Single Responsibility Principle says a class should have <strong>only one reason to change</strong>.</p><p><strong>Example</strong></p><p>A controller is NOT your dumping ground for business logic, database queries, or secret cookie recipes. Let’s clean it up:</p><p><strong>Bad Example</strong></p><pre>class OrderController extends Controller<br>{<br>    public function store(Request $request)<br>    {<br>        $order = new Order();<br>        $order-&gt;user_id = $request-&gt;user()-&gt;id;<br>        $order-&gt;total = $this-&gt;calculateTotal($request-&gt;items);<br>        $order-&gt;save();<br><br>        $this-&gt;sendOrderEmail($order);<br><br>        return response()-&gt;json([&#39;success&#39; =&gt; true]);<br>    }<br><br>    private function calculateTotal($items)<br>    {<br>        // Calculating total...<br>    }<br><br>    private function sendOrderEmail($order)<br>    {<br>        // Sending email...<br>    }<br>}</pre><p><strong>Good Example</strong><br>Break this into separate responsibilities:</p><pre>class OrderController extends Controller<br>{<br>    public function store(Request $request, OrderService $orderService)<br>    {<br>        $orderService-&gt;createOrder($request);<br><br>        return response()-&gt;json([&#39;success&#39; =&gt; true]);<br>    }<br>}</pre><pre>class OrderService<br>{<br>    public function createOrder($request)<br>    {<br>        $order = new Order();<br>        $order-&gt;user_id = $request-&gt;user()-&gt;id;<br>        $order-&gt;total = $this-&gt;calculateTotal($request-&gt;items);<br>        $order-&gt;save();<br><br>        $this-&gt;sendOrderEmail($order);<br>    }<br><br>    private function calculateTotal($items)<br>    {<br>        // Calculating total...<br>    }<br><br>    private function sendOrderEmail($order)<br>    {<br>        // Sending email...<br>    }<br>}</pre><p>Why? If the email-sending logic changes, you touch OrderService, not OrderController. Responsibility: clear. Code: happy.</p><h3>Open/Closed Principle (OCP)</h3><p><em>“Open for extension, closed for modification.”</em></p><p>Think of OCP as that no-touch sign at a museum: extend functionality without breaking or modifying existing code.</p><p><strong>Example</strong></p><p>Let’s say we’re calculating discounts.</p><p><strong>Bad Example</strong></p><pre>class DiscountCalculator<br>{<br>    public function calculate($order)<br>    {<br>        if ($order-&gt;user-&gt;isVip()) {<br>            return $order-&gt;total * 0.2; // VIP discount<br>        }<br><br>        if ($order-&gt;total &gt; 100) {<br>            return $order-&gt;total * 0.1; // Bulk discount<br>        }<br><br>        return 0;<br>    }<br>}</pre><p>What happens if tomorrow you introduce a “Black Friday” discount? Boom — modification chaos!</p><p><strong>Good Example</strong><br>Use polymorphism:</p><pre>interface Discount<br>{<br>    public function calculate($order);<br>}<br><br>class VipDiscount implements Discount<br>{<br>    public function calculate($order)<br>    {<br>        return $order-&gt;user-&gt;isVip() ? $order-&gt;total * 0.2 : 0;<br>    }<br>}<br><br>class BulkDiscount implements Discount<br>{<br>    public function calculate($order)<br>    {<br>        return $order-&gt;total &gt; 100 ? $order-&gt;total * 0.1 : 0;<br>    }<br>}</pre><p>You can now extend this without modifying the original classes. Add a BlackFridayDiscount or even a PizzaLoverDiscount!</p><h3>Liskov Substitution Principle (LSP)</h3><p><em>“Derived classes must be substitutable for their base classes.”</em></p><p>If your code screams in pain when you replace a parent class with a child class, you’ve broken LSP. This principle ensures sub classes behave as expected without surprises.</p><p><strong>Example</strong></p><p>Let’s take an example of birds :</p><p><strong>Bad Example</strong></p><pre>class Bird<br>{<br>    public function fly()<br>    {<br>        return &quot;I’m flying!&quot;;<br>    }<br>}<br><br>class Penguin extends Bird<br>{<br>    public function fly()<br>    {<br>        throw new Exception(&quot;Penguins can’t fly!&quot;);<br>    }<br>}</pre><p>A flying penguin? Sounds like a new Marvel character.</p><p><strong>Good Example</strong><br>Separate behaviours appropriately:</p><pre>interface Bird<br>{<br>    public function move();<br>}<br><br>class Sparrow implements Bird<br>{<br>    public function move()<br>    {<br>        return &quot;I’m flying!&quot;;<br>    }<br>}<br><br>class Penguin implements Bird<br>{<br>    public function move()<br>    {<br>        return &quot;I’m swimming!&quot;;<br>    }<br>}</pre><p>Now your code won’t crash at the zoo.</p><h3>Interface Segregation Principle (ISP)</h3><p><em>“Don’t force classes to implement what they don’t use.”</em></p><p>Imagine ordering a pizza but being forced to learn the entire menu. Interfaces feel the same way when overloaded.</p><p><strong>Example</strong></p><p>Let’s take an example :</p><p><strong>Bad Example</strong></p><pre>interface Payment<br>{<br>    public function payWithCreditCard();<br>    public function payWithPaypal();<br>    public function payWithBitcoin();<br>}<br><br>class CreditCardPayment implements Payment<br>{<br>    public function payWithCreditCard()<br>    {<br>        // Process credit card payment<br>    }<br><br>    public function payWithPaypal()<br>    {<br>        throw new Exception(&quot;Not implemented.&quot;);<br>    }<br><br>    public function payWithBitcoin()<br>    {<br>        throw new Exception(&quot;Not implemented.&quot;);<br>    }<br>}</pre><p>A payment interface that only works for one method? That’s like bringing a spoon to a knife fight.</p><p><strong>Good Example</strong><br>Split the interface into smaller, specific contracts:</p><pre>interface CreditCardPayment<br>{<br>    public function payWithCreditCard();<br>}<br><br>interface PaypalPayment<br>{<br>    public function payWithPaypal();<br>}<br><br>interface BitcoinPayment<br>{<br>    public function payWithBitcoin();<br>}</pre><p>Now, you only implement what you need.</p><h3>Dependency Inversion Principle (DIP)</h3><p><em>“Depend on abstractions, not concretions.”</em></p><p>Think of this as having your coffee brewed by a barista, not depending on a specific brand of beans. The principle promotes flexibility by relying on abstractions.</p><p><strong>Example</strong></p><p>Let’s take an example :</p><p><strong>Bad Example</strong></p><pre>class Notification<br>{<br>    public function sendEmail($message)<br>    {<br>        // Email sending logic...<br>    }<br>}</pre><p>If tomorrow you need to send SMS instead of email, you’ll cry (and refactor).</p><p><strong>Good Example</strong></p><pre>interface Notifier<br>{<br>    public function send($message);<br>}<br><br>class EmailNotifier implements Notifier<br>{<br>    public function send($message)<br>    {<br>        // Send email<br>    }<br>}<br><br>class SMSNotifier implements Notifier<br>{<br>    public function send($message)<br>    {<br>        // Send SMS<br>    }<br>}<br><br>class NotificationService<br>{<br>    private $notifier;<br><br>    public function __construct(Notifier $notifier)<br>    {<br>        $this-&gt;notifier = $notifier;<br>    }<br><br>    public function notify($message)<br>    {<br>        $this-&gt;notifier-&gt;send($message);<br>    }<br>}</pre><p>Now, swapping EmailNotifier with SMSNotifier is as easy as switching coffee brands.</p><h3>Wrapping Up with Laravel Flavor</h3><p>SOLID principles might sound intimidating at first, but they’re your secret weapon for writing clean, maintainable code. Remember:</p><ul><li>SRP = Fewer jobs per class = Happier code.</li><li>OCP = Add, don’t edit.</li><li>LSP = Respect substitution rules.</li><li>ISP = Smaller interfaces = Easier implementation.</li><li>DIP = Abstract dependencies = Flexible designs.</li></ul><p>So go ahead, sprinkle these principles into your Laravel projects. Your future self (and your team) will thank you. And remember: keep it SOLID, not spaghetti!</p><p><strong><em>Love this ? Want more fun and insightful blogs like this? Check out my latest one on</em></strong> <a href="https://medium.com/@pareshsingh799/sdlc-in-laravel-a-developers-powerful-and-seamless-journey-f1c39fc51d5a">SDLC in Laravel</a>!</p><h3>Conclusion</h3><p>Embracing the SOLID principles in your Laravel projects isn’t just about writing cleaner code — it’s about creating systems that are easier to maintain, extend, and love. By giving each class a clear purpose, keeping your code flexible, and relying on abstractions, you’re setting yourself up for a more enjoyable development experience (and fewer late-night debugging sessions).</p><p>Think of these principles as your coding gym: they might feel like a workout at first, but the gains — maintainable, scalable, and robust applications — are absolutely worth it. Whether you’re tackling a personal project or building the next big thing, a SOLID foundation ensures your code stands the test of time (and feature requests).</p><p>So next time your code starts resembling spaghetti, remember these principles and ask yourself, <em>“Am I keeping it SOLID?”</em> With Laravel by your side and these principles in your toolkit, you’re unstoppable. Now go forth and write some legendary code!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=721ac036c1a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power of cURL : A Complete Guide for Beginners]]></title>
            <link>https://medium.com/@pareshsingh799/power-of-curl-a-complete-guide-for-beginners-4f962153b426?source=rss-83ae71bc6a41------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f962153b426</guid>
            <category><![CDATA[curl]]></category>
            <category><![CDATA[webpage]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[client-url]]></category>
            <dc:creator><![CDATA[Paresh Singh Rajput]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 14:43:15 GMT</pubDate>
            <atom:updated>2024-10-28T14:43:15.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGZlGTQQZcJOGFioo8ls_w.png" /></figure><h3>Power of cURL : A Complete Guide for Beginners</h3><p>In the world of web development, testing APIs, automating tasks, or downloading files from the internet are essential operations. One tool that makes these tasks incredibly simple and powerful is cURL. Whether you&#39;re a seasoned developer or someone just starting out, understanding how to use <a href="https://curl.se/">cURL</a> will elevate your web-based projects. In this blog, we’ll walk you through the basics and progressively dive deeper into cURL&#39;s functionalities.</p><h3>What is cURL?</h3><p><strong>cURL</strong>, short for <em>Client URL</em>, is a command-line tool that allows you to transfer data to or from a server. It works with various protocols, but it’s most commonly used with HTTP and HTTPS. cURL is used to communicate with web servers and send or receive information using URLs, making it ideal for interacting with APIs and web services.</p><p><strong>Key Features of cURL:</strong></p><ul><li>Multi-protocol support: HTTP, HTTPS, FTP, SMTP, and more.</li><li>Ability to upload or download files.</li><li>Test APIs or web services.</li><li>Authentication and cookies support.</li><li>Completely open-source and free to use.</li></ul><p><strong>Why Should You Use cURL?</strong></p><p>cURL is a versatile and flexible tool. It can be used in scenarios like:</p><ul><li>Testing RESTful APIs during development.</li><li>Fetching web pages and interacting with web servers.</li><li>Automating file downloads or uploads.</li><li>Debugging HTTP requests by checking the headers and response.</li></ul><p>Next, we’ll break down how to use cURL step-by-step.</p><h3>Getting Started with cURL</h3><p>Let’s start with some basic operations you can perform using cURL. Here are a few simple commands that will help you get comfortable with the tool.</p><h3>1. Fetching a Webpage</h3><p>The simplest use of cURL is to fetch and display the contents of a webpage. You can do this by simply typing the following command:</p><pre>curl https://example.com</pre><p><strong>For Example</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bi4LqiJnLWaPnyMIhCzX7w.png" /></figure><p>This command fetches the webpage at https://example.com and displays its HTML content in the terminal. The ability to retrieve webpages is useful when you want to inspect a site’s structure or download raw data from the server.</p><h3>2. Saving the Output to a File</h3><p>To save the webpage content to a file instead of displaying it on the terminal, use the -o option:</p><pre>curl https://example.com -o output.html</pre><p><strong>Explanation</strong>:</p><p>Here, the file output.html will contain the HTML source of the webpage. This is helpful if you want to download a file from the web or save the page’s content for later inspection.</p><h3>Sending Data with cURL</h3><p>cURL is more than just a file-fetching tool. It allows you to send data to servers, which is especially useful for interacting with APIs.</p><h3>3. Sending a POST Request</h3><p>To send data via POST (a common method in web development), use the -X POST option:</p><pre>curl -X POST https://example.com/api -d &quot;param1=value1&amp;param2=value2&quot;</pre><p><strong>Explanation</strong>:</p><p>In this example, the -d option sends form data to the server. POST requests are commonly used for submitting data, such as filling in a form on a website or sending login credentials to an API.</p><h3>Adding Custom Headers</h3><p>Many web services require you to include custom headers with your requests. For example, APIs often use headers for authentication purposes.</p><h3>4. Adding HTTP Headers</h3><p>To include a custom header in your request, use the -H option. A common use case is passing an API key or a Bearer Token:</p><pre>curl -H &quot;Authorization: Bearer your_token&quot; https://example.com/api</pre><p><strong>Explanation</strong>:</p><p>This is useful when you are working with APIs that require authentication. The header allows you to send tokens, session IDs, or custom parameters to the server.</p><h3>Handling File Downloads</h3><p>One of cURL’s strengths is handling file downloads efficiently.</p><h3>5. Downloading Files</h3><p>To download a file from a URL, you can use the -O option:</p><pre>curl -O https://example.com/file.zip</pre><p><strong>Explanation</strong>:</p><p>This command downloads the file at https://example.com/file.zip and saves it in your current directory with the same name. This feature is handy for batch downloading, backups, or retrieving files from servers programmatically.</p><h3>6. Follow Redirects</h3><p>Sometimes URLs will redirect you to another location. Use the -L flag to ensure that cURL follows the redirect:</p><pre>curl -L https://example.com</pre><p><strong>Explanation</strong>:</p><p>This is especially important for URLs that use services like URL shortening or redirection-based login flows</p><h3>Viewing HTTP Headers and Response</h3><p>When you’re debugging API requests, it’s important to see the headers returned by the server. More on <a href="https://medium.com/insights/guide-to-5-http-methods/">Http</a>.</p><h3>7. Checking Response Headers</h3><p>To fetch only the headers of a response (useful for debugging or checking server response codes), use the -I option:</p><pre>curl -I https://example.com</pre><p><strong>Explanation</strong>:</p><p>This command fetches only the HTTP headers of the server’s response, such as the status code (200 OK, 404 Not Found), content type, and more.</p><h3>8. Verbose Mode for Debugging</h3><p>If you’re troubleshooting issues with a request, use the -v (verbose) flag to get detailed information about the request and response:</p><pre>curl -v https://example.com</pre><p><strong>Explanation</strong>:</p><p>Verbose mode outputs all the details, including the headers sent, the data being transferred, and any other information necessary for debugging.</p><h3>Advanced cURL Usage</h3><p>Now that we’ve covered the basics, let’s explore more advanced use cases.</p><h3>9. Uploading Files</h3><p>You can use cURL to upload files via a POST request. This is useful for submitting files through APIs:</p><pre>curl -F &quot;file=@/path/to/file.zip&quot; https://example.com/upload</pre><p>Explanation:</p><p>In this example, the -F flag uploads the specified file to the server. This method is widely used in APIs that allow file uploads.</p><h3>10. Working with JSON Data</h3><p>Many modern APIs require data in JSON format. You can easily send JSON data with cURL:</p><pre>curl -X POST https://example.com/api -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;key1&quot;:&quot;value1&quot;, &quot;key2&quot;:&quot;value2&quot;}&#39;</pre><p>Explanation:</p><p>The -H option sets the Content-Type header to application/json, and the -d option sends the JSON payload.</p><h3>Working with Authentication and Cookies</h3><p>Many web services require authentication, and cURL handles various methods of authentication, such as Basic, Bearer Token, and cookies.</p><h3>11. Handling Authentication</h3><p>You can use cURL to send requests that require authentication. Here’s how you’d send a request using Basic Authentication:</p><pre>curl -u username:password https://example.com</pre><p>For more secure APIs that require tokens, use the Bearer Token method:</p><pre>curl -H &quot;Authorization: Bearer your_token&quot; https://example.com</pre><h3>12. Saving and Sending Cookies</h3><p>You can save cookies from a request using the -c option:</p><pre>curl -c cookies.txt https://example.com</pre><p>To send cookies back in future requests, use the -b option:</p><pre>curl -b cookies.txt https://example.com</pre><p>This is helpful for session management when you’re interacting with websites that require login and cookie-based authentication.</p><h3>Conclusion: Get the Most Out of cURL</h3><p>cURL is an incredibly powerful tool that makes interacting with web services and APIs much simpler. From fetching data to sending files, cURL handles it all with ease. With features like custom headers, file uploads, JSON support, and authentication, you can use it for a wide variety of tasks in web development.</p><p><strong><em>As you grow more comfortable with the basics, try automating workflows or integrating cURL into your scripts to boost productivity. cURL’s flexibility, coupled with its robust feature set, makes it a must-have tool in every developer’s toolkit. Whether you’re a beginner or a pro, mastering cURL will help you communicate more effectively with the web. Happy Coding :)</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f962153b426" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>