<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kavii Suri]]></title><description><![CDATA[Kavii is a Web developer, ML engineer and a constant learner. 
Posts about WebDev, DevOPs, ML and Computer Science. He loves to explore and learn about Tech]]></description><link>https://kaviisuri.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1658525257253/2K74IPSG5.png</url><title>Kavii Suri</title><link>https://kaviisuri.com</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 01:12:32 GMT</lastBuildDate><atom:link href="https://kaviisuri.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Your AI Is Editing Your Prompt Behind Your Back]]></title><description><![CDATA[I was three hours into a project with Cursor. You know the flow - starts slow, then you hit a rhythm. It was getting me. Building exactly what I needed.
Anyway... then it happened.
I asked for the next piece. Same pattern, right? Apply what we'd lear...]]></description><link>https://kaviisuri.com/your-ai-is-editing-your-prompt-behind-your-back</link><guid isPermaLink="true">https://kaviisuri.com/your-ai-is-editing-your-prompt-behind-your-back</guid><category><![CDATA[AI]]></category><category><![CDATA[llm]]></category><category><![CDATA[claude-code]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[context engineering]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Wed, 11 Feb 2026 12:56:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1770707841434/f735fd6d-d536-4b42-9e93-7290be2ae9dd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was three hours into a project with Cursor. You know the flow - starts slow, then you hit a rhythm. It was getting me. Building exactly what I needed.</p>
<p>Anyway... then it happened.</p>
<p>I asked for the next piece. Same pattern, right? Apply what we'd learned.</p>
<p>But wait.</p>
<p>It started explaining stuff we'd already solved. Basic things. I scrolled up. Pointed to exactly where we agreed.</p>
<blockquote>
<p><strong>[Me]:</strong> "Remember? We talked about this."<br /><strong>[AI]:</strong> "Oh absolutely! I remember."</p>
</blockquote>
<p>Then it ignored everything.</p>
<p>Not amnesia. Amnesia would be honest. This was performance. The AI was cosplaying its earlier self, saying the right words, missing all the actual context.</p>
<h2 id="heading-what-you-see-isnt-what-you-get"><strong>What You See Isn't What You Get</strong></h2>
<blockquote>
<p>The transcript you see is not the input it gets. The UI is lying to you.</p>
</blockquote>
<p>Here's the thing. You look at that chat window and see a conversation. Fifty messages. History. Context. But that's not what the AI sees.</p>
<p><strong>It gets a summary. A compression.</strong> Three paragraphs where you see fifty. <strong>Decisions you didn't make about what's "important" and what's "noise."</strong></p>
<p>The UI promises WYSIWYG - what you see is what you get. But with AI chat, what you see is <strong>theater</strong>. And the actor backstage is reading from a script you didn't write.</p>
<p>So what's actually in that script? Let's look closer.</p>
<h2 id="heading-context-isnt-a-transcript"><strong>Context Isn't a Transcript</strong></h2>
<blockquote>
<p>Even before limits, longer inputs make models miss details. Engineers work around it. You loose control.</p>
</blockquote>
<p>Here's the thing: your conversation isn't sitting in memory like a text file. It's being actively crammed into a space that's too small.</p>
<p><strong>Context windows are limited.</strong> Even in that, the <strong>context "rots"</strong>. <strong>Intelligence goes down as you add more tokens.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770706538427/017da120-45e5-4098-a363-26e17a980f63.png" alt="Even before you hit the limit, models can get worse at using what you gave them. Chroma calls this “context rot”: as the prompt gets longer.  Src: https://research.trychroma.com/context-rot" class="image--center mx-auto" /></p>
<blockquote>
<p>Even before you hit the limit, models can get worse at using what you gave them. Chroma calls this “context rot”: as the prompt gets longer.</p>
<p>Src: <a target="_blank" href="https://research.trychroma.com/context-rot">https://research.trychroma.com/context-rot</a></p>
</blockquote>
<p>So apps <strong>summarize</strong>. They <strong>compress</strong>. <strong>Sometimes it's just most recent messages</strong>. The point is: <strong>They decide what matters and throw away the rest. You can't see it.</strong></p>
<p>The AI isn't re-reading your conversation. It's seeing a "compressed JPEG" of what you actually said - a lossy version. Zoom in and you'll find artifacts. Nuances vanish. <strong>The context it "remembers" is an approximation, not a record.</strong> And <strong>when you can't see what's been lost, you can't trust what you're building on next.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770706583035/1f90d4a2-dc21-47b0-9e43-55cb3a20ccc8.png" alt class="image--center mx-auto" /></p>
<p><strong>The "prompt" is the only input you have for the AI, and weirdly, we are okay giving up control over even that.</strong></p>
<h2 id="heading-write-it-down-or-lose-it"><strong>Write It Down or Lose It</strong></h2>
<blockquote>
<p>Memory you can’t inspect isn’t memory. It’s hope.</p>
</blockquote>
<p><strong>You can't hope the summarisation algorithm cares</strong> about the specific pattern you spent three hours establishing. <strong>hope is not a strategy.</strong></p>
<p>What you need is as much <strong>control and predictability over tokens going in</strong> as possible.</p>
<p>So I stopped treating chat as memory and started treating it as a session. Now I use <strong>two kinds of "write it down," and they do different jobs:</strong></p>
<h3 id="heading-the-file-that-doesnt-forget-cross-chat-memory"><strong>The file that doesn't forget - Cross Chat Memory</strong></h3>
<p>There's one place the rules live. Not in the thread. <code>AGENTS.md</code> is basically a README for the AI: the tiny set of constraints and conventions that should survive every restart.</p>
<p>In my workflow, the <strong>AI has one recurring job</strong>: <strong>keep this file up to date</strong>. Here’s the <strong>template you can steal:</strong></p>
<pre><code class="lang-markdown"><span class="hljs-section"># AGENTS.md </span>

{...Your Instructions...}

<span class="hljs-section">### Learnings </span>
<span class="hljs-quote">&gt; This section is automatically updated by the AI at the end of each session. </span>
<span class="hljs-quote">&gt; Add new patterns, mistakes to avoid, and insights discovered during work. </span>
<span class="hljs-bullet">-</span> ...
</code></pre>
<h3 id="heading-the-note-that-gets-you-back-into-flow"><strong>The note that gets you back into flow</strong></h3>
<p>Then there’s the handoff. <strong>Avoid a "forever thread".</strong> <strong>Do not keep asking the same thread to do one task after another.</strong></p>
<p><strong>Force yourself to press the "new chat" button. Do the '/new'</strong>. And start it with a handoff prompt. Not a summary of everything. Just enough to pick up tomorrow without spending 30 minutes reconstructing state.</p>
<p><strong>And remember, you must review and edit it before you send it, otherwise it's "hope" again.</strong></p>
<p>There are really awesome plugins you can use and just get a '/handoff'. like:<br />1. Claude Code - <a target="_blank" href="https://github.com/kylesnowschwartz/claude-handoff">https://github.com/kylesnowschwartz/claude-handoff</a><br />2. Open Code - <a target="_blank" href="https://github.com/joshuadavidthomas/opencode-handoff">https://github.com/joshuadavidthomas/opencode-handoff</a></p>
<blockquote>
<p>AmpCode has a really amazing article about this: <a target="_blank" href="https://ampcode.com/news/handoff">https://ampcode.com/news/handoff</a></p>
</blockquote>
<p><strong>Stop trusting implicit memory. Start using explicit memory.</strong></p>
]]></content:encoded></item><item><title><![CDATA[You Don't Need to "Learn" Svelte]]></title><description><![CDATA[Introduction
What if I told you, You don't need to learn svelte! Not because svelte is bad, or not worth learning. It's quite the opposite. You don't need to learn it because you already know it! Dan Dan Daaaannn...
You've been working with JavaScrip...]]></description><link>https://kaviisuri.com/you-dont-need-to-learn-svelte</link><guid isPermaLink="true">https://kaviisuri.com/you-dont-need-to-learn-svelte</guid><category><![CDATA[Web Development]]></category><category><![CDATA[Svelte]]></category><category><![CDATA[Svelte Vs React]]></category><category><![CDATA[React]]></category><category><![CDATA[senior-software-engineer]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Mon, 04 Sep 2023 13:49:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1693294931730/49c9662c-d3a0-4dde-8ec8-34f48da253d2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">Introduction</h1>
<p>What if I told you, You don't need to learn svelte! Not because svelte is bad, or not worth learning. It's quite the opposite. You don't need to learn it because you already know it! <em>Dan Dan Daaaannn...</em></p>
<p>You've been working with JavaScript, crafting web marvels and wrangling code like a seasoned pro. You've tamed the wild async functions, navigated the treacherous waters of callbacks, and even had a dance-off with the quirky <code>this</code> keyword. So, <strong>why on Earth would you need to learn something new</strong>?</p>
<h3 id="heading-what-is-this">What is this?</h3>
<p>In this journey <strong>we uncover a superpower, hidden deep inside you</strong>, buried under mounds of react wrappers and redux sagas. Today, you'll come to realize that Svelte is not some arcane magic potion you need to memorize incantations or syntax for. <strong>It's JavaScript, with a sleek makeover and a secret identity.</strong></p>
<p>By the end of this article, <strong>you'll find that you don't need to</strong> learn <strong>Svelte—it's practically déjà vu with a futuristic twist!</strong></p>
<p>Svelte is suprisingly easy to learn, and it's still pretty awesome! So, Let's get to it!</p>
<h1 id="heading-what-is-svelte">What is Svelte?</h1>
<p>Svelte is a UI framework (we don't shy away from that word here, unlike some other "libraries", ahem ahem...), that's compiled, compact and complete!</p>
<p>It's extremely fast, easy to use and also <a target="_blank" href="https://survey.stackoverflow.co/2023/#section-admired-and-desired-web-frameworks-and-technologies">the most admired JS Web framework according to Stack Overflow Survey</a>.</p>
<h1 id="heading-why-svelte-you-ask">Why Svelte, You Ask?</h1>
<h2 id="heading-compiled">Compiled</h2>
<p>With Svelte, there's no runtime needed. No need to send a few kilobytes of "SvelteJS" runtime on every website you ever built/will build. It's just a compiler with targets to "document.getElementById" instead of machine code.</p>
<h2 id="heading-concise">Concise</h2>
<p>Svelte lets you write beautiful syntax, you know it already! It's HTML CSS and JS (it's like the Avengers of web languages, teaming up to form something magnificent). Svelte compiles it down to extremely fast and optimized JS.</p>
<p>It's like having your cake and eating it too, except it's code, and you're making it run faster than a caffeine-infused squirrel.</p>
<h2 id="heading-complete">Complete</h2>
<p>Svelte comes with a state management solution (one of the best I've seen till now), and component-scoped styling (no styled components needed). It even has motion primitives for those jazzy animations that make users go "oooh" and "ah."</p>
<p>So, while you were busy <code>npm install</code>ing the bare essentials for your projects, Svelte was chilling in the corner, whispering, "I've got this, fam."</p>
<h1 id="heading-its-all-javascript">It's all Javascript</h1>
<p>Love it or hate it, Javascript is a very useful technology, and all the libraries, frameworks, and "meta" frameworks, are nothing but abstractions over JS (mostly leaky ones).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693294080856/65301be7-5198-4b58-bf0b-a64e85edf472.png" alt class="image--center mx-auto" /></p>
<p>That's where Svelte shines, even though it's another "web framework", It doesn't throw a bunch of alien syntax at you, expecting you to decipher it like an ancient scroll. No, Svelte takes the familiar, battle-tested primitives, syntax, and concepts of JavaScript and weaves them into its fabric.</p>
<p>So, while other frameworks might introduce themselves with an air of mystique, Svelte strides in with a friendly nod, saying, "Hey, it's all JavaScript here. Let's create something amazing together."</p>
<h1 id="heading-but-why-though">But why though...</h1>
<p>Okay, Okay, I see you react lovers (I'm one too!), you might not be convinced yet. Here are a few examples to tip you to the right side...</p>
<h2 id="heading-effectsreactivity">Effects/Reactivity</h2>
<p>With react, here's what's needed to make something run every time a dependency changes</p>
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Component</span>(<span class="hljs-params"></span>) </span>{
    useEffect(<span class="hljs-function">() =&gt;</span> {
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Count Changed!"</span>, count)
    }, [count])

    <span class="hljs-keyword">return</span> <span class="hljs-comment">/** jsx **/</span>
}
</code></pre>
<p>Not so bad, is it? Now see what it translates to in svelte</p>
<pre><code class="lang-HTML"><span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
    <span class="hljs-attr">$</span>: {
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Count Changed!"</span>, count)
    }
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>

<span class="hljs-comment">&lt;!-- html --&gt;</span>
</code></pre>
<p>That's it! Svelte automatically tracks dependencies, and you only need to label a code block as reactive (<code>$:</code>). It'll run the code any time those dependencies change.</p>
<h2 id="heading-storesstate-management">Stores/State Management</h2>
<p>While in react, you might go with complex setups like zustand, react-query or redux. Svelte gives you an in-built solution. A fascinating, cutting-edge idea called "pub-sub". Yupp, it's that dumb.</p>
<pre><code class="lang-JS"><span class="hljs-comment">/** store.ts **/</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> counts = writable({
    <span class="hljs-attr">a</span>: <span class="hljs-number">0</span>,
    <span class="hljs-attr">b</span>: <span class="hljs-number">0</span>,
})
</code></pre>
<pre><code class="lang-HTML"><span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
    <span class="hljs-keyword">import</span> counts <span class="hljs-keyword">from</span> <span class="hljs-string">'./store.ts'</span>;
    <span class="hljs-keyword">import</span> {onMount} <span class="hljs-keyword">from</span> <span class="hljs-string">'svelte'</span>;
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">on:click</span>=<span class="hljs-string">{()</span> =&gt;</span> $counts.a += 1}&gt;
    Increment A ({$counts.a})
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>Here, the component only "subscribes" to <code>count.a</code>, unline what react context allows you to do.</p>
<blockquote>
<p>The <code>$</code> just before the variable name makes the component handle subscribing and unsubscribing to the store for you!</p>
</blockquote>
<h2 id="heading-simple-lifecycle">Simple Lifecycle</h2>
<p>While React uses some implicit behaviors of <code>useEffect</code> to do component lifecycles, Svelte is extremely explicit and simple</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
    <span class="hljs-comment">// ...imports</span>
    onMount(<span class="hljs-function">() =&gt;</span> {
        <span class="hljs-comment">// ... on component mount stuff</span>
        <span class="hljs-keyword">return</span> <span class="hljs-function">() =&gt;</span> { <span class="hljs-comment">// cleanup stuff 1 }</span>
    })
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-comment">&lt;!-- Component Markup --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>click me!<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>If you wanna do something only once, just write it in the script tag! Unlike React Components, the bodies of the script tag of a Svelte Component are only executed when it's created.</p>
<h2 id="heading-what-if-i-want-redux-actions">What if I want Redux actions?</h2>
<p>To restrict changes to the store, all you need to do is this:</p>
<pre><code class="lang-JS"><span class="hljs-keyword">const</span> _counts = writeable({
    <span class="hljs-attr">a</span>: <span class="hljs-number">0</span>,
    <span class="hljs-attr">b</span>: <span class="hljs-number">0</span>,
});

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> counts = {
    <span class="hljs-attr">subscribe</span>: _counts.subscribe,
    <span class="hljs-attr">incrementA</span>: <span class="hljs-function">() =&gt;</span> _counts.update(<span class="hljs-function">(<span class="hljs-params">counts</span>) =&gt;</span> {...counts, <span class="hljs-attr">a</span>: counts.a + <span class="hljs-number">1</span>}),
    ...
};
</code></pre>
<p>A store is an object with a <code>subscribe</code> method. You're free to mold it as you please!</p>
<h2 id="heading-scoped-styles">Scoped Styles</h2>
<pre><code class="lang-HTML"><span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
<span class="hljs-comment">// ...</span>
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>Name<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Description<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="css">
    <span class="hljs-selector-class">.container</span> {
        <span class="hljs-comment">/** .. **/</span>
    }
    <span class="hljs-selector-class">.card</span> {
        <span class="hljs-comment">/** .. **/</span>
    }
</span><span class="hljs-tag">&lt;/<span class="hljs-name">style</span>&gt;</span>
</code></pre>
<p>All of these classes are scoped to the component by default, "container" means nothing outside of this component.</p>
<p>You get all this, with 0 dependency and no runtime cost.</p>
<h1 id="heading-but-what-about-the-ecosystem">But what about the "ecosystem"?</h1>
<p>That's the best part, the svelte ecosystem is bigger than React! because it's all of the JS ecosystem.</p>
<p>You see, in the realm of Svelte, there's no need for those wrappers that you might have wrestled with in the past. Say goodbye to deciphering cryptic syntax or quirky APIs just to connect a wrapper to the actual library you want to use. Nope, with Svelte, it's as straightforward as it gets.</p>
<blockquote>
<p>It's like a direct line to JavaScript paradise – no middlemen required! 🚀</p>
</blockquote>
<h2 id="heading-lets-look-at-an-example">Let's Look at an example</h2>
<p>Imagine you're a developer aiming to add some stunning charts to your web app using the renowned "Chart.js" library.</p>
<h3 id="heading-react-a-web-of-wrappers">React: A Web of Wrappers</h3>
<h4 id="heading-step-1-install-the-wrapper">Step 1: Install the Wrapper</h4>
<p>First, you'd need to find a React wrapper for Chart.js, install it, and cross your fingers that it behaves as expected. Also remember to use the <code>2</code> version.</p>
<pre><code class="lang-jsx"><span class="hljs-comment">// Terminal</span>
npm install react-chartjs<span class="hljs-number">-2</span> chart.js
</code></pre>
<h4 id="heading-step-2-import-the-wrapper">Step 2: Import the Wrapper</h4>
<p>Next, you import the wrapper, wrap your component around it, and pray there are no compatibility issues.</p>
<pre><code class="lang-jsx"><span class="hljs-comment">// Component.jsx</span>
<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> { Bar } <span class="hljs-keyword">from</span> <span class="hljs-string">'react-chartjs-2'</span>;

<span class="hljs-keyword">const</span> ChartComponent = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">const</span> data = {<span class="hljs-comment">/* Chart data here */</span>};

  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Bar</span> <span class="hljs-attr">data</span>=<span class="hljs-string">{data}</span> /&gt;</span></span>;
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> ChartComponent;
</code></pre>
<h4 id="heading-step-3-deal-with-wrapper-limitations">Step 3: Deal with Wrapper Limitations</h4>
<p>You realize that the wrapper doesn't quite support the latest Chart.js features, so you resort to direct manipulation to achieve your goals.</p>
<blockquote>
<p>(I deleted the code here because it got too long 🤕)</p>
</blockquote>
<h3 id="heading-svelte-the-direct-approach">Svelte: The Direct Approach</h3>
<h4 id="heading-step-1-add-the-library">Step 1: Add the Library</h4>
<p>In the world of Svelte, you don't need a special wrapper. You just add the Chart.js library directly.</p>
<pre><code class="lang-HTML"><span class="hljs-comment">&lt;!-- Component.svelte --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
  <span class="hljs-keyword">import</span> { onMount } <span class="hljs-keyword">from</span> <span class="hljs-string">'svelte'</span>;
  <span class="hljs-keyword">import</span> Chart <span class="hljs-keyword">from</span> <span class="hljs-string">'chart.js'</span>;

  <span class="hljs-keyword">let</span> chartInstance;
  <span class="hljs-keyword">let</span> canvas
  <span class="hljs-attr">$</span>: {
    <span class="hljs-keyword">const</span> ctx = canvas.getContext(<span class="hljs-string">'2d'</span>);
    chartInstance = <span class="hljs-keyword">new</span> Chart(ctx, {<span class="hljs-comment">/* Chart config here */</span>});
  }
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">canvas</span> <span class="hljs-attr">bind:this</span>=<span class="hljs-string">{canvas}</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">canvas</span>&gt;</span>
</code></pre>
<h3 id="heading-and-done">And... Done!</h3>
<p>No wrappers, no compatibility struggles – just plain JavaScript, building upon what you already know. Svelte's direct approach feels like a breath of fresh air, reminding us that sometimes, less is truly more.</p>
<h1 id="heading-sold-sold-where-do-i-start">Sold! Sold! Where do I start?</h1>
<p>Ah, the enthusiasm! You're ready to jump into the Svelte universe and flex those JavaScript muscles. Here we go!</p>
<h2 id="heading-step-1-embrace-the-basics">Step 1: Embrace The Basics</h2>
<p>Good Documentation is a godsend in software, and <a target="_blank" href="https://learn.svelte.dev/tutorial/welcome-to-svelte">Svelte's Intro Tutorial</a> is especially good. It's like the "Welcome to Svelte" mat laid out for you.</p>
<p>This is where Svelte gives you the first taste of its most-priced quality, its simplicity.</p>
<h2 id="heading-step-2-craft-a-mini-masterpiece">Step 2: Craft a Mini-Masterpiece</h2>
<p>Once you've completed the tutorial and seen how seamlessly Svelte meshes with your JavaScript prowess, it's playtime. Go make a project you've been thinking of building. Don't have one? Here are a few cool ones you can start with:</p>
<ol>
<li><p><strong>Virtual Recipe Box -</strong> So you never lose your favourite recipes</p>
</li>
<li><p><strong>Snippets Manager</strong> - So you don't ever loose that bash command you keep safely in your bash history (I know you do...)</p>
</li>
<li><p><strong>Project Idea Repository</strong> - So you don't need this list again!</p>
</li>
</ol>
<p>It's your playground, play around, and you'll realize, how beautiful it is to just use JS and the web platform.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>Svelte is like a breath of fresh air among the syntax-heavy, complexity-mongering tools that exist in the JS ecosystem. You don't need to learn svelte, because it has a learning curve so small, that you won't even realize it when you learn it.</p>
<p>You of course won't become an expert in a day, but Svelte enables you to focus on building stuff rather than learning weird quirks of the framework.</p>
<p>So, whether you're a battle-hardened developer or a curious newcomer, consider giving Svelte a spin. It might just inspire you to view web development through a cybernetically enhanced lens.</p>
<blockquote>
<p>Alright, let's cut to the chase, my friend! You've just uncovered a goldmine of knowledge, and the fun doesn't stop here.</p>
<p>So, why wait? Dive into the excitement, join our newsletter community, and let's embark on this journey together. Your inbox is about to become the ultimate source of inspiration. Sign up now and stay ahead of the curve!</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Keeping it together with NX Monorepos: What are they?]]></title><description><![CDATA[So, you've been hearing a lot about monorepos. Maybe a little bit of turborepo, blaze, or nx. Or maybe you haven't! Anyway, in this blog, I'll explain what monorepos are, how I prefer to use them personally, and help you form an informed decision abo...]]></description><link>https://kaviisuri.com/keeping-it-together-with-nx-monorepos-what-are-they</link><guid isPermaLink="true">https://kaviisuri.com/keeping-it-together-with-nx-monorepos-what-are-they</guid><category><![CDATA[monorepo]]></category><category><![CDATA[Nx]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[engineering]]></category><category><![CDATA[Startups]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Sun, 29 Jan 2023 15:42:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1674919873860/bfdd24cb-e5ab-4d5c-962c-158230e3a83d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>So, you've been hearing a lot about monorepos. Maybe a little bit of turborepo, blaze, or nx. Or maybe you haven't! Anyway, in this blog, I'll explain what monorepos are, how I prefer to use them personally, and help you form an informed decision about them.</p>
<p>Traditionally, we always try to stick to the <strong>one-project one-repo</strong> principle, which works fine, but also has a few issues and needs some manual operations to keep in check. Monorepos give you an alternative to that approach.</p>
<h2 id="heading-what-are-monorepos">What are Monorepos?</h2>
<blockquote>
<p>A monorepo is a single repository containing multiple distinct projects, with well-defined relationships.</p>
</blockquote>
<p>This quote is from <a target="_blank" href="http://monorepo.tools">monorepo.tools</a>, and describes how nrwl thinks about them! So it's right from the source!</p>
<h2 id="heading-why-though">Why though?</h2>
<p><img src="https://monorepo.tools/images/monorepo-polyrepo.svg" alt="[Pasted image 20230128163214.png]" /></p>
<p>So we generally have this approach of <strong>polyrepos</strong> that we follow, and they are fantastic! They prioritize team autonomy and each team can ship in isolation, without worrying about the other teams! It's incredible, it's magic! Let's not even think about Monorepos!</p>
<p>But wait, the user gets the app as a single version right? So, how is it possible that teams work in isolation and ship features, without actually collaborating? And that's where the poly-repo approach falls short.</p>
<blockquote>
<p>Polyrepos are good at isolation, but bad at collaboration.</p>
</blockquote>
<p>Monorepos solve this, you have one repo. If you make a change, it's your job to make sure it works across the product. So your teams are divided by features/apps rather than on the basis of the tech they use.</p>
<h3 id="heading-version-management">Version Management</h3>
<p>Teams often need to maintain older versions to prevent breaking changes in projects where there are multiple repos, worked on in parallel. All these rituals and processes can take the developers' time, and they move away from actually shipping stuff.</p>
<p>Monorepos have 1 version, that's it! If you deploy a new version, it'll work, there's no older version to maintain, at least for internal APIs.</p>
<h3 id="heading-developer-productivity">Developer Productivity</h3>
<p>In a monorepo, developers can not only confidently contribute to different projects, and use a consistent way of writing, building, and testing applications but also learn from various other projects and verify that their changes are safe.</p>
<h3 id="heading-atomic-commits-andamp-rollbacks">Atomic Commits &amp; Rollbacks</h3>
<p>As devs, we make mistakes, and sometimes it's so bad that we might need to roll back our changes. Well, monorepos allow for <strong>Atomic Commits</strong> that let you roll back the whole stack in one step instead of cherrypicking commits and hacking around.</p>
<h3 id="heading-shared-types">Shared Types</h3>
<p>This is one of my favorite things about monorepos. If you use something like typescript on the backend or at least swagger to document your API. You can basically generate the API calls and the integration layer. This will not only make your integration layer less error-prone but also make the lives of your devs a lot easier.</p>
<h2 id="heading-so-is-it-a-one-size-fits-all">So is it a one size fits all?</h2>
<p>Sadly, no. Although monorepos are awesome and I honestly think a very good for companies of all sizes (yes especially startups). There are a few things one might need to think about before going to the monorepo route.</p>
<h3 id="heading-tooling">Tooling</h3>
<p>Monorepos need good tools. You don't want to build without a cache, you don't want to build unnecessarily and you don't want to develop without constraints. It's often worth it to invest in good toolings like <a target="_blank" href="http://nx.dev"><strong>nx.dev</strong></a> or turborepo but it's an effort you need to think about.</p>
<h3 id="heading-learning-curve">Learning Curve</h3>
<p>Every new technology you bring to your stack will add to the stuff your devs need to learn to work effectively. Although good tooling can make this very easy to handle!</p>
<h3 id="heading-git">Git</h3>
<p>Git was not designed with monorepos in mind. So it might become an issue for very large codebases to manage a monorepo. But this is not an issue for most organs, and at the scale of google where you do face this, some tools help you manage it.</p>
<h2 id="heading-faq">FAQ</h2>
<h3 id="heading-is-it-just-keeping-the-code-together">Is it just keeping the code together?</h3>
<p>No! A monorepo has code co-location, but the projects must have <strong>well-defined</strong> relationships to be called a <strong>monorepo</strong>.</p>
<h3 id="heading-wont-it-make-my-app-a-monolith">Won't it make my app a monolith?</h3>
<p><img src="https://monorepo.tools/images/monolith-modular.svg" alt="[Pasted image 20230128163231.png]" /></p>
<p>Not at all! Monorepos is just as much about <strong>well-defined</strong> relationships as they are about <strong>single repositories</strong></p>
<h3 id="heading-we-are-a-startup-does-it-help-me">We are a startup, does it help me?</h3>
<p>Yes, monorepos are amazing for startups. Utilizing opensource tooling will help you create the best possible DX for your team and help them ship faster without having to worry about the tedious procedures and rituals that polyrepos entail.</p>
<p>This also helps you do faster refactors, pivots, and stack-wide changes.</p>
<h2 id="heading-what-is-nx">What is Nx?</h2>
<p><a target="_blank" href="nx.dev">Nx</a> is my tool of choice when it comes to monorepos. It's definitely not the only one, but I like it. It has excellent tooling, remote caching, vs code integrations, code generation, and a lot more!</p>
<p>At its core, it's a build tool that builds all your apps in parallel, adds a layer of caching, and makes sure to avoid unnecessary work. It's also awesome at developer experience and reduces the repetitive work devs do, to a minimum.</p>
<h3 id="heading-why-nx">Why Nx?</h3>
<p>Nx provides you with tools that help you run tasks concurrently, and manage dependencies between projects. But so do almost all monorepo tools. How is it different?</p>
<h4 id="heading-never-rebuild-the-same-code">Never Rebuild the Same Code</h4>
<p>Nx is really smart about this. It can figure out whether the same computation has run before, and can restore files and the terminal output from its cache.</p>
<h4 id="heading-remote-caching">Remote Caching</h4>
<p>Nx allows you to share your nx cache with your teammates and the CI system, thus maximizing efficiency.</p>
<h4 id="heading-only-run-whats-affected">Only Run What's Affected</h4>
<blockquote>
<p>Nothing is faster than not running a task</p>
</blockquote>
<p>Nx analyzes your project graph and can diff it against a baseline to determine which projects changed and what tasks need to be re-run. So on every PR, you can rest assured that there will be no unnecessary computation.</p>
<h4 id="heading-amazing-cli">Amazing CLI</h4>
<p>The nx cli is powerful and mostly runs on metadata. You can run targets in parallel for many projects, use distributed caching, and a lot more.</p>
<p>Doing <code>nx build</code> is enough to build all your projects in parallel.</p>
<h4 id="heading-plugins">Plugins</h4>
<p>NX not only has an extensive suite of plugins both supported and community-built, but also has excellent libraries and APIs that enable you to write your own plugins.</p>
<p>You can make custom plugins, in the same monorepo, and use it then and there!</p>
<h4 id="heading-ide-editor-support">IDE / Editor Support</h4>
<p>Nx has excellent IDE Support, you can see it for VSCode, Neovim, or Webstorm. Here's an example of what it might look like in VSCode.</p>
<p><img src="https://nx.dev/_next/image?url=%2Fimages%2Fnx-console%2Fvscode-dark.webp&amp;w=1920&amp;q=75" alt="[Pasted image 20230128164603.png]" /></p>
<h4 id="heading-migrations">Migrations</h4>
<p>Migrations are boring, and hard but necessary. NX loves code-gen! They even have <code>nx migrate</code> command, that migrates your monorepo for you.</p>
<h4 id="heading-interactive-graph">Interactive Graph</h4>
<p>NX Gives you an interactive graph. You can visualize what projects depend on each other and what tasks depend on each other.</p>
<h4 id="heading-distributed-computation">Distributed Computation</h4>
<p>On CI Pipelines, NX enables you to run stuff in parallel. That's how it speeds up CI pipelines. It even provides templates for most major CI solutions in it's docs to get you started.</p>
<h3 id="heading-the-mental-model">The Mental Model</h3>
<p>For any piece of software tooling, there are certain mental models developers need to adopt and learn.</p>
<p>In NX, there are a few concepts on which the whole tooling works. These are easy to understand and very powerful. An NX Monorepos is built of <strong>projects</strong> and <strong>associated tasks/targets</strong>. Projects depend on each other and these dependencies dictate how tasks are run.</p>
<h4 id="heading-projects">Projects</h4>
<p>Projects are modules of code that are decoupled from each other. They can be of 2 types:</p>
<ol>
<li><p><strong>Apps</strong> - In NX, apps are shells around libraries. They are individual applications that combine multiple libraries to do one single thing and do it well. Nx is very flexible in terms of how you can use it.</p>
</li>
<li><p><strong>Libraries</strong> - Libraries are reusable code that may or may not depend on other libraries. You can choose to divide up your code into libraries however you want.</p>
</li>
</ol>
<p>Projects depend on each other and that's how the whole monorepo dependency graph gets formed. These dependencies dictate how different tasks are run.</p>
<h4 id="heading-associated-tasks-targets">Associated Tasks / Targets</h4>
<p>In a monorepo there are not just dependencies among packages, but also among their tasks. For example, whenever we build an app, we need to ensure all it's libraries are also built if changed or a "build" task might depend on "lint" task. They are specified in the <code>nx.json</code> file</p>
<pre><code class="lang-json">{
  ...
  <span class="hljs-attr">"targetDefaults"</span>: {
    <span class="hljs-attr">"build"</span>: {
      <span class="hljs-attr">"dependsOn"</span>: [<span class="hljs-string">"^build"</span>],
      ...
    },
    ...
  },
  ...
}
</code></pre>
<p>With these concepts, NX enables you to do a lot of stuff. It enables building projects faster, caching builds, saving time and more!</p>
<h2 id="heading-okay-im-sold-how-do-i-use-it">Okay, I'm sold! How do I use it?</h2>
<p>Monorepos are awesome! And so is NX. I hope you are sold on both of them at this point. This article feels already very long. So, in the interest of my sanity and yours, I've decided to break it up into a series!</p>
<blockquote>
<p>In the next post, I'll be demoing a fullstack setup, with 2 frontends, a backend and a few libraries, all powered by NX.</p>
<p><strong>Make sure you subscribe to my newsletter to get notified when it comes out next!</strong></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Tech Time Capsule 2022]]></title><description><![CDATA[With the year ending, I look forward to new beginnings, a new stage in my life. But it's always a good idea to retrospect.
I love learning new technologies and expanding my horizons. This blog will cover what I did, and didn't do and what I want to d...]]></description><link>https://kaviisuri.com/tech-time-capsule-2022</link><guid isPermaLink="true">https://kaviisuri.com/tech-time-capsule-2022</guid><category><![CDATA[retrosepctive]]></category><category><![CDATA[Platform Engineering ]]></category><category><![CDATA[engineering]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[Rust]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Mon, 09 Jan 2023 14:33:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1672672930654/75829220-acef-4c68-9607-fb8ee8fb234e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>With the year ending, I look forward to new beginnings, a new stage in my life. But it's always a good idea to retrospect.</p>
<p>I love learning new technologies and expanding my horizons. This blog will cover what I did, and didn't do and what I want to do next in my tech journey.</p>
<h2 id="heading-heres-to-the-ones-that-we-got">Here's to the ones that we got!</h2>
<p>Yupp, that's memories from maroon 5, <strong>I AM NOT SORRY!!</strong> Anyway.. I set a lot of goals for this year, I met some of them! Here are a few:</p>
<h3 id="heading-learning-rust">Learning Rust</h3>
<p>Okay, yeah it's the new <em>fad</em>, but it's really not! You know, for the most part, you write in programming languages. But, in some cases, the languages write you. Rust is one of those cases. Exploring and learning Rust was eye-opening. it showed me what the tools we use, can do for us. I learned what DX really is, and how dev tools empower developers.</p>
<p>More than that, it helped me form an opinion on the <strong>Dynamic vs Static Typing Debate</strong>*. It's still not black and white for me, but I better understand the effect they have. It also helped me expand my thinking from the typical OOPs thinking that most of us develop in college.</p>
<p>I built a few things with it:</p>
<ul>
<li><p><a target="_blank" href="https://github.com/KaviiSuri/zero2prod-rs">zero2prod-rs</a> - My walk-through of the book Zero 2 Production in Rust</p>
</li>
<li><p><a target="_blank" href="https://github.com/KaviiSuri/bm">bm</a> - A virtual machine, assembler, and disassembler</p>
</li>
<li><p><a target="_blank" href="https://github.com/KaviiSuri/tqrs">tqrs</a> - A tqdm-inspired library for rust</p>
</li>
</ul>
<p>NOTE: Most of these are just me playing around with it, it's not production ready, and will, most likely, never be.</p>
<p>An amazing language to learn both in terms of personal growth and future prospects, would 100% recommend it.</p>
<h3 id="heading-learning-more-about-software-architecture">Learning more about software architecture</h3>
<p>This one is an ongoing one. Software Architecture is just too beautiful to stop learning. This year, I explored a little more about</p>
<ul>
<li><p><strong>Domain Driven Design</strong></p>
</li>
<li><p><strong>Design Patterns</strong></p>
</li>
</ul>
<h3 id="heading-learning-to-write-a-programming-language">Learning to write a programming language</h3>
<p>It just seems cool, to write your own compiler. That's the job of God! Well, I tried. I'm in nooo way an expert though, just a random guy filled to the brim with curiosity! Here are my attempts if you wanna see them:</p>
<p>Disclaimer though, it's mostly stuff I learned through tutorials. I'll keep learning more to build something from scratch in the future!</p>
<ul>
<li><p><a target="_blank" href="https://github.com/KaviiSuri/clox">Clox Interpreter</a> - This is from <a target="_blank" href="https://craftinginterpreters.com/">Crafting Interpreters</a>, an amazing read for any developer out there!</p>
</li>
<li><p><a target="_blank" href="github.com:KaviiSuri/monkey-lang.git">Monkey</a> - This is from <a target="_blank" href="https://interpreterbook.com/">Writing Interpreters in Golang</a>, again, amazing stuff, and I finally understood pratt parsing!</p>
</li>
</ul>
<h3 id="heading-open-source">Open Source</h3>
<p>I love the idea of open-source software. Brilliant engineers, working together to make stuff for everyone! It just puts a smile on my face. So I started contributing on the side this year. This was a fun experience and I got a lot better at reading code!</p>
<h3 id="heading-experimenting-with-functional-programming">Experimenting with Functional Programming</h3>
<p>I had heard a lot about functional programming, so I started learning Haskell and elm! I've experimented a bit, it really does change your mindset about code and how it should be written. Will keep moving in this journey and keep you updated.</p>
<h3 id="heading-understanding-my-tools-better">Understanding my tools better</h3>
<p>I love the tools I use, especially because I like to tinker. I started using neovim and tmux this year! Here's an article if you wanna <a target="_blank" href="https://kaviisuri.com/going-from-a-vscode-user-to-a-vim-wizard">know more about neovim</a>.</p>
<p>I also created a <a target="_blank" href="https://github.com/KaviiSuri/dotfiles">dotfiles repo</a>, so I can back up my configurations and even you can use it!</p>
<h2 id="heading-cheers-to-the-wish-you-were-here-but-youre-not">Cheers to the wish you were here, but you're not</h2>
<p>Okay, the last reference to memories, promise! Anyway, things don't always go according to plan. Here are things I wished to do, but couldn't</p>
<h3 id="heading-learning-graphics-programming">Learning Graphics Programming</h3>
<p>It has always fascinated me. I even tried doing some GPU programming in C, C++, and Rust. Learned a little bit of OpenGL and a little bit of WGPU. But, it's not the tech where I'm stuck. It's how I am at visual stuff. I am bad at visual design, and I'll improve it in the future, till then, the terminal it is!</p>
<h3 id="heading-learning-game-dev">Learning Game Dev</h3>
<p>Playing Games is fun, how cool would it be to make them? But unfortunately, I didn't do it this year, fingers are crossed for the next one 🤞.</p>
<h3 id="heading-learning-music-production">Learning Music Production</h3>
<p>I know it's not "tech", but I wanted to! Anyway, I couldn't get the time to do it this year, will definitely pick this up in 2023.</p>
<h2 id="heading-the-happy-accidents">The Happy Accidents</h2>
<p>As I said, things don't always go according to plan, and sometimes, it's a good thing! Here are things I didn't even think of planning, but am grateful I did.</p>
<h3 id="heading-automation">Automation</h3>
<p>Yeah, I already knew bash and python and a dozen more scripting/programming languages. But this year, I actually used them for my work. It was awesome! The things that took hours now took minutes.</p>
<h3 id="heading-understanding-what-drives-me-as-an-engineer">Understanding what drives me as an Engineer</h3>
<p>I like to build stuff! And so does every engineer out there. But, that's how I identified myself until now, but when I retrospect, I understand what excited me to do what I do. <strong>I love to use software and my skills to empower people.</strong> Using software to empower people to do what they do better, that's exciting! They can be normal users, business people, managers, and <strong>developers!</strong></p>
<p>So, moving forward, I'll keep experimenting and building productivity tools, management tools, dev tools, etc. Not exclusively, but it's a new avenue I'd like to explore.</p>
<h3 id="heading-platforms-engineering">Platforms Engineering</h3>
<p>At <a target="_blank" href="procol.io">Procol</a>, I got the opportunity to do some platforms work, managing infra, building internal dev tools and metric trackers, etc. I loved it, it's amazing how helping people do their jobs better 10x-es your impact on the world. I also started learning <strong>docker</strong>, <strong>Kubernetes,</strong> and <strong>infra as code</strong> recently.</p>
<p>Looking forward to exploring it a little more.</p>
<h3 id="heading-mono-repos">Mono-Repos</h3>
<p>I learned about monorepos, and what they can do for a team and a product. Every new thing you learn expands your thought process. I learned about <a target="_blank" href="nx.dev">nx</a>. Another awesome tool in my toolbelt now!</p>
<h3 id="heading-writing">Writing</h3>
<p>I started writing blogs this year, not very regularly but it was liberating. Writing and articulating my ideas help me get a better grasp on them. It's like all those clouds of ideas in your head, just arrange into a nice structure, and you finally know the small details and the big picture! I hope to continue this the next year!</p>
<p><strong>My Brain is for Idea generation, not information storage, we have SSDs</strong></p>
<h2 id="heading-future-plans">Future Plans</h2>
<h3 id="heading-writing-and-showing-my-work">Writing and Showing My Work</h3>
<p>I have a hard time showing my work, but this year, I aim to work on that. So for accountability, I'll post 1 blog a week consistently.</p>
<p>P.S. Help me out and let me know about blog ideas you have for me!</p>
<h3 id="heading-learning-more-about-platforms">Learning more about Platforms</h3>
<p>Platforms were fun, would love to explore more about them on the side, after all, learning never goes in vain.</p>
<h3 id="heading-learning-more-rust-and-go">Learning More Rust and Go</h3>
<p>I honestly love Rust and Go. They are so different and make you think in different ways! You definitely should give them a try if you are looking for something new to explore!</p>
<h3 id="heading-more-open-source">More Open Source</h3>
<p>I contributed to a few projects this year, but I want to dive deeper. Maybe even do some project of my own!</p>
<h3 id="heading-embracing-serendipity">Embracing Serendipity</h3>
<p>No matter what I plan, there's always some amount of luck, randomness, or serendipity involved. And I'm happy that it is! The amount of happy accidents I had really excites me for what 2023 has planned for me!</p>
<p>Here's to growing together, moving forward, and learning! Happy New Year 2023!!🎆</p>
]]></content:encoded></item><item><title><![CDATA[Going from a VSCode User to a Vim Wizard!]]></title><description><![CDATA[Intro
Technology comes and goes, and so do text editors and dev tools. But, there are a few that stand the test of time and still remain actively used for more than 30 years. Vim, is one of them. In this era of ram hogging text editors and IDEs that ...]]></description><link>https://kaviisuri.com/going-from-a-vscode-user-to-a-vim-wizard</link><guid isPermaLink="true">https://kaviisuri.com/going-from-a-vscode-user-to-a-vim-wizard</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[#week4]]></category><category><![CDATA[vim]]></category><category><![CDATA[vimawesome]]></category><category><![CDATA[Visual Studio Code]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Sun, 11 Sep 2022 14:11:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1662721754216/orYqAO5Pi.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Technology comes and goes, and so do text editors and dev tools. But, there are a few that stand the test of time and still remain actively used for more than 30 years. <strong>Vim</strong>, is one of them. In this era of <em>ram hogging</em> text editors and IDEs that feel like they were designed to run on supercomputers, <strong>Vim</strong>, a terminal-based text editor, still has <a target="_blank" href="https://insights.stackoverflow.com/survey/2019#technology-_-most-popular-development-environments">25% of developers as its users</a>. </p>
<p>Tools are important. As devs, we are nothing but craftsmen forging beautiful and useful projects with simple tools at our disposal. As Lincoln said,</p>
<blockquote>
<p><strong>Give me six hours to chop down a tree and I will spend the first four sharpening the axe</strong>.”</p>
<p>Abraham Lincoln</p>
</blockquote>
<p>It's definitely worth exploring your tools and finding what works for you.</p>
<p>In this article, I'll not only discuss my journey with Vim and why you should use it too, I'll also give you a clear roadmap on how to go from a <strong>VSCode user to Vim Wizard</strong> and leave people around you in awe when you work.</p>
<h2 id="heading-why-i-started-vim">Why I started Vim?</h2>
<p>Vim is cool. Objectively cool. But more than that, it's intriguing how a humble text editor that runs in the terminal competes with the likes of VSCode which huge corporations back.</p>
<p>Other options aren't that performant. It might not be an issue for everyone, but it was for me. VSCode, being made using electron, hogged all my Ram and made my laptop laggy. Vim proved to be very usable on my machine at that time. I started using it and got hooked! I've used it for a year now and it still feels like the best text editor for me!</p>
<h2 id="heading-why-vim">Why Vim?</h2>
<p>There are many things awesome about vim, here are a few</p>
<h3 id="heading-vim-is-fast">Vim is Fast</h3>
<p>As I explained above, vim is fast. It's also small. Unlike other IDEs and text editors, it doesn't take multiple GBs on disk or RAM.</p>
<h3 id="heading-vim-is-fast">Vim is Fast</h3>
<p>No, it isn't a typo. Vim is not only fast, but it also makes you work faster. Like others on the web, I'm not claiming that saving a few keystrokes will bring a boost in productivity. But after using it for a while, vim becomes an extension of your mind, you just think of stuff and do it.</p>
<h3 id="heading-vim-is-everywhere">Vim is everywhere</h3>
<p>A random Linux machine, an EC2 instance, an on-premise server, coding prep platforms (like leetcode, hackerrank) vim is everywhere. Heck, even the note-taking app I'm using for writing this has a vim mode (yes, I'm using it!).</p>
<p>You can't rely on VSCode or IntelliJ being everywhere but you'll find knowing vim helps you work almost anywhere easily and productively.</p>
<h3 id="heading-vim-is-yours">Vim is Yours</h3>
<p>Although all the editors now are immensely customisable with extensions and themes (thanks to the amazing developers behind them), vim is one step forward (for decades). </p>
<p>Vim provides a complete scripting language to configure your setup. The older, original vim uses Vimscript and the newer (and better IMO) Neovim uses Lua. Lua is a popular scripting language used in many places so you aren't learning a niche thing useful only in one place.</p>
<h3 id="heading-muscle-memory-is-better-than-your-memory">Muscle Memory is better than Your Memory</h3>
<p>People forget stuff, a lot! But while using vim, you build a muscle memory that lasts and makes you even more in the zone while working.</p>
<h2 id="heading-how-do-i-learn-it">How do I learn it?</h2>
<p>I hope I've convinced you enough to give vim a try. Let's look at a simple roadmap to learning vim</p>
<h3 id="heading-vimtutor-and-learn-vim-extension-vscode">VimTutor and Learn Vim Extension - VSCode</h3>
<p>The vim community has created vimtutor which has simple exercises to introduce vim and build your muscle memory. For VSCode users, this awesome extension called <a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=vintharas.learn-vim">Learn Vim</a> does the same right in your VSCode.</p>
<p>Try going through this 3 or 4 times to get comfortable and then move forward.</p>
<h3 id="heading-vim-mode-in-vscode">Vim Mode in VSCode</h3>
<p>Learn Vim actually makes you install an extension called <a target="_blank" href="https://marketplace.visualstudio.com/items?itemName=vscodevim.vim">Vim</a>. This extremely useful extension actually brings vim keybindings to your  VSCode. Some people just stop here and use vim bindings with VSCode. </p>
<p>Before moving forward, try getting comfortable with using this for a week or two in your work.</p>
<h3 id="heading-real-vim-minimal-config">Real Vim - Minimal Config</h3>
<p>Once you are comfortable, you can get to the real deal. Download <a target="_blank" href="https://neovim.io/">neovim</a>. Use a minimal config with it. No fancy plugins for now! Get a basic color-theme, switch on syntax highlight, set up tab stops and auto-indentation.</p>
<p>Start using vim for basic editing tasks.</p>
<h3 id="heading-lunarvim">LunarVim</h3>
<p>You could go crazy with vim and make your own config with handpicked plugins and here's an amazing playlist that does just that:</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtube.com/playlist?list=PLhoH5vyxr6Qq41NFL4GvhFp-WLd5xzIzZ">https://youtube.com/playlist?list=PLhoH5vyxr6Qq41NFL4GvhFp-WLd5xzIzZ</a></div>
<p>But I won't recommend that. The vim ecosystem, although very awesome, can be overwhelming. Start with something that was handpicked for you. Start with <a target="_blank" href="https://www.lunarvim.org/">lunarvim</a>.</p>
<p>Here's a sneak peek:
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662718626344/6h7_n926i.png" alt="image.png" /> </p>
<h2 id="heading-what-next">What next?</h2>
<p>You are officially now a vim user. You now have the license to act all snobby when someone asks about your dev setup.</p>
<p>Next, start following a few awesome people from the vim community:</p>
<ul>
<li><a target="_blank" href="https://www.youtube.com/c/ThePrimeagen">The Primeagen</a></li>
<li><a target="_blank" href="https://twitter.com/teej_dv">TJ DeVries</a></li>
<li><a target="_blank" href="https://www.youtube.com/c/ChrisAtMachine">Chris@Machine</a></li>
<li>And explore more!</li>
</ul>
<h2 id="heading-do-not-delete-vscode">Do Not Delete VSCode!</h2>
<p>Although you may not use it anymore, keep VSCode around. Around our magical world, is a muggle world. 
You always need to work in a team. Making an active effort your dev environment accessible to your teammates will go a long way. You will have people who don't know vim, please don't be a jerk and keep VSCode around for them. </p>
<blockquote>
<p>So Keep it around! Keep it around for the muggles!</p>
</blockquote>
<h2 id="heading-do-you-need-this">Do you need this?</h2>
<p>As much as I want you to join our cult (I mean, club. Ahem!), I'll admit that you don't necessarily need it. A good developer who knows his way around VSCode or WebStorm will be as productive as someone who knows his way around vim. Just make sure you understand your tools and use them to their full potential. </p>
<p>I've seen many people just googling and fixing their configurations without understanding how it works. I once saw a dev manually run prettier from the terminal because he didn't know how to fix issues in the prettier VSCode extension. That'll slow you down.</p>
<p>We spent almost all our time with our tools and they help us do a lot. It's definitely important to understand them, learn them and explore to find what works for you.</p>
<p>Hope this article helped you, share screenshots of your new vim setup in the comments!</p>
]]></content:encoded></item><item><title><![CDATA[The Fastest way to build your personal website and like it!]]></title><description><![CDATA[Intro
You need a website. You know you do. A website doesn't just serve as your portfolio, but it's your own little corner on the internet. A place where you share ideas and document your journey. It's not only beneficial for others, but it's also us...]]></description><link>https://kaviisuri.com/the-fastest-way-to-build-your-personal-website-and-like-it</link><guid isPermaLink="true">https://kaviisuri.com/the-fastest-way-to-build-your-personal-website-and-like-it</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[#week3]]></category><category><![CDATA[Hashnode]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Sun, 04 Sep 2022 14:38:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1662302202026/349NxCPAr.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>You need a website. You know you do. A website doesn't just serve as your portfolio, but it's your own little corner on the internet. A place where you share ideas and document your journey. It's not only beneficial for others, but it's also useful for you too!</p>
<blockquote>
<p>But just like doctors tend to be the worst patients, developers are the worst clients. </p>
</blockquote>
<p>As devs, we know what's possible on the web (which is basically everything!). So we get into choice overload and never get to building anything.</p>
<p>Since choice overload is a real problem for us, let's <strong>Simplify</strong>!. Let's reduce our choices just enough to get stuff done. Introducing Hashnode!</p>
<p>This blog is about <strong>How I built my personal website using hashnode</strong></p>
<h2 id="heading-why-hashnode">Why Hashnode</h2>
<p>I was in the same place for a long time, but then I discovered Hashnode (this is the platform you're reading this blog on). That led to <a target="_blank" href="https://kaviisuri.com/">kaviisuri.com</a>. Let's see why I chose hashnode:</p>
<ol>
<li>Hashnode allows enough personalisation without giving a choice overload.</li>
<li>Hashnode gives a good starting point to get started, so you don't start from a blank page.</li>
<li>You own your content! You can even back it up to a GitHub repo if you want.</li>
<li>You own the traffic! You can have your own domain.</li>
<li>And a lot more features!</li>
</ol>
<p>I know what you're thinking.</p>
<h2 id="heading-but-isnt-hashnode-a-blogging-platform">But Isn't Hashnode a Blogging Platform?</h2>
<p>Yes. It is. And that's what makes it excellent. Look. An empty website just looks bad. And having a blog is the best thing you can do for improving your skills in communication, tech and other areas. You don't need to go full content creator, just write about your experiences and you'll thank yourself later.</p>
<p>And yes, hashnode is truly a blogging platform, but it's a lot more!</p>
<h2 id="heading-getting-started">Getting Started</h2>
<p>Enough talk! Let's build something!
You can just go to <a target="_blank" href="hashnode.com">hashnode.com</a> and create an account like you normally would.</p>
<p>Hashnode provides you a URL of the form <code>{username}.hashnode.dev</code>, but you can setup your own domain too!</p>
<h2 id="heading-more-than-blogging">More than Blogging</h2>
<p>You of course want other pages on your website. It's a personal website, not just a blog, is it? That's where <strong>Hashnode Custom Pages</strong> come in.</p>
<p>Hashnode allows you to create custom pages with markdown and html that let you create whatever you want! Let's see an example</p>
<p>My website has an <a target="_blank" href="kaviisuri.com/about">about me page</a>. It has a section about me (duh!) and my work experience (I may switch this to a separate page in the future, share your thoughts in the comments!).</p>
<ol>
<li><p>To create a page, open your hashnode blog dashboard and go to pages. <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198736980/qR2pOSRgp.png" alt="image.png" /></p>
</li>
<li><p>Click on create new page, and start editing.</p>
</li>
<li>Write about your self in markdown. </li>
<li>Adding Cards can be as simple as adding the following in markdown:</li>
</ol>
<pre><code><span class="hljs-meta">---</span>
<span class="hljs-string">&gt;</span> <span class="hljs-comment">#### SDE Intern @ Procol</span>
<span class="hljs-string">&gt;</span> <span class="hljs-string">`09/2021</span> <span class="hljs-bullet">-</span> <span class="hljs-string">Present`</span>
<span class="hljs-string">&gt;
&gt; Procol is Next generation digital procurement software and they aim to make businesses in India easier. 
&gt; I worked on developing both products and platform tools to make lives of clients and fellow developers easier and boost productivity.
---</span>
</code></pre><p>This looks like this: 
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198787801/2d8GcxT6s.png" alt="image.png" />
Not bad for 30 seconds of work right?</p>
<h2 id="heading-making-it-your-own-with-custom-css">Making it your own with Custom CSS`!</h2>
<p>Hashnode lets you write <strong>Custom CSS</strong>! </p>
<ol>
<li>Go to the <strong>appearance</strong> tab.
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198805895/Df2xgwEIa.png" alt="image.png" /></li>
<li>Scroll down to Custom CSS Section and turn it on!
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198848065/t50chr9N9.png" alt="image.png" /></li>
<li>Click on edit custom stylesheet and write custom CSS for anything you want!</li>
</ol>
<p><strong>NOTE: Don't forget to click Update after you make any changes in settings</strong>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198860482/zlDPPpCB4.png" alt="image.png" /></p>
<p>If you want to do a custom header for the website like me, you can go to <a target="_blank" href="uigradients.io">uigradients.io</a> and get a gradient from there. </p>
<p>Next, open the stylesheet and add
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198878588/HMhk7IjfW.png" alt="image.png" />
In all the sheets (home, articles and pages).</p>
<h2 id="heading-custom-widgets">Custom Widgets</h2>
<p>Although I haven't used it yet, Hashnode also lets you create custom elements or <strong>widgets</strong>. You can use this to add reusable embeds in your articles or pages.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1662198897989/d9MICAQSg.png" alt="image.png" /></p>
<h2 id="heading-inspiration">Inspiration</h2>
<p>My website doesn't use hashnode to its full potential yet! There's a lot more that's possible. You can look for inspiration from the following people:</p>
<ul>
<li>https://samina.dev/</li>
<li>https://blog.greenroots.info/</li>
<li>https://chilimatic.hashnode.dev/</li>
<li>https://blog.avneesh.tech/</li>
<li>https://narmadanannaka.com/</li>
</ul>
<p>Plus its just CSS, you can go crazy with it!</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Look, I know it's not all the crazy animations or the cool ThreeJS effect you recently learned. But, it exists now. You can always iterate and improve your website, but having one and getting started with writing will take a long way.</p>
<p>We often wait for everything to be perfect and everything to be just right before we show it to the world. That's not the right approach here. Get started, share something, create something and improve it day by day.</p>
<p>Thanks for reading this article, I hope I could motivate you to finally create your own website without caring about perfectionism. If you create a website after reading this article, be sure to add it in the comments! I'd love to see what you come up with!</p>
]]></content:encoded></item><item><title><![CDATA[Never Get Stuck! As a Software Engineer]]></title><description><![CDATA[Intro
As software engineers, our job is to solve problems. And the reality of the job is, getting stuck sometimes. Please do not think you are less of a software developer or engineer just because you get stuck often. It's part of the job!
This is my...]]></description><link>https://kaviisuri.com/never-get-stuck-as-a-software-engineer</link><guid isPermaLink="true">https://kaviisuri.com/never-get-stuck-as-a-software-engineer</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[#week2]]></category><category><![CDATA[Problem Solving]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Career]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Sun, 28 Aug 2022 14:25:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661696464200/HdmLq_4xl.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>As software engineers, our job is to solve problems. And the reality of the job is, getting stuck sometimes. Please do not think you are less of a software developer or engineer just because you get stuck often. It's part of the job!</p>
<p>This is my 2nd submission for the Hashnode #4article4week challenge.</p>
<p>In this article, I'll outline a few things you can do to be <strong>unstuck</strong>. No matter what your stack or your problem, this process will be useful in finding the solution.</p>
<h2 id="heading-google-it">Google It!</h2>
<p>Yeah. It sounds basic, but I can't even count how many people skip this. Just take the error that is popping up or the situation that you are in and <strong>Google It!</strong> It's half our job! 
<a target="_blank" href="https://www.reddit.com/r/coolguides/comments/wxoq10/how_to_enhance_your_google_searches/">Here are a few tips on how to google it better</a></p>
<h2 id="heading-write-it-down">Write it down!</h2>
<p>Okay, most of the time, you'll just get the answer on google. But if you don't, it's time to get your writing skills out. Just write down the problem you are facing, the probable causes, and the feasible solution you can think of. </p>
<p>Sometimes, just doing this helps you think of a solution. Writing helps you understand the problem better. You solve stuff better if you understand it.</p>
<p>From now on, take time to document your understanding, possible solutions and everything. I know it's a lot of effort, but it's worth doing.</p>
<h2 id="heading-rtfm">RTFM!</h2>
<p>Okay, again a basic one, but <strong>Read the F</strong> ing Manual!** The excellent engineers behind the tools you use are also kind enough to write documentation. Treat it as the single source of truth. Understand how things work. You might find a solution or a better understanding to think of one.</p>
<h2 id="heading-you-aint-a-snowflake">You Ain't a Snowflake</h2>
<p>As much as we want to feel like snowflakes, we aren't. At least in the context of building software. Your project might be different, and the problem might feel different, but chances are <strong>someone faced this issue before.</strong> So look for people who were where you are right now. </p>
<p>Search on forums, GitHub issues, stack overflow, and maybe even subReddits. </p>
<h2 id="heading-take-a-break">Take a Break!</h2>
<p>If you still haven't solved the problem, take a break. Fresh eyes are amazing at giving new perspectives. You don't need someone else for fresh eyes, you can just take a break.</p>
<p>When you'll come back to the desk. Read what you wrote down. You'll get a different perspective. You'll get more ideas. Write them down and start experimenting.</p>
<h2 id="heading-be-hands-on">Be Hands-On</h2>
<p>I've seen many people do it. I've done it myself. We tend to work on research about a problem and forget to experiment with them. You don't need the perfect solution. Just start implementing one and remember. Git is your best friend in this. Don't mess up your progress because you forgot to commit stuff before your experimentation.</p>
<h2 id="heading-ask-for-help">Ask For Help</h2>
<p>Once you've done everything you can, and written everything down. Ask For Help. Rephrase your documentation into a consumable summary and ask for help. Reach out to seniors or colleagues and send them the document. This way you don't waste their time as you have the resources upfront. </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/kavii_suri/status/1477275075334131712">https://twitter.com/kavii_suri/status/1477275075334131712</a></div>
<h2 id="heading-ask-online">Ask Online</h2>
<p>While you talk to your seniors, put the internet to work. Take the question you asked your colleague. Also, post it on online communities like</p>
<ul>
<li>StackOverflow</li>
<li>GitHub issues of the technology</li>
<li>SubReddits like r/webdev r/programming and even specific ones to your technology</li>
<li>Discord servers </li>
<li>Twitter (reach out to me at <a target="_blank" href="https://twitter.com/kavii_suri">@kavii_suri</a>) </li>
</ul>
<h2 id="heading-share-share-share">Share! Share! Share!</h2>
<p>Once you're at this stage and hopefully have found a solution, remember to share. Why? Because the software community thrives on this. Remember how I said <strong>someone faced this issue before</strong>? Well, be that someone for someone else.</p>
<p>If you can help at least one person, that's worth it! Of course, there are benefits of posting online: personal branding, and networking but in the end, this isn't just about that, it's also about giving back to the community that supports you every day.</p>
]]></content:encoded></item><item><title><![CDATA[How I got my first internship by crashing their office!]]></title><description><![CDATA[Intro
Hi, I'm Kavii, an SDE Intern at Procol. I've been freelancing for the last 3 years. You can get to know more about me here. 
This story is about how I got my internship by literally crashing their office. No clickbait!
Rat Race
I don't think I ...]]></description><link>https://kaviisuri.com/how-i-got-my-first-internship-by-crashing-their-office</link><guid isPermaLink="true">https://kaviisuri.com/how-i-got-my-first-internship-by-crashing-their-office</guid><category><![CDATA[4articles4weeks]]></category><category><![CDATA[job search]]></category><category><![CDATA[week1]]></category><category><![CDATA[General Advice]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Sun, 21 Aug 2022 14:17:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661091191076/xeQWxT0ap.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hi, I'm Kavii, an <strong>SDE Intern at <a target="_blank" href="https://procol.io/">Procol</a></strong>. I've been freelancing for the last 3 years. You can get to know more about me <a target="_blank" href="https://kaviisuri.com/about">here</a>. </p>
<p>This story is about how I got my internship by literally crashing their office. No clickbait!</p>
<h2 id="heading-rat-race">Rat Race</h2>
<p>I don't think I need to tell you about how frustrating, and depressing the internship and placement seasons can be. You might do every question correctly. You might be the right candidate for them. But sometimes, as the famous lyrics go,</p>
<blockquote>
<p>In the end, it doesn't even matter. </p>
</blockquote>
<p>I was in a similar situation at the beginning of my 3rd year. I even did a few tests 100% correctly and didn't get shortlisted. Was there a valid reason? I don't know. I was just depressed and wanted a way to improve. </p>
<h2 id="heading-the-old-friend">The Old Friend</h2>
<p><a target="_blank" href="https://twitter.com/rohanxdesign/">Rohan Arora</a> has been my best friend from 2nd class. He was working as a product design intern at Procol at the time (P.S. Rohan is an awesome designer, do check him out). He asked me to give Procol a try, and in typical Rohan fashion, motivated me enough to do it. </p>
<p>I mailed HR. Got an interview because of the cold mail and referral (the 2 most underrated things to get a job). I was extremely excited. For the first time, I could talk to someone. Tell them why I was the right candidate. </p>
<h2 id="heading-the-first-round">The First Round</h2>
<p>I was lucky enough to have the first round with <a target="_blank" href="https://www.linkedin.com/in/mendirattasumit/">Sumit Mendiratta</a>, Co-founder and CTO @ Procol. Sumit has been a guiding light and mentor for me.</p>
<p>We had an awesome conversation about my motivations, what I wanted to do, what I could do at Procol etc. It went well and <strong>I got a mail about the next interview, the technical round</strong>. </p>
<h2 id="heading-the-technical-interview">The Technical Interview</h2>
<p>I was scared. Look, I'm an engineer. A developer. A tech enthusiast. What I'm not is a competitive programmer. I know my dev, but I hadn't memorised all the DS Algos on my fingertips. </p>
<p>I explained everything to the interviewer, Himanshu Arora, a brilliant senior engineer at Procol. He made an effort to tailor the process to understand the depth of my knowledge rather than checking rote memorisation. </p>
<p><strong>The interview went well</strong>, I got an email that I was selected and the <strong>next round was just about discussing my stipend and joining date</strong>. </p>
<p>I partied. </p>
<h2 id="heading-dreadful-silence">Dreadful Silence</h2>
<p>And then there was silence. Dreadful. A week passed, 2nd week did. I was waiting anxiously. After the 4th week, <strong>I got the response</strong>. Although they liked me as a candidate. <strong>They didn't have space for an intern on the team</strong> and were looking for someone more experienced as they were scaling. A valid point. But I was <strong>heartbroken</strong>. I went back to being frustrated. </p>
<h2 id="heading-the-random-trip">The Random Trip</h2>
<p><strong>Rohan was going to Gurgaon</strong> to work at Procol's office. We discussed and <strong>I tagged along</strong>. I knew, there was remotely any chance this would help, but I had to try. </p>
<p>Procol's office is at a WeWork. WeWork offices have community spaces where you can work by buying a pass. I bought one and started working on a freelance project. <strong>I didn't know what I was hoping for</strong>. </p>
<h2 id="heading-lunchtime">LunchTime</h2>
<p>It was lunchtime, Rohan came out, and so did Sumit. They talked and <strong>Sumit invited me over to talk</strong>. I was nervous. He acknowledged my hunger to work. Then we started discussing what I would work on if I was in Procol. I honestly got too excited about the tech and started scribbling in his notebook with his pen 😂. </p>
<p><strong>And an hour later. I had an internship</strong>. I got the offer letter the next day and joined a week later. It has been awesome since then!</p>
<h2 id="heading-working-at-procol">Working At Procol</h2>
<p>Since then, I've been working at procol. It's been almost 11 months now. Working here has been amazing. Procol has an amazing work culture with people who know their stuff and are cool enough to teach it to you. 
I've not only improved my skills in tech but also in communication and planning thanks to the amazing people working here. If you ask me, the best part about working here is that you get to build real stuff to solve problems are they don't limit you from exploring stuff.</p>
<p>Procol can be called a business revolution, a B2B software, an amazing startup, all of which it is. But as a part of Procol, it also feels like just a group of builders, marketers, business people etc who know their stuff. People who would rather solve problems than pushing around papers. </p>
<h2 id="heading-whats-the-point">What's the point?</h2>
<p>Look. I'm not saying go crash someone's office without permission because someone on the internet said so. 
What I am saying is, that randomness is the trend of this story. 
<strong>Randomness and Serendipity drive a lot more of our lives than we care to acknowledge</strong>. If we just keep working on ourselves and try to snatch each opportunity we get. Things work out. </p>
<p>I hope I gave you a different perspective on getting hired and your internships and placements. <strong>Best of Luck!</strong> </p>
]]></content:encoded></item><item><title><![CDATA[How to setup CD for AWS Elastic Beanstalk using CodePipeline?]]></title><description><![CDATA[Introduction
So, Now you have your code running on AWS. It's secure and cheap, but you still have to upload your code in zip files. How archaic😱!! Let's fix this in this article using another awesome AWS Service called the CodePipeline. This is gonn...]]></description><link>https://kaviisuri.com/how-to-setup-cd-for-aws-elastic-beanstalk-using-codepipeline</link><guid isPermaLink="true">https://kaviisuri.com/how-to-setup-cd-for-aws-elastic-beanstalk-using-codepipeline</guid><category><![CDATA[AWS]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[ci-cd]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Tue, 31 Aug 2021 15:42:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1630382154728/o7EUih1Lf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>So, Now you have your code running on AWS. It's secure and cheap, but you still have to upload your code in zip files. How archaic😱!! Let's fix this in this article using another awesome AWS Service called the CodePipeline. This is gonna be a short one guys.</p>
<blockquote>
<p>This article is a sequel to the previous one called  <a target="_blank" href="https://kavii.hashnode.dev/how-to setup-a-https-server-in-elastic-beanstalk-the-cheap-way">How to setup a https server in elastic beanstalk</a>. It's not required to read the previous one, but I would recommend doing so before reading this. </p>
</blockquote>
<h2 id="what-is-code-pipeline">What is Code Pipeline?</h2>
<p>It is an AWS Service that provides fully managed, continous devlivery that helps you automate the release pipelines for fast and reliable application and infrastructure.
You can automate various phases like </p>
<ul>
<li>Build</li>
<li>Test</li>
<li>Deploy
and this automation will run every time there is a code change.</li>
</ul>
<p>It supports various source code sources, we'll be using github but there is very little difference in how to use any other service if you need to.</p>
<h2 id="how-to-setup-cd">How to Setup CD</h2>
<p>Go to code pipeline option in your console and press "Create New Pipeline". </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630381331383/FGHTgUZiZ.png" alt="image.png" /></p>
<p>Enter the name and leave everything as default. Click "Next"</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630381374560/KEF2botrA.png" alt="image.png" /></p>
<p>In the source stage, select the provider and fill in the details. We'll be using Github (Version 2) here.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630381449076/AEzwehIaS.png" alt="image.png" /></p>
<p>If you require a build stage, configure this step. We'll be skipping this stage.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630381531434/T9VLqpwx3.png" alt="image.png" /></p>
<p>In the deploy stage, select AWS Elastic Beanstalk and fill other details.
Click "Next" and review everything. </p>
<h2 id="conclusion">Conclusion</h2>
<p>Once you submit, your pipeline will be active. Now, as soon as you push code to github, it'll reflect in your deployment very soon.</p>
<h3 id="readme-badges">Readme Badges</h3>
<p>If you need github readme badges, refer to [this article] (https://medium.com/swlh/aws-ci-cd-dynamic-build-badge-display-on-github-1e9a3b76db5a) for how to set it up. You can also use  <a target="_blank" href="https://www.npmjs.com/package/cdk-pipeline-status">this npm library</a>  for monitoring the status.</p>
]]></content:encoded></item><item><title><![CDATA[How to setup a https server in Elastic Beanstalk (The Cheap Way)?]]></title><description><![CDATA[Yeah.. I know, the title is a mouth full. To be honest, this is a very specific and niche usecase I faced and found no condensed resources. So, here is my attempt making one!! I hope this article helps you in the journey towards learning new things!!...]]></description><link>https://kaviisuri.com/how-to-setup-a-https-server-in-elastic-beanstalk-the-cheap-way</link><guid isPermaLink="true">https://kaviisuri.com/how-to-setup-a-https-server-in-elastic-beanstalk-the-cheap-way</guid><category><![CDATA[AWS]]></category><category><![CDATA[https]]></category><category><![CDATA[nginx]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[KaviiSuri]]></dc:creator><pubDate>Mon, 30 Aug 2021 10:03:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1630311754384/UtBgzPig5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Yeah.. I know, the title is a mouth full. To be honest, this is a very specific and niche usecase I faced and found no condensed resources. So, here is my attempt making one!! I hope this article helps you in the journey towards learning new things!!</p>
<h1 id="objectives">Objectives</h1>
<p>With this article, I just aim to setup a server with following properties :</p>
<ul>
<li>HTTPS - Secure Web Server.</li>
<li>Auto renewal of SSL certificates (from let's encrypt).</li>
<li>Elastic beanstalk with single instance mode (no load balancer)</li>
<li>Automatic Continous Deployment from github. <strong>Coming Up in the next Article</strong></li>
</ul>
<p>Since This might be a lot to take in, I'll write a seperate article on Continous Deployment.</p>
<p>I followed these steps for a project that had minimum requirements and tight budget constraints. I <strong>do not</strong> recommend this for bigger projects where scale matters a lot.</p>
<h1 id="tldr">TLDR;</h1>
<p>If you know elastic beanstalk and just want to know how to setup SSL, refer to this <a target="_blank" href="https://github.com/vahiwe/Elastic-Beanstalk-Single-Instance-SSL">source code from vahiwe</a> and copy the <code>.platform</code> and <code>.ebextensions</code> folders into your application.  Source of this code is this <a target="_blank" href="https://aws.plainenglish.io/setup-ssl-https-on-elastic-beanstalk-single-instance-environment-d748ea04437d">awesome article by vahiwe</a>.</p>
<p>Do not forget to set <code>DOMAIN_LINK</code> and <code>EMAIL_LINK</code> environment variables for the domain you want ssl certificate for and the email associated with it respectively.</p>
<h1 id="why-bother-reading-this">Why bother reading this?</h1>
<p>Although you might not face these specific conditions, this article will contain stuff that I didn't understand before this. Sometimes, we treat things like SSL, Nginx etc as black boxes that just do stuff, but <strong>The craft of engineering is about understanding the parts and making a better whole.</strong></p>
<h1 id="setting-up-aws-elastic-beanstalk">Setting up AWS Elastic Beanstalk</h1>
<h2 id="what-is-elastic-beanstalk">What is Elastic Beanstalk?</h2>
<p>Elastic Beanstalk or EB is an easy to use service from AWS for deploying and scaling web applications. It supports both uploading your code manually and stuff like CD by using AWS Code Deploy. It manages various things like creating new EC2 instances automatically, deploying your code to the server, starting your applications and much <strong>much</strong> more.</p>
<p>There are no extra charges for EB, you just pay for what you use e.g. EC2 instances, Load Balancers, CodeDeploy Pipelines etc.</p>
<h2 id="how-do-i-setup-one">How Do I setup one?</h2>
<p>Setting up a basic EB project is simple.</p>
<h3 id="create-new-eb-environment">Create new EB Environment</h3>
<p>In your AWS console, go to elastic beanstalk option and click "Create new Application"
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630308231020/7FPW64f9p.png" alt="image.png" />
Fill everything up and click "Configure More Options"
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630308286316/lgUygNAoc.png" alt="image.png" />
Make sure, the presets selects "Single Instance" and the Load Balancer Option says "This Configuration does not contain a load balancer"
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630308313605/ERe3BzZE8.png" alt="image.png" />
Select all other options that you require like Databases, Software Environment Variables etc and Click "Create App"
This will create a default environment for you.
Congrats, you now have a single instance EB application online. But it doesn't have your app. 😕</p>
<h2 id="configure-your-application-code-for-elastic-beanstalk-to-support-https">Configure your application code for Elastic Beanstalk to support HTTPS</h2>
<p>This step will be the quickest to do but the weirdest to understand.</p>
<h3 id="a-little-background">A little Background</h3>
<p>Elastic Beanstalk has a lot of features, some of them being providing a way to configure your application environment, do tasks pre and post deployments, customizing AWS resources and much more.
Most of it is done through special folders that live in your code base, specifically <code>.ebextensions</code> and <code>.platform</code> (.platform is supported for Amazon Linux 2 (recommended) instances, for Amazon Linux 1, we use just ebextensions)</p>
<h3 id="what-is-https-a-simplified-version">What is HTTPS (A simplified version) ?</h3>
<p>It is the secure version of HTTP which encrypts data that is transfered to increase secureity.  HTTPS not only encrypts the data but also helps the browser make sure that the data is going to the place it says it's going to. It identifies that when you send or recieve something from <code>google.com</code>, it goes and comes from <code>google.com</code>.</p>
<p>How all this is done is outside the scope of this article, but all you need to know is that this identification process requires a Certificate Authority to provide a "certificate" that is sent over and identifies your domain. We'll be using a well known and free certificate authority called let's encrypt. These certificate have exipiry dates and need renewal. Let's Encrypt provides a cli that can help us generate these programmatically.</p>
<h3 id="setting-up-nginx">Setting up Nginx</h3>
<p>Elastic beanstalk uses nginx as a default reverse proxy for your application, you can configure it and extend it by adding a <code>.conf</code> file to a folder name <code>.platform/nginx/conf.d</code> in your application source. These files are included automatically. A reverse proxy basically maps all incoming requests to suitable servers. You can learn a lot more about nginx on the web. It's a very large and intresting subject to read about.</p>
<pre><code>~/workspace/my-app/
|<span class="hljs-comment">-- .platform</span>
|   <span class="hljs-comment">-- nginx</span>
|       <span class="hljs-comment">-- conf.d</span>
|           <span class="hljs-comment">-- myconf.conf</span>
|<span class="hljs-comment">-- other source files</span>
</code></pre><p>We'll be using this <a target="_blank" href="https://github.com/vahiwe/Elastic-Beanstalk-Single-Instance-SSL">source code from vahiwe</a> and copy the <code>.platform</code> folders. The working of this is explained in this <a target="_blank" href="https://aws.plainenglish.io/setup-ssl-https-on-elastic-beanstalk-single-instance-environment-d748ea04437d">awesome article by vahiwe</a>.</p>
<h3 id="installing-certbot">Installing Certbot</h3>
<p>We use the <code>.ebextensions</code> folder from the same repo as above. It contains a <code>ssl.config</code> which is a EB config file and allows us to run some commands in the environment programmatically.
This file has the following <code>container_commands</code></p>
<pre><code><span class="hljs-attribute">container_commands</span>:
  <span class="hljs-number">10</span><span class="hljs-attribute">_downloadepel</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"sudo wget -r --no-parent -A 'epel-release-*.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/"</span>
  <span class="hljs-number">20</span><span class="hljs-attribute">_installepel</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm --force"</span>
  <span class="hljs-number">30</span><span class="hljs-attribute">_enableepl</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"sudo yum-config-manager --enable epel*"</span>
  <span class="hljs-number">40</span><span class="hljs-attribute">_installcertbot</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"sudo yum install -y certbot"</span>
  <span class="hljs-number">50</span><span class="hljs-attribute">_getcert</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"sudo certbot certonly --debug --non-interactive --email ${EMAIL_LINK} --agree-tos --standalone --domains ${DOMAIN_LINK} --keep-until-expiring --pre-hook \"</span>sudo service nginx stop\<span class="hljs-string">" --post-hook \"</span>sudo service nginx start\<span class="hljs-string">""</span>
  <span class="hljs-number">60</span><span class="hljs-attribute">_link</span>:
    <span class="hljs-attribute">command</span>: <span class="hljs-string">"ln -sf /etc/letsencrypt/live/${DOMAIN_LINK} /etc/letsencrypt/live/ebcert"</span>
</code></pre><p>This installs certbot and all it's dependencies in the AWS environment. It generates a SSL certificate using certbot for the first time using the environment variables <code>DOMAIN_LINK</code> and <code>EMAIL_LINK</code>, these are required variables and should be set from the EB console.</p>
<h3 id="setting-up-autorenewal">Setting up autorenewal</h3>
<p>The file also contains this piece of code that sets up a scheduled job or cron job that renews certbot weekly.</p>
<pre><code><span class="hljs-string">....</span> <span class="hljs-string">(stuff)</span>
<span class="hljs-attr">files:</span>
  <span class="hljs-string">/etc/cron.d/certbot_renew:</span>
    <span class="hljs-attr">content:</span> <span class="hljs-string">"@weekly root certbot renew\n"</span>
    <span class="hljs-attr">group:</span> <span class="hljs-string">root</span>
    <span class="hljs-attr">mode:</span> <span class="hljs-string">"000644"</span>
    <span class="hljs-attr">owner:</span> <span class="hljs-string">root</span>
<span class="hljs-string">....</span> <span class="hljs-string">(more</span> <span class="hljs-string">stuff)</span>
</code></pre><h1 id="conclusion">Conclusion</h1>
<p>And, there you have it, your application running on Elastic Beanstalk, with SSL security. You can just drag and drop a zip in Elastic Beantsalk Console for you environment and it'll deploy it.</p>
<p><strong>But what about CD?</strong> Well, this article has become too long and has a lot of information. I'll be posting another short one soon with details about how to do CD.</p>
]]></content:encoded></item></channel></rss>