<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manav Shrivastava on Medium]]></title>
        <description><![CDATA[Stories by Manav Shrivastava on Medium]]></description>
        <link>https://medium.com/@manavshrivastava?source=rss-5474554d48eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pEfyoePDeshBS-ey.</url>
            <title>Stories by Manav Shrivastava on Medium</title>
            <link>https://medium.com/@manavshrivastava?source=rss-5474554d48eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:35:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manavshrivastava/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Paying an LLM to Write an Essay When You Need a Yes/No]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manavshrivastava/stop-paying-an-llm-to-write-an-essay-when-you-need-a-yes-no-8d4b9c5beeae?source=rss-5474554d48eb------2"><img src="https://cdn-images-1.medium.com/max/1400/1*9zrKJpy4YwUhb1QrZ7wXWg.png" width="1400"></a></p><p class="medium-feed-snippet">The rise of decision models, why output tokens are an architectural anti-pattern, and what the independent data actually proves.</p><p class="medium-feed-link"><a href="https://medium.com/@manavshrivastava/stop-paying-an-llm-to-write-an-essay-when-you-need-a-yes-no-8d4b9c5beeae?source=rss-5474554d48eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manavshrivastava/stop-paying-an-llm-to-write-an-essay-when-you-need-a-yes-no-8d4b9c5beeae?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d4b9c5beeae</guid>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[ai-at-scale]]></category>
            <category><![CDATA[decision-model]]></category>
            <category><![CDATA[jevs]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 06:03:34 GMT</pubDate>
            <atom:updated>2026-10-18T06:03:34.171Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Your AI Agent Is the New Attack Surface]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manavshrivastava/your-ai-agent-is-the-new-attack-surface-2e64e5d84b5c?source=rss-5474554d48eb------2"><img src="https://cdn-images-1.medium.com/max/1400/1*EmAJTv8ukKaIQeCxKe6dCA.png" width="1400"></a></p><p class="medium-feed-snippet">Architecting for containment in the era of rogue autonomous systems and force-multiplied threat actors.</p><p class="medium-feed-link"><a href="https://medium.com/@manavshrivastava/your-ai-agent-is-the-new-attack-surface-2e64e5d84b5c?source=rss-5474554d48eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manavshrivastava/your-ai-agent-is-the-new-attack-surface-2e64e5d84b5c?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e64e5d84b5c</guid>
            <category><![CDATA[ai-at-scale]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 05:55:17 GMT</pubDate>
            <atom:updated>2026-10-18T05:55:17.421Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Great Prompt Tax Cut: How the October 2026 AI Pricing Realignment Changes Everything]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manavshrivastava/the-great-prompt-tax-cut-how-the-october-2026-ai-pricing-realignment-changes-everything-208d8af123c7?source=rss-5474554d48eb------2"><img src="https://cdn-images-1.medium.com/max/1400/1*sb1VP36o2VJqvHVZN5--6w.png" width="1400"></a></p><p class="medium-feed-snippet">Anthropic and OpenAI just converged on ~5% cache-read pricing within days of each other. Here is what that does to the break-even math for&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@manavshrivastava/the-great-prompt-tax-cut-how-the-october-2026-ai-pricing-realignment-changes-everything-208d8af123c7?source=rss-5474554d48eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manavshrivastava/the-great-prompt-tax-cut-how-the-october-2026-ai-pricing-realignment-changes-everything-208d8af123c7?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/208d8af123c7</guid>
            <category><![CDATA[ai-at-scale]]></category>
            <category><![CDATA[ai-economics]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[llm-agentic-workflow]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 15:30:42 GMT</pubDate>
            <atom:updated>2026-10-12T15:30:42.576Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Stop Paying the “Prompt Tax”: Why We Replaced Frontier APIs with an 8B Model on a $0.52/Hour GPU]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manavshrivastava/stop-paying-the-prompt-tax-why-we-replaced-frontier-apis-with-an-8b-model-on-a-0-52-hour-gpu-ee2434ed5e96?source=rss-5474554d48eb------2"><img src="https://cdn-images-1.medium.com/max/1024/1*3UkXq7gjpdI2UtI549mIfQ.png" width="1024"></a></p><p class="medium-feed-snippet">How Unsloth, custom Triton kernels, and QLoRA let us slash inference costs by 87% while getting 100% deterministic outputs.</p><p class="medium-feed-link"><a href="https://medium.com/@manavshrivastava/stop-paying-the-prompt-tax-why-we-replaced-frontier-apis-with-an-8b-model-on-a-0-52-hour-gpu-ee2434ed5e96?source=rss-5474554d48eb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manavshrivastava/stop-paying-the-prompt-tax-why-we-replaced-frontier-apis-with-an-8b-model-on-a-0-52-hour-gpu-ee2434ed5e96?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee2434ed5e96</guid>
            <category><![CDATA[ai-economics]]></category>
            <category><![CDATA[ai-at-scale]]></category>
            <category><![CDATA[unsloth]]></category>
            <category><![CDATA[fine-tuning]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 18:06:07 GMT</pubDate>
            <atom:updated>2026-10-11T18:06:07.146Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[OpenAI Unveils “Operator”: The Future of Autonomous Web Automation]]></title>
            <link>https://medium.com/@manavshrivastava/openai-unveils-operator-the-future-of-autonomous-web-automation-bf9413d005a5?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf9413d005a5</guid>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sat, 25 Jan 2025 19:29:32 GMT</pubDate>
            <atom:updated>2025-01-25T19:29:32.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oysH6E05QyNtdNXDA79J-Q.jpeg" /><figcaption>AI generated image</figcaption></figure><p>OpenAI has unleashed its latest game-changer, “Operator,” an advanced AI agent designed to revolutionize how we interact with the web. By mimicking human-like behavior, Operator autonomously navigates browsers to perform tasks like a pro. This viral innovation is a giant leap forward in AI, promising to redefine online productivity and simplify life for its users.</p><p><strong>What is Operator? Your AI Super-Agent</strong></p><p>Operator is a cutting-edge research preview of OpenAI’s Computer-Using Agent (CUA) model. Powered by GPT-4o’s unparalleled vision capabilities and advanced reasoning, Operator seamlessly interacts with web browsers just like a human — scrolling, clicking, typing, and even creating memes. This AI marvel can handle everything from booking travel to filling out forms, turning mundane tasks into effortless experiences.</p><p><strong>Game-Changing Features of Operator</strong></p><ul><li><strong>🚀 Autonomous Web Navigation</strong>: Forget tedious manual work. Operator autonomously navigates websites, clicks buttons, fills out forms, and completes complex browser-based tasks with ease.</li><li><strong>📅 Task Automation</strong>: Delegate time-consuming chores like scheduling appointments, managing online bookings, or even ordering groceries — Operator’s got it all covered.</li><li><strong>🤖 Advanced AI Reasoning</strong>: With GPT-4o’s advanced vision and reasoning, Operator can navigate intricate web layouts, process complex content, and execute highly detailed tasks without missing a beat.</li></ul><p><strong>Safety First: Built-In Ethical Safeguards</strong></p><p>OpenAI has embedded robust safeguards to ensure that Operator operates responsibly. Key measures include:</p><ul><li><strong>✅ User Approvals</strong>: Critical actions require user confirmation to prevent accidental or harmful decisions.</li><li><strong>🛡️ Security Monitoring</strong>: Operator is designed to detect and block potential prompt injections.</li><li><strong>🚨 Moderation Models</strong>: Active safeguards prevent unintended or malicious outcomes.</li></ul><p><strong>Challenges Today, Bright Horizons Tomorrow</strong></p><p>While Operator is a technological marvel, it is currently in its research preview stage and not without flaws. Users have reported:</p><ul><li><strong>⏳ Slower Speeds</strong>: Tasks may take longer to execute compared to manual efforts.</li><li><strong>💸 High Costs</strong>: The computational requirements of Operator can make it expensive for extended use.</li><li><strong>🔄 Occasional Errors</strong>: Early adopters note that accuracy and reliability can vary, leaving room for improvement.</li></ul><p>Despite these hurdles, Operator’s groundbreaking potential is undeniable. As OpenAI continues to refine and optimize its capabilities, Operator could transform how we engage with web services, ushering in an era of seamless, AI-driven productivity.</p><p><strong>The Bigger Picture</strong></p><p>OpenAI’s Operator is more than just a tool — it’s a glimpse into the future of human-AI collaboration. From managing online activities to tackling complex, multi-step tasks, Operator hints at a world where AI seamlessly integrates into our digital lives. While still evolving, its capabilities open the door to unprecedented productivity and convenience for users everywhere.</p><p>For an engaging introduction to Operator, check out this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCSE77wAdDLg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCSE77wAdDLg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCSE77wAdDLg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae22017b28c9a38083fe6d9bd3787755/href">https://medium.com/media/ae22017b28c9a38083fe6d9bd3787755/href</a></iframe><p>If you found this article helpful, please give it a clap 👏 and share it with your network! 🚀 Follow me for regular updates and deep dives into the latest AI innovations 🤖. Your support helps me keep delivering valuable content. Stay ahead with the newest AI trends — enjoy, and stay tuned for more! 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf9413d005a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Build a CLI | Command Line Interface with Node.js]]></title>
            <link>https://medium.com/@manavshrivastava/lets-build-a-cli-command-line-interface-with-node-js-d3b5faacc5ea?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3b5faacc5ea</guid>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[cli-tool]]></category>
            <category><![CDATA[terminal-commands]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Tue, 29 Mar 2022 14:00:03 GMT</pubDate>
            <atom:updated>2022-03-29T18:44:21.811Z</atom:updated>
            <content:encoded><![CDATA[<p>We use command-line utilities every day, whether it be git, grep, awk, npm, or any other terminal app.</p><p>CLIs are super useful and usually the fastest way to get something done.</p><p>Today we will learn how can we create our own CLI tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWNqDxNXYGvoL4oJx6aJow.png" /></figure><h3>Setting up the project</h3><p>We’ll be setting up a basic Node.js project:</p><ol><li>Open up your terminal.</li></ol><p>2. Create a folder for the project.</p><pre>~$mkdir mycli</pre><p>3. Navigate to it.</p><pre>~$cd mycli</pre><p>4. Initialize a Node.js project in that folder.</p><pre>~$npm init</pre><p>5. Fill in the prompt.</p><p>Your project is now set up.</p><h3>Building the basic CLI</h3><p>Now that we have our node project ready we move to actually make the CLI. Here’s what you have to do:</p><ol><li>Create a folder named bin in the root directory of your project.</li><li>Inside bin create a file called index.js This is going to be the entry point of our CLI.</li><li>Now open the package.json file and change the “main” part to bin/index.js.</li><li>Now manually add another entry into the package.json file called bin and set its key to mycli and it&#39;s value to ./bin/index.js. The addition should look something like this:</li></ol><pre>&quot;bin&quot;: {  <br>    &quot;mycli&quot;: &quot;./bin/index.js&quot;  <br>  }</pre><p>The key, mycli, is the <strong>keyword for calling the CLI</strong>. This is the keyword that people will type in the terminal for using your CLI. Be free to name it whatever you like, although I would suggest keeping the name short<br>and semantic so that it’s quick to type and easy to remember.</p><p>The name defined here is <strong>not permanent</strong> and can be changed whenever you like.</p><p>Now let’s install and test our CLI.</p><p>People may call our CLI from anywhere in the system so let’s install it <strong>globally</strong>.</p><p>Navigate to the root directory of the project and then run</p><pre>~$npm install -g .</pre><p>The -g the flag tells npm to install the package globally on the system.</p><p>Test the CLI by typing the specified keyword in the terminal.</p><pre>~$mycli</pre><h3>Handling Command Line arguments</h3><p>Our basic CLI is ready and now we move to add further functionality.</p><p>The most basic task that any CLI does is <em>handling command-line arguments</em>. In our CLI, we will be receiving the language name and the sentence to be translated as arguments and then we will parse it.</p><p>Although Node.js offers built-in functionality for handling command-line arguments, we are going to use an npm package called <a href="https://www.npmjs.com/package/yargs"><strong>yargs</strong></a> 🏴‍☠ which is specifically made for building CLI<br>s. yargs will simplify our process of parsing arguments and help us organize command-line flags.</p><ol><li>Install yargs</li></ol><pre>~$npm i yargs</pre><p>2. After installing it, include the module in your index.js :</p><pre>~$const yargs = require(&quot;yargs&quot;);</pre><p>3. Then create the options object containing all your command line flags:</p><pre>const options = yargs</pre><pre>.usage(usage)</pre><pre>.option(&quot;l&quot;, {alias:&quot;language&quot;, describe: &quot;Translate to language&quot;, type: &quot;string&quot;, demandOption: false })</pre><pre>.option(&quot;s&quot;, {alias:&quot;sentence&quot;, describe: &quot;Sentence to be translated&quot;, type: &quot;string&quot;, demandOption: false })</pre><pre>.help(true)</pre><pre>.argv;</pre><p>In the above code, I have defined an option -l which, when passed will print all the supported languages by the API, we will implement this later. Yargs provides us with --help and --version flags by default.</p><p>If you want an option to be compulsory then you can set it’s demandOption value to true , this will get yar<br>gs to throw a Missing argument error if the flag is not provided.</p><h4>mycli &lt;command&gt;</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*1IXXKMOglgBXn_DWNIv10w.gif" /><figcaption>mycli demo</figcaption></figure><h3>Beautification using Boxen and Chalk</h3><p>We can use terminal colors using <a href="https://www.npmjs.com/package/chalk"><strong>chalk</strong></a> and boxes to decorate our output using <a href="https://www.npmjs.com/package/boxen"><strong>boxen</strong></a><strong>.</strong></p><ol><li>Install chalk and boxen.</li></ol><pre>npm install chalk boxen</pre><p>2. Include them in your index.js</p><pre>const chalk = require(&#39;chalk&#39;);  <br>const boxen = require(&#39;boxen&#39;);</pre><p>3. Add color to the usage constant.</p><pre>const usage = chalk.keyword(&#39;violet&#39;)(&quot;\nUsage: mycli -l &lt;language&gt;  -s &lt;sentence&gt; \n&quot;</pre><pre>+ boxen(chalk.green(&quot;\n&quot; + &quot;Translates a sentence to specific language&quot; + &quot;\n&quot;), {padding: 1, borderColor: &#39;green&#39;, dimBorder: true}) + &quot;\n&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSnEY6gR_Y2NmvjvqjltLQ.png" /><figcaption>mycli</figcaption></figure><p>4. Display the output using a beautiful box.</p><pre>translate(sentence, {to: language}).then(res =&gt; {console.log(&quot;\n&quot; + boxen(chalk.green(&quot;\n&quot; + res.text + &quot;\n&quot;<br>), {padding: 1, borderColor: &#39;green&#39;, dimBorder: true}) + &quot;\n&quot;);}).catch(err =&gt; {                            <br>     console.error(err);  <br> });</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQit3SKmztz6oamBJdsmoA.png" /></figure><p>Hope you had fun learning how to build your own CLI :)</p><p>because I had a lot of fun.</p><p>Happy coding!</p><p>Here’s a list of the packages you can use specifically for developing the command-line tool:</p><ul><li><a href="https://www.npmjs.com/package/chalk">chalk</a> — colorizes the output</li><li><a href="https://www.npmjs.com/package/clear">clear</a> — clears the terminal screen</li><li><a href="https://www.npmjs.com/package/clui">clui</a> — draws command-line tables, gauges and spinners</li><li><a href="https://www.npmjs.com/package/figlet">figlet</a> — creates ASCII art from text</li><li><a href="https://www.npmjs.com/package/inquirer">inquirer</a> — creates interactive command-line user interface</li><li><a href="https://www.npmjs.com/package/minimist">minimist</a> — parses argument options</li><li><a href="https://www.npmjs.com/package/configstore">configstore</a> — easily loads and saves config without you having to think about where and how.</li><li><a href="https://oclif.io/">oclif</a> — The Open CLI Framework</li></ul><p>If you want to create and publish your npm package, you can read my below article -</p><p><a href="https://betterprogramming.pub/create-and-publish-your-npm-package-node-module-in-just-10-minutes-4b91e30fe9d7">https://betterprogramming.pub/create-and-publish-your-npm-package-node-module-in-just-10-minutes-4b91e30fe9d7</a></p><p>The complete code for this can be found at: <a href="https://github.com/manavshrivastavagit/mycli">https://github.com/manavshrivastavagit/mycli</a></p><p>Fork me on <a href="https://github.com/manavshrivastavagit/mycli">Github</a> maybe :)</p><p>Connect with me on <a href="https://www.linkedin.com/in/manav-shrivastava/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3b5faacc5ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is SOLID and how does it help us write better code?]]></title>
            <link>https://medium.com/@manavshrivastava/what-is-solid-and-how-does-it-help-us-write-better-code-b660799aa701?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b660799aa701</guid>
            <category><![CDATA[better-programming]]></category>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[oop]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sun, 10 Oct 2021 12:15:52 GMT</pubDate>
            <atom:updated>2021-10-10T12:15:52.351Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6chqoBn4KgYHHKQycdwkyw.png" /></figure><p>In software engineering, SOLID is one of the most popular sets of design principles in object-oriented software development.</p><p>The SOLID principles were introduced by Robert C. Martin in his 2000 paper <a href="https://fi.ort.edu.uy/innovaportal/file/2032/1/design_principles.pdf">“Design Principles and Design Patterns.”</a> These concepts were later built upon by Michael Feathers, who introduced us to the SOLID acronym. And in the last 21 years, these five principles have revolutionized the world of object-oriented programming, changing the way that we write software.</p><p>These principles establish practices that lend to developing software with considerations for maintaining and extending as the project grows. Adopting these practices can also contribute to avoiding code smells, refactoring code, and Agile or Adaptive software development.</p><p>Now, let’s begin!</p><p><strong>SOLID</strong> stands for:</p><p><strong>S</strong> — Single-responsibility Principle (SRP)</p><p><strong>O</strong> — Open-closed Principle (OCP)</p><p><strong>L</strong> — Liskov Substitution Principle (LSP)</p><p><strong>I</strong> — Interface Segregation Principle (ISP)</p><p><strong>D</strong> — Dependency Inversion Principle (DIP)</p><p>In this article, you will be introduced to each principle individually to understand how SOLID can help make you a better developer.</p><h3>1. Single-Responsibility Principle</h3><p>Single-responsibility Principle (SRP) states:</p><blockquote><em>A class should have one and only one reason to change, meaning that a class should have only one job.</em></blockquote><p>If a Class has many responsibilities, it increases the possibility of bugs because making changes to one of its responsibilities, could affect the other ones without you knowing.</p><p>Let’s see a few of its benefits:</p><ol><li>Testing — A class with one responsibility will have far fewer test cases.</li><li>Lower coupling — Less functionality in a single class will have fewer dependencies.</li><li>Organization — Smaller, well-organized classes are easier to search than monolithic ones.</li></ol><p><strong>Goal</strong></p><p>This principle aims to separate behaviors so that if bugs arise as a result of your change, it won’t affect other unrelated behaviors.</p><h3>2. Open-Closed Principle</h3><p>The Open-Closed Principle (OCP) states:</p><blockquote><em>Objects or entities should be open for extension but closed for modification.</em></blockquote><p>This means that a class should be extendable without modifying the class itself.</p><p>Changing the current behavior of a Class will affect all the systems using that Class.</p><p>If you want the Class to perform more functions, the ideal approach is to add to the functions that already exist NOT change them.</p><p><strong>Goal</strong></p><p>This principle aims to extend a Class’s behavior without changing the existing behavior of that Class. This is to avoid causing bugs wherever the Class is being used.</p><h3>3. Liskov Substitution Principle</h3><p>Liskov Substitution Principle states:</p><blockquote><em>Let q(x) be a property provable about objects of x of type T. Then q(y) should be provable for objects y of type S where S is a subtype of T.</em></blockquote><p>The Liskov Substitution principle was introduced by <a href="https://en.wikipedia.org/wiki/Barbara_Liskov">Barbara Liskov</a> in her conference keynote “Data abstraction” in 1987. A few years later, she published a paper with Jeanette Wing in which they defined the principle as:</p><p>If S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program.</p><p>This means that every subclass or derived class should be substitutable for their base or parent class.</p><p>When a child Class cannot perform the same actions as its parent Class, this can cause bugs.</p><p>If you have a Class and create another Class from it, it becomes a parent and the new Class becomes a child. The child Class should be able to do everything the parent Class can do. This process is called Inheritance.</p><p>The child Class should be able to process the same requests and deliver the same result as the parent Class or it could deliver a result that is of the same type.</p><p>The picture shows that the parent Class delivers Coffee(it could be any type of coffee). It is acceptable for the child Class to deliver Cappucino because it is a specific type of Coffee, but it is NOT acceptable to deliver Water.</p><p>If the child Class doesn’t meet these requirements, it means the child Class is changed completely and violates this principle.</p><p>If class A is a subtype of class B, we should be able to replace B with A without disrupting the behavior of our program.</p><p><strong>Goal</strong></p><p>This principle aims to enforce consistency so that the parent Class or its child Class can be used in the same way without any errors.</p><h3>4. Interface Segregation Principle</h3><p>The Interface Segregation Principle was defined by Robert C. Martin while consulting for Xerox to help them build the software for their new printer systems. He defined it as:</p><blockquote><em>A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use.</em></blockquote><p>When a Class is required to perform actions that are not useful, it is wasteful and may produce unexpected bugs if the Class does not have the ability to perform those actions.</p><p>A Class should perform only actions that are needed to fulfill its role. Any other action should be removed completely or moved somewhere else if it might be used by another Class in the future.</p><p><strong>Goal</strong></p><p>This principle aims at splitting a set of actions into smaller sets so that a Class executes ONLY the set of actions it requires.</p><h3>5. Dependency Inversion Principle</h3><p>The dependency inversion principle states:</p><blockquote><em>Entities must depend on abstractions, not on concretions. It states that the high-level module must not depend on the low-level module, but they should depend on abstractions.</em></blockquote><p>This principle allows for decoupling.</p><p>- High-level modules should not depend on low-level modules. Both should depend on the abstraction.</p><p>- Abstractions should not depend on details. Details should depend on abstractions.</p><p>High-level Module(or Class): Class that executes an action with a tool.</p><p>Low-level Module (or Class): The tool that is needed to execute the action</p><p>Abstraction: Represents an interface that connects the two Classes.</p><p>Details: How the tool works</p><p>This principle says a Class should not be fused with the tool it uses to execute an action. Rather, it should be fused to the interface that will allow the tool to connect to the Class.</p><p>It also says that both the Class and the interface should not know how the tool works. However, the tool needs to meet the specification of the interface.</p><p><strong>Goal</strong></p><p>This principle aims at reducing the dependency of a high-level Class on the low-level Class by introducing an interface.</p><p>Thank you so much for reading. I hope you have a better idea about this topic and you had as much fun reading this as I did writing it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b660799aa701" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to send emails using python]]></title>
            <link>https://medium.com/@manavshrivastava/how-to-send-emails-using-python-c89b802e0b05?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c89b802e0b05</guid>
            <category><![CDATA[gmail-smtp]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[send-email]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[smtp]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sun, 26 Jan 2020 16:53:34 GMT</pubDate>
            <atom:updated>2020-01-26T18:13:37.387Z</atom:updated>
            <content:encoded><![CDATA[<p>Here, we are going to learn how to send a simple basic mail using Python code. Python offers a native library to send emails- “SMTP lib”. “smtplib” creates a Simple Mail Transfer Protocol client session object which is used to send emails to any valid email id on the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dykm8o3XyYlyrwKnBg83lA.jpeg" /></figure><h3>smtplib Overview</h3><pre>The smtplib <strong>module</strong> defines an SMTP client session <strong>object</strong> that can be used to send<br>mail to any Internet machine <strong>with</strong> an SMTP <strong>or</strong> ESMTP listener daemon. </pre><pre>SMTP stands <strong>for</strong> Simple Mail Transfer Protocol. </pre><pre>The smtplib modules <strong>is</strong> useful <strong>for</strong> communicating <strong>with</strong> mail servers to send mail.</pre><pre>Sending mail <strong>is</strong> <strong>done</strong> <strong>with</strong> Python&#39;s smtplib using an SMTP server.</pre><p>Here are four basic steps for sending emails using Python:</p><ol><li>Set up the SMTP server and log into your account.</li><li>Create the MIMEMultipart message object and load it with appropriate headers for From, To, and Subject fields.</li><li>Add your message body.</li><li>Send the message using the SMTP server object.</li></ol><p>we are using a Gmail account to send a mail. Port number used here is ‘587’. And if you want to send mail using website other than Gmail, you need to get the corresponding information.</p><p><strong>Steps to send mail from Gmail account:</strong></p><ol><li>First of all, “smtplib” library needs to be imported.</li><li>After that, to create a session, we will be using its instance SMTP to encapsulate an SMTP connection.</li><li>In this, you need to pass the first parameter of the server location and the second parameter of the port to use. For Gmail, we use port number 587.</li><li>For security reasons, now put the SMTP connection in the TLS mode. TLS (Transport Layer Security) encrypts all the SMTP commands. After that, for security and authentication, you need to pass your Gmail account credentials in the login instance.<br>The compiler will show an authentication error if you enter invalid email id or password.</li><li>Store the message you need to send in a variable say, message. Using the sendmail() instance, send your message. sendmail() uses three parameters: <strong>sender_email_id, receiver_email_id and message_to_be_sent</strong>. The parameters need to be in the same sequence.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZjiaY95oivOkZ8Qu3OZhQ.png" /></figure><p>Get the code here: <a href="https://gist.github.com/manavshrivastavagit/9dce048cfd4f9023349882be938c6dbc">&lt;script src=”https://gist.github.com/manavshrivastavagit/9dce048cfd4f9023349882be938c6dbc.js&quot;&gt;&lt;/script&gt;</a></p><p><strong>For getting gmail_app_password,</strong></p><ol><li>Log in your Gmail account, go to <a href="https://myaccount.google.com/apppasswords">https://myaccount.google.com</a></li><li>Goto Security</li><li>Goto App Password: <a href="https://myaccount.google.com/apppasswords">https://myaccount.google.com/apppasswords</a></li><li>Generate a new app password, copy the password and use it in your app.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Fq04m-jZzn7ILy12yN4UA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Bo4wbT74E0h99yzp3EMkg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c89b802e0b05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrate RDBMS or On-Premise data to S3 using AWS EMR — Sqoop in 10 minutes]]></title>
            <link>https://medium.com/@manavshrivastava/migrate-rdbms-or-on-premise-data-to-s3-using-aws-emr-sqoop-in-10-minutes-45bf988d6a88?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/45bf988d6a88</guid>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <category><![CDATA[emr]]></category>
            <category><![CDATA[sqoop]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Sat, 07 Sep 2019 15:17:25 GMT</pubDate>
            <atom:updated>2019-09-07T15:17:25.535Z</atom:updated>
            <content:encoded><![CDATA[<h3>Migrate RDBMS or On-Premise data to S3 using AWS EMR -Sqoop in 10 minutes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTDiFKF-X-xJcGua-iGYmQ.png" /></figure><p><strong>Let’s begin, I have divided this story into 3 parts:</strong></p><ol><li>Setup Postgres Database</li><li>Create S3 buckets</li><li>Create AWS EMR Cluster</li></ol><p><strong>Prerequisite</strong> :</p><ul><li><a href="https://aws.amazon.com/">AWS Account</a></li><li>Hosted RDBMS (<a href="https://www.heroku.com/postgres">Postgres Database</a>)</li></ul><p>Here I am using <a href="https://www.heroku.com/postgres">Heroku Free Postgres Database Hosting</a>.</p><p>Once you have a hosted database, get the database credentials -</p><ul><li>Host</li><li>Database Name</li><li>Username</li><li>Password</li></ul><figure><img alt="Heroku Postgres Database dashboard" src="https://cdn-images-1.medium.com/max/1024/1*768FVj7Nr-1GYSyhql1UIQ.png" /></figure><p>Test your database connection, Here I am using <a href="https://www.jetbrains.com/datagrip/">DataGrip Database IDE</a>.</p><p>You can use any database IDE or Tool to test database connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUFBA-GZ0e8i_cMORWd0zA.png" /></figure><ul><li>After a successful database connection, create a new ‘users’ table and insert values into the table.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06fd5e442a5e93bf8c7860cb2f55895a/href">https://medium.com/media/06fd5e442a5e93bf8c7860cb2f55895a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zx1L8ytwaaKSNSzGv5L2HA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5e54d50fa76622d97655263052d228b/href">https://medium.com/media/d5e54d50fa76622d97655263052d228b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*rasx_FFGSvexYpEXCL6jag.png" /></figure><p>Now we have our Database Table ready, we can move to the next part of our story.</p><p><strong>Setup S3 buckets on AWS:</strong></p><ul><li>Login into your <a href="https://console.aws.amazon.com/console/home">AWS Console</a>.</li><li>Click on Services, search for ‘s3’.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZ1nCBMEC-I7cfwoK8sC8w.png" /></figure><ul><li>Create a new Bucket. Click the ‘+ Create bucket’ button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-MDwJr5VK7FLfXuyoduQA.png" /></figure><ul><li>Give your bucket a name then click the ‘Create’ button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQNXSiktKkoejR8IA94orw.png" /></figure><p>I have created three S3 buckets:</p><ul><li><strong>emr-sqoop-logs</strong>: this s3 bucket will contain all logs generated from aws EMR cluster.</li><li><strong>emr-sqoop-scripts</strong>: this bucket will contain our sqoop script.</li><li><strong>emr-sqoop-postgres-data</strong>: this bucket will hold our transformed Postgres data</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vLGTc1latipCdbOSkksjgQ.png" /></figure><p>After creating s3 buckets, its time to setup ERM cluster. Let&#39;s start!</p><p><strong>Setup AWS EMR Cluster</strong></p><p>Go to Services, search for ‘emr’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5NNbKfRTrF7T_zddqa39w.png" /><figcaption>AWS Console</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yE8fviicxUeE3vaSDaVoaw.png" /><figcaption>AWS EMR</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6MG60L3SP1JlZQJovC3JDg.png" /></figure><p>Click on ‘Go to advanced options’, Select latest emr version &amp; select ‘sqoop’ check box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vmTTy0jGtkgx7ZeX7eQAg.png" /><figcaption>AWS EMR Step 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s3B5SCU1Pase4h0470ioSA.png" /><figcaption>AWS EMR Step 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D27l5gxXRg_IzKWmD5AuCw.png" /><figcaption>AWS EMR Step 3</figcaption></figure><p>On Step 3, Change the S3 Logging folder to s3://emr-sqoop-logs.</p><p>On Step 4, Select your EC2 key pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMcL6_7eFokArNoSGiYSpg.png" /><figcaption>AWS EMR Step 4</figcaption></figure><p>Click on ‘Create cluster’ button, wait for some time, it will spin up a new EMR cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIURauHd3k051511ioJrUw.png" /><figcaption>AWS EMR Dashboard</figcaption></figure><p>Click on ‘View cluster details’ button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nRPbh9lE_-cpBVqlnMIMJQ.png" /></figure><p>Click on ‘Steps’ tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KE_sUeqo8ILQSU6ZdMznTQ.png" /></figure><ol><li>Select type as ‘Custom JAR’ and give this Step a Name.</li><li>On JAR location give ‘s3://<em>region</em>.elasticmapreduce/libs/script-runner/script-runner.jar’ where the <em>region</em> is the region in which your EMR cluster resides.</li></ol><p>For example ‘s3://<em>us-east-1</em>.elasticmapreduce/libs/script-runner/script-runner.jar’</p><p>Create a ‘run-sqoop.sh’ file and upload it into ‘emr-sqoop-scripts’<strong> </strong>bucket.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0757f0f931e10e4c40f0c060d9b8be3e/href">https://medium.com/media/0757f0f931e10e4c40f0c060d9b8be3e/href</a></iframe><p>Replace &lt;Host&gt; &lt;DBName&gt; &lt;DBUser &gt; &lt;DBPassword &gt; &lt;tableName&gt;</p><p>with your database credentails.</p><p>Great! We have completed the setup.</p><p>Now after finishing the jobs in EMR cluster, it will generate the CSV file which contains Postgres database table data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qanF_nTHC2jOJu-pYgE4uQ.png" /></figure><p>Check data on your ‘emr-sqoop-postgres-data’ bucket.</p><figure><img alt="emr-sqoop-postgres-data s3 bucket" src="https://cdn-images-1.medium.com/max/576/1*uHlN-4AXfdVRA_BUbp5OmA.png" /></figure><p>Keep Learning! If want to contact me, you can find me on <a href="https://www.linkedin.com/in/manav-shrivastava/">LinkedIn</a>, <a href="https://twitter.com/manavshrivastva">Twitter</a> and <a href="https://github.com/manavshrivastavagit">Github</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45bf988d6a88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create and Publish Your npm Package Node Module in Just 10 Minutes]]></title>
            <link>https://medium.com/better-programming/create-and-publish-your-npm-package-node-module-in-just-10-minutes-4b91e30fe9d7?source=rss-5474554d48eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b91e30fe9d7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[manav-shrivastava]]></category>
            <dc:creator><![CDATA[Manav Shrivastava]]></dc:creator>
            <pubDate>Mon, 02 Sep 2019 09:39:19 GMT</pubDate>
            <atom:updated>2019-09-05T22:23:24.077Z</atom:updated>
            <content:encoded><![CDATA[<h4>A step-by-step tutorial</h4><figure><img alt="create and publish your own npm package" src="https://cdn-images-1.medium.com/max/1000/1*wE6mMlXTCQQGZO2ADkn_PA.png" /></figure><p>Let’s begin, I am dividing this story into two parts:</p><ol><li>Create your own Node.js package.</li><li>Publish your package on <a href="https://www.npmjs.com/package/simple-hello-world-example">npm</a>.</li></ol><h3><strong>Prerequisites</strong></h3><ol><li><a href="https://nodejs.org/en/download/">Node.js</a></li><li><a href="https://nodejs.org/en/download/">npm</a></li></ol><p>To create your own Node.js package, create a new directory simple-hello-world-example in your system. Instead of simple-hello-world-example<strong> </strong>you can use your package name.</p><p>If you are in macOS, type the below commands in your terminal.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5565d75775e4f5ba3873a9d186d7121c/href">https://medium.com/media/5565d75775e4f5ba3873a9d186d7121c/href</a></iframe><ol><li>Create simple-hello-world-example<strong> </strong>directory.</li><li>Go inside simple-hello-world-example<strong> </strong>directory.</li><li>Create a package.json file inside your simple-hello-world-example<strong> </strong>directory<strong>. </strong>Copy-paste the below package.json code into your package.json file. Instead of the simple-hello-world-example you can use your package name.</li><li>The npm install command will create a new node_modules<strong> </strong>directory inside your simple-hello-world-example<strong> </strong>directory. If you see the package.json file, we have “devDependencies”: { “chai”: “4.1.2”, “mocha”: “5.0.5” }. When we run the npm install<em> </em>command, these will download <a href="https://www.chaijs.com/">Chai</a>, <a href="https://mochajs.org/">Mocha</a>, and other dependent packages inside your node_modules<strong> </strong>directory.</li><li>npm test command. Before running this command, first create a test.js file. Copy-paste the below test.js code into your test.js file.</li></ol><h3><strong>Project Structure</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*4z0ghESj_8WAMwpRtxh2NQ.png" /></figure><p>package.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb6b8118ff58bb08fc6a0f598cdb62ff/href">https://medium.com/media/fb6b8118ff58bb08fc6a0f598cdb62ff/href</a></iframe><p>index.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdbcd7ce6a203001bd4305572211551e/href">https://medium.com/media/fdbcd7ce6a203001bd4305572211551e/href</a></iframe><p>Here, in index.js, we have created a printMsg() function, which will return the string “Hello World!” when called.</p><p>test.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8377995c12302c913a1787874f4f42a7/href">https://medium.com/media/8377995c12302c913a1787874f4f42a7/href</a></iframe><p>In test.js, we are testing our printMsg() using node.js, Mocha, and Chai testing framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4wsKYnRYbIO51Sl3ZK2RBQ.png" /></figure><p>README.md</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d97473b9372bc350b13874f180bae0ff/href">https://medium.com/media/d97473b9372bc350b13874f180bae0ff/href</a></iframe><p>Below you can see the README preview, this is how it will look on the npm website.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36cf973b2825c7ce0287d1ac90a35c9f/href">https://medium.com/media/36cf973b2825c7ce0287d1ac90a35c9f/href</a></iframe><p>.gitignore<strong> </strong>file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33e961c9fd9f43a81dd84839bb1c27c4/href">https://medium.com/media/33e961c9fd9f43a81dd84839bb1c27c4/href</a></iframe><p>You can d<a href="https://github.com/manavshrivastavagit/simple-hello-world-example-npm">ownload the full project code</a> from GitHub.</p><p>Now, as we have created our package, it’s time to publish it on npm. For that, you need to register on the npm website.</p><p><a href="https://www.npmjs.com/signup">Sign Up</a></p><p><a href="https://www.npmjs.com/signup">Create a new account on npm</a> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X28M_p24mxoBQF5u3Ma1hg.png" /></figure><p><a href="https://www.npmjs.com/login">Log in to the npm website with your username and password</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svq9PHazvF4aZFG0pAwQKA.png" /></figure><p>Don’t forget to verify your email with npm and check your email for an npm verification mail.</p><p>After email verification, open the terminal, and type command npm login<em>.</em></p><ul><li>It will ask for your username: write your npm username.</li><li>Password: Write your npm password.</li><li>Email: Write your npm email which you have given when registering on the npm website.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nHzs-eF5Z4B_GEyYj3Bjw.png" /></figure><p>After successfully logging in, it’s time to publish your package on npm.</p><p>For publishing, go to your package directory in the terminal and type the command:</p><pre>npm publish</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1YeNeICjs4OjipWMeggvwQ.png" /></figure><p>Yippy! You have successfully published your own npm package on npm.</p><p>Congratulations!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rG9DICmeLYB612OnksI-ZA.png" /></figure><p>Go to your npm dashboard, click on the right side, <em>Packages</em><strong>. </strong>You can see your package on the npm website.</p><figure><img alt="your npm package" src="https://cdn-images-1.medium.com/max/1024/1*uq5x1bDIfzvpAfcwyXydgA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b91e30fe9d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/create-and-publish-your-npm-package-node-module-in-just-10-minutes-4b91e30fe9d7">Create and Publish Your npm Package Node Module in Just 10 Minutes</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>