<?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 Vaidhyanathan S M on Medium]]></title>
        <description><![CDATA[Stories by Vaidhyanathan S M on Medium]]></description>
        <link>https://medium.com/@vaidhyanathansm?source=rss-c38e7450a841------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LW_bxelxJ26qpdMUQadbWw.jpeg</url>
            <title>Stories by Vaidhyanathan S M on Medium</title>
            <link>https://medium.com/@vaidhyanathansm?source=rss-c38e7450a841------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:44:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vaidhyanathansm/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[The Illusion of Understanding: Are AI Models Truly Intelligent?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://vaidhyanathansm.medium.com/the-illusion-of-understanding-are-ai-models-truly-intelligent-eeddc4412c85?source=rss-c38e7450a841------2"><img src="https://cdn-images-1.medium.com/max/1280/1*qredX5lyX-Y5oQv2OIbGfA.jpeg" width="1280"></a></p><p class="medium-feed-snippet">Exploring whether AI&apos;s grasp of language reflects true understanding or an intricate illusion of intelligence</p><p class="medium-feed-link"><a href="https://vaidhyanathansm.medium.com/the-illusion-of-understanding-are-ai-models-truly-intelligent-eeddc4412c85?source=rss-c38e7450a841------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://vaidhyanathansm.medium.com/the-illusion-of-understanding-are-ai-models-truly-intelligent-eeddc4412c85?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeddc4412c85</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 15:14:26 GMT</pubDate>
            <atom:updated>2025-11-04T15:14:26.656Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Ethics of Code: Building Trustworthy AI Before It’s Too Late]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Why Guardrails Define the Future of AI</p><p class="medium-feed-link"><a href="https://vaidhyanathansm.medium.com/the-ethics-of-code-building-trustworthy-ai-before-its-too-late-5ef9c6249268?source=rss-c38e7450a841------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://vaidhyanathansm.medium.com/the-ethics-of-code-building-trustworthy-ai-before-its-too-late-5ef9c6249268?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ef9c6249268</guid>
            <category><![CDATA[responsible-ai]]></category>
            <category><![CDATA[person-of-interest]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[guardrail]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Tue, 28 Oct 2025 04:01:52 GMT</pubDate>
            <atom:updated>2025-11-09T05:14:04.889Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why 80% of AI Projects Fail — And How to Beat the Odds]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Uncover the common pitfalls behind failed AI initiatives and learn practical strategies to ensure your projects deliver real business&#x2026;</p><p class="medium-feed-link"><a href="https://vaidhyanathansm.medium.com/why-80-of-ai-projects-fail-and-how-to-beat-the-odds-49c7b00e41d1?source=rss-c38e7450a841------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://vaidhyanathansm.medium.com/why-80-of-ai-projects-fail-and-how-to-beat-the-odds-49c7b00e41d1?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c7b00e41d1</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Fri, 03 Oct 2025 05:47:52 GMT</pubDate>
            <atom:updated>2025-10-03T05:47:52.231Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Will AI Eventually Train on Its Own Output?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/theleanprogrammer/will-ai-eventually-train-on-its-own-output-6caa5e9435c8?source=rss-c38e7450a841------2"><img src="https://cdn-images-1.medium.com/max/1280/1*KvEr_G0Mo7-rcohXSN2aVw.jpeg" width="1280"></a></p><p class="medium-feed-snippet">The Looming Risk of Model Collapse</p><p class="medium-feed-link"><a href="https://medium.com/theleanprogrammer/will-ai-eventually-train-on-its-own-output-6caa5e9435c8?source=rss-c38e7450a841------2">Continue reading on TheLeanProgrammer »</a></p></div>]]></description>
            <link>https://medium.com/theleanprogrammer/will-ai-eventually-train-on-its-own-output-6caa5e9435c8?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/6caa5e9435c8</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[artificalintelligence]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 10:31:36 GMT</pubDate>
            <atom:updated>2025-08-16T10:48:32.528Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Event Propagation in JavaScript]]></title>
            <link>https://medium.com/fnplus/event-propagation-in-javascript-79b0e4c73de8?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/79b0e4c73de8</guid>
            <category><![CDATA[event-propagation]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[event-listener]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Wed, 03 Aug 2022 13:42:52 GMT</pubDate>
            <atom:updated>2022-08-04T15:20:44.325Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will look into Event Propagation in JavaScript. It is one of the most important concepts to understand in JavaScript when working with Event listeners.</p><h4>Introduction</h4><p>Event propagation refers to how an event travels through the Document Object Model. It can be thought of as electricity passing through a wire until it reaches its destination.</p><p>We are aware that DOM is full of nodes and when referring to event propagation, the event needs to pass through every node present in the DOM until it reaches the end or is forcibly stopped.</p><p>Event Propagation consists of <strong><em>3 phases</em></strong> when dealing with event listeners:</p><ol><li>Event Capturing</li><li>Target</li><li>Event Bubbling</li></ol><p>Event Capturing phase starts from the root and travels all the way to the target and once it’s reached the target, it goes into the bubbling phase which travels back up from the target to the root.</p><p>Let us consider a simple example. First of all, create an <strong>index.html</strong> file as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c01d775a373289042174cb93f469f232/href">https://medium.com/media/c01d775a373289042174cb93f469f232/href</a></iframe><p>The structure simply consists of a div(div2) which is a parent to a div(div1) that contains a button with the text “Click” as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PmBajLi3UDRt4jQ9yOMwg.png" /></figure><p>Now let’s add different event listeners to understand the different phases of event propagation. For this, let’s create a new file called <strong>index.js</strong> as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/52e7c9e607f5711f8d230e7973e85a1a/href">https://medium.com/media/52e7c9e607f5711f8d230e7973e85a1a/href</a></iframe><p>As you can see above, I have added event listeners to the window object, document object, the two divs and the button. Also, there is a third parameter added to the addEventListener() method, which is a boolean value that specifies which phase you want to go through. By default, that parameter is set as <strong><em>false</em></strong> which means it’ll go through the event bubbling phase. If it is set as <strong><em>true</em></strong>, it’ll go through the event capture phase.</p><p>Now, when you click on the button, you can see the following on the console. Since this is the Event capturing phase, it starts from the <strong>window</strong> and goes down and notifies all the other elements it comes across, all the way down to the target, which in this case is the button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*MC_EYficwPx7JRNV6V8Fmg.png" /><figcaption>Event Capturing</figcaption></figure><p>How do we trigger the third phase i.e., Event bubbling? To do that, change the third parameter of the addEventListener() method to <strong>false</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f170ba25d554f7c6ef1a7067dc5410b/href">https://medium.com/media/4f170ba25d554f7c6ef1a7067dc5410b/href</a></iframe><p>Now, you can see that it started from the button, then it’s going to div1 and then to div2 and so on bubbling upwards until it reaches the window object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*3dDqAF_4RZOgJLejLQ2UoQ.png" /><figcaption>Event Bubbling</figcaption></figure><p>We come to the end of this tutorial. This tutorial is heavily inspired by the video created by <a href="https://www.youtube.com/watch?v=5fb2aPlgoys">CodeLab</a>. Thanks for reading! Happy Coding!</p><p>If you have any queries please post them in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my fantastic collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="http://vaidhyanathansm.netlify.app/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79b0e4c73de8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fnplus/event-propagation-in-javascript-79b0e4c73de8">Event Propagation in JavaScript</a> was originally published in <a href="https://medium.com/fnplus">Fnplus Club</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular API Tutorial]]></title>
            <link>https://vaidhyanathansm.medium.com/angular-api-tutorial-d87f538ac33c?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/d87f538ac33c</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 16:07:49 GMT</pubDate>
            <atom:updated>2022-08-08T04:18:09.251Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAgYm4p1HgSB_FUjhuDn-Q.png" /></figure><p>Angular is a TypeScript based open-source web application framework which is used for building mobile and desktop web applications. In this tutorial, we are going to build a simple angular application that would fetch and display the details of a particular post office in a region.</p><h4>Project Setup</h4><p>First of all, let’s create a new angular application using the following command:</p><blockquote>ng new angular-api-tutorial</blockquote><p>Open the project in your favourite text editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*kB2UmB9t74fd5gQn-KyU_Q.png" /></figure><p>Now, let’s create a model to support the retrieval of post office details.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61109ab371e4add9c6854db6e535fb8e/href">https://medium.com/media/61109ab371e4add9c6854db6e535fb8e/href</a></iframe><p>Next, Let’s create a service by the name <strong>‘postoffice.service.ts’</strong> and write a method called ‘getPostOfficeDetails()’ and perform an HTTP GET request.</p><blockquote>ng g s postoffice</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e62d4b048885b3dff88cb8ba878c7c6/href">https://medium.com/media/7e62d4b048885b3dff88cb8ba878c7c6/href</a></iframe><p>Next, head over to <strong>app.component.html</strong> and create a basic form as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ac6ab80e8f2d24f5ddc70c07107141f/href">https://medium.com/media/8ac6ab80e8f2d24f5ddc70c07107141f/href</a></iframe><p>As it is evident from the above code that when the user clicks on the ‘Search’ button, the onSearch() method is called. Now, let’s define that method in the <strong>app.component.ts</strong> file. Also, we need to inject the service (postoffice.service.ts), that we created, into this component.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7646cae43042f9448eab8abea0e6b18/href">https://medium.com/media/d7646cae43042f9448eab8abea0e6b18/href</a></iframe><p>Now, to build the application (in dev mode) and open it in a live server, execute the following command:</p><blockquote>ng serve — open</blockquote><p>The application is completed successfully 🥳. Screenshots of the different scenarios is as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lyTxXXncTwFlach1HuYBhQ.png" /><figcaption>Valid Pincode</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*V03Zer_7d0TGEyXQrcv8jg.png" /><figcaption>Invalid Pincode</figcaption></figure><p>We come to the end of this tutorial. The code is available on <a href="https://github.com/smv1999/angular-api-tutorial">GitHub</a>. Thanks for reading! Happy Coding!</p><p>If you have any queries please post in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my amazing collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="http://vaidhyanathansm.netlify.app/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d87f538ac33c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Chrome Extension ?]]></title>
            <link>https://medium.com/theleanprogrammer/how-to-build-a-chrome-extension-b13582281c61?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/b13582281c61</guid>
            <category><![CDATA[google-chrome]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[google-chrome-extensions]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 15:04:58 GMT</pubDate>
            <atom:updated>2022-01-03T07:04:35.201Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building A Chrome Extension</h3><h4>Step By Step Guide With Prerequisites</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iHt7q6edhWcJpYw_AsSPg.png" /></figure><p>In this article, we are going to look at How to Build a Google Chrome Extension. It is very simple to create one and the only prerequisites are that you need to know basic HTML, CSS, and JavaScript.</p><p>We are going to create a Social Profile Launcher Extension. With this, we can quickly launch our social profile links in just one click. First of all, Let’s create a new project folder and name it “social_profile_launcher”. So, the folder structure is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*JJNPuDjXDmy2bTxbKMjMtg.png" /><figcaption>Project Folder Structure</figcaption></figure><p>We have an images folder that contains an image in its original size. In the project’s root folder, we have the same images reduced to 128 x 128 pixels and 19 x 19 pixels. Next, we have a manifest.json file. Every extension has this JSON formatted manifest file that provides important information about the extension. And then, we have an HTML and JS file.</p><p>Now, let’s start with the manifest.json file. This is the JSON formatted file that’s going to contain all the necessary information regarding the extension.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/284c637bcc917b0ffb3d394a8053a7cd/href">https://medium.com/media/284c637bcc917b0ffb3d394a8053a7cd/href</a></iframe><p>The activeTab permission gives temporary access to the currently active tab when the user invokes the extension. Access to the tab lasts while the user is on that page, and is revoked when the user navigates away or closes the tab.</p><p>Now that we are done with the manifest.json file, let’s move on to popup.html file, which is going to be the landing page when the user clicks on the launcher icon.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f49d33b65a4432c47cffaf0015688f19/href">https://medium.com/media/f49d33b65a4432c47cffaf0015688f19/href</a></iframe><p>As you can see above, we have the popup.js file here. We won’t be using it in our project, but if you were to add some functionality, you can very well do so.</p><p>Now, head over to “Manage Extensions”. Make sure “Developer Mode” is enabled. Then click on “Load Unpacked” on the top left and select the project folder. Now, the icon of our extension will be visible on the top right once you pin it. So, that’s it. We have created the chrome extension successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*oCDc5shO8H3NwLmq2zloZA.png" /><figcaption>Social Profile Launcher</figcaption></figure><p>We come to the end of this tutorial. Thanks for reading! Happy Coding!</p><p>If you have any queries please post in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my amazing collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="http://vaidhyanathansm.netlify.app/">here</a>.</p><p>Don’t forget to follow The Lean Programmer Publication for more such articles, and subscribe to our newsletter <a href="http://tinyletter.com/TheLeanProgrammer">tinyletter.com/TheLeanProgrammer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b13582281c61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/theleanprogrammer/how-to-build-a-chrome-extension-b13582281c61">How to Build a Chrome Extension ?</a> was originally published in <a href="https://medium.com/theleanprogrammer">TheLeanProgrammer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with FastAPI]]></title>
            <link>https://vaidhyanathansm.medium.com/getting-started-with-fastapi-cc005fb818d2?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc005fb818d2</guid>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 18:15:57 GMT</pubDate>
            <atom:updated>2021-11-04T11:48:13.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*du7p50wS_fIsaC_lR18qsg.png" /></figure><p>In this tutorial, we are going to explore FastAPI, more specifically building RESTful APIs and deploying the application on server.</p><p>FastAPI is a Web framework for developing RESTful APIs in Python. It fully supports asynchronous programming and can run with Uvicorn and Gunicorn. Uvicorn is a lightning-fast ASGI server implementation.</p><p>We’ll first start by creating a basic FastAPI application and then move on to deploying it on <a href="https://www.deta.sh/?ref=fastapi">Deta</a>.</p><h4>Create a basic FastAPI app</h4><p>Create a directory for your application and create a new file named <strong>main.py. </strong>This is the entry point of your application. We’ll be creating the endpoints in this file.</p><p>Before creating endpoints, we need to define data. Let’s consider a simple example of students. Let’s create a JSON representation of the details of students. After that, let’s create the endpoints for retrieving the data based on different scenarios.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b565c3874366f6854690503c0bd285b/href">https://medium.com/media/0b565c3874366f6854690503c0bd285b/href</a></iframe><p>As it can be seen from above, the data is stored in <strong>students, </strong>which consists of two elements with the id and corresponding object. The object consists of details such as name, age and class.</p><p>Let’s consider all the scenarios. Look at the first scenario; data to be retrieved when hitting the index page. “@app.get()” specifies that we are using GET method here. Also, the type of parameter here is <strong>path, </strong>and the path for this scenario is “/”. The second scenario is retrieving the data of a student with particular id. The path here is “/get-students/{student_id}” where student_id is an integer. The third scenario is retrieving the data of a student with a specific name. Here we make use of the query parameter. The path “/get-by-name” is appended to the URL and the query <strong>name</strong> is passed. In the third method, we are traversing the list of students and checking for a student whose name matches with the one provided by the user in the query. When a match is found, that particular object is returned. In the final scenario, the whole list of students is returned. The path here is “/get-students/”.</p><p>Now that we have implemented the endpoints, let’s move on to the next step.</p><p><strong>Requirements</strong></p><p>Now, in the same directory create a file <strong>requirements.txt</strong> with :</p><blockquote>fastapi</blockquote><h4>Deployment</h4><p>The first step in this is to <strong>create an account</strong> on <a href="https://www.deta.sh/?ref=fastapi">Deta</a>. The next step is to <strong>install</strong> the <strong>CLI</strong> version of Deta. If you are on a Linux machine, you can execute the following command on terminal.</p><blockquote>curl -fsSL https://get.deta.dev/cli.sh | sh</blockquote><p>After installing it, open a new terminal so that the installed CLI is detected. In the new terminal, confirm that it was correctly installed with:</p><blockquote>deta — help</blockquote><p>The next step is to login to Deta from the CLI.</p><blockquote>deta login</blockquote><p>This will open a web browser and authenticate automatically.</p><p>The final step is to deploy the application. Execute the following command inside the project directory.</p><blockquote>deta new</blockquote><p>You’ll see a JSON message similar to :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d2dd20d36e3c69d7c522e68da43e4de/href">https://medium.com/media/9d2dd20d36e3c69d7c522e68da43e4de/href</a></iframe><p>Now, open your browser with the endpoint URL. In the above example, it was <a href="https://hwzlsi.deta.dev/">https://hwzlsi.deta.dev/</a>, but yours will be different. You can test the API using different scenarios as discussed before. You can also perform interactive testing by going to /docs of your URL. It’ll show your docs like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RaczpN3KBCeNaGe-Yq34FQ.png" /></figure><p>Congrats! You deployed your FastAPI app to Deta! 🎉 🍰</p><p>We come to the end of this tutorial. Thanks for reading ! Happy Coding !</p><p>If you have any queries please post in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my amazing collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="http://vaidhyanathansm.netlify.app/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc005fb818d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Publish Your First Python Package on PyPI]]></title>
            <link>https://medium.com/theleanprogrammer/publish-your-first-python-package-on-pypi-3079d409792f?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/3079d409792f</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[pypi]]></category>
            <category><![CDATA[python-packages]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Thu, 19 Aug 2021 15:02:30 GMT</pubDate>
            <atom:updated>2021-09-01T14:41:47.437Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step by step process of making and publishing your first Python package on PyPI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Pj9okvqZzoC7Jgq7hv8pQ.png" /></figure><p>In this tutorial, we are going to learn how to develop a python package and publish it on <strong>PyPI</strong>. We are going to create a package called <strong><em>number-utility</em></strong>, which makes it simple for you to do number manipulation and perform various operations on numbers. We are going to use <strong>Git</strong> as a VCS for this project and host it on <strong>GitHub</strong>.</p><p>Let us look at the <strong>tasks</strong> that are to be completed in this process.</p><ol><li>Creating the folder structure of the project</li><li>Creating the setup.py file</li><li>Creating the Module(s)</li><li>Writing Tests and Performing Validation</li><li>Creating builds and distribution archives</li><li>Choosing a License and providing a README file</li><li>Publishing to PyPI repository</li></ol><h3>Project Folder Structure</h3><p>First of all, let’s look at the folder structure of the project. Create a folder by the name <strong>number_utility</strong>. Initialize an empty git repository on your local by executing the following command in the terminal:</p><blockquote>git init</blockquote><p>Next, create a .gitignore file. Head over to <a href="https://www.toptal.com/developers/gitignore">gitignore.io</a> and search for Python and copy the content generated to this .gitignore file. Create two files named setup.py and test_number_utility.py. Create a sub-folder named <strong>src </strong>inside the root (number_utility) folder and create a new python file called number_utility.py. The project folder structure would look like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*GxqgQjUzDv2behmZ2am-6Q.png" /><figcaption>Project Folder Structure</figcaption></figure><p>Do not worry about the files such as LICENSE and MANIFEST.in for now. We’ll look at them in the penultimate step of the process. Now that the folder structure of the project is ready, let’s look at the setup.py file.</p><h3>Creating the setup.py file</h3><p>The setup.py is a python file that indicates that the module/package is been packaged and distributed. This allows you to easily install python packages. Let’s define certain properties and parameters using the setuptools package. The setup.py for our project would like this :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92dae1c755b573ea1388fb22f830c3ab/href">https://medium.com/media/92dae1c755b573ea1388fb22f830c3ab/href</a></iframe><p>You may notice that we have configured a parameter <strong>extras_require</strong> and have defined some dependencies. These dependencies are required only in a development environment. Now that the setup.py is ready, let’s look at how to create the module.</p><h3>Creating the module</h3><p>Head over to <strong>number_utility.py</strong>. This is the file where we are going to implement the functionalities. As highlighted before, the purpose of this package is to help in <strong>number manipulation</strong> and perform <strong>operations on numbers</strong>. We are going to implement functions such as reverse_num(), sum_of_digits(), is_prime(), generate_primes(), get_factors() etc pertaining to operations and number manipulation. These functions are not present as built-in in python. In fact, the very purpose of creating a package is to add <em>missing functionalities</em>. The number_utility.py file would look like this :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2786fbc516ebb4db122d499cda4a3fb3/href">https://medium.com/media/2786fbc516ebb4db122d499cda4a3fb3/href</a></iframe><h3>Writing Tests and Performing Validation</h3><p>Before you move on to test the working of the package, you need to make sure to install the package locally in your machine. Also, make sure to install all the dev dependencies (mentioned in the setup.py). In order to do that, execute the following command in the terminal:</p><blockquote>pip install -e .[dev]</blockquote><p>Next, head over to <strong>test_number_utility.py</strong> file. Let’s start writing some tests for the module.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62ffc16531b369de93e5b0e17455ed65/href">https://medium.com/media/62ffc16531b369de93e5b0e17455ed65/href</a></iframe><p>To run the test, execute the command in the terminal:</p><blockquote>py.test</blockquote><p>After running the tests, you would get an output like this if the tests were successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87fYJGwsrldnbG0c7_ey3w.png" /><figcaption>Output after running the tests</figcaption></figure><p>This would be a great time for you to push your project to GitHub. Create a README.md file on GitHub. Also, choose an appropriate License template and create your LICENSE file too. Pull those changes into your local.</p><blockquote>git add .</blockquote><blockquote>git commit -m “Done with Testing”</blockquote><blockquote>git push</blockquote><p>Then make sure to pull the remote changes to your local machine before proceeding any further.</p><blockquote>git pull</blockquote><p>Now, let’s proceed with the next steps.</p><h3>Creating builds and distribution archives</h3><p>Now that the package is ready and tested, the next step is to create the distribution archives. Execute the following command to create the <strong>source distribution</strong>.</p><blockquote>python3 setup.py sdist</blockquote><p>After executing that command, you’d see the output as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqNN_tD9QmBX-CyDDaxTZw.png" /><figcaption>Creating Source Distribution</figcaption></figure><p>Let’s test the source distribution generated using the following command in the terminal:</p><blockquote>tar tzf dist/number_utility-0.0.3.tar.gz</blockquote><p>After the running the above command, you’d notice that the LICENSE and test_number_utility.py files are <strong><em>missing</em></strong>. In order to add those missing files, we need to make use of a package called <strong>check-manifest</strong>. Execute the following set of commands in the terminal:</p><blockquote>pip install check-manifest</blockquote><blockquote>check-manifest — create</blockquote><blockquote>git add MANIFEST.in</blockquote><p>Run the tar command again to check if the missing files were added. Next, we need to create the final build of the package. Execute the following command in the terminal:</p><blockquote>python3 setup.py bdist_wheel sdist</blockquote><p>Do verify if the distributions are created by listing the files present in the dist folder and also notice a build folder being created. Execute the following command to verify the same.</p><blockquote>ls dist/</blockquote><h3>Publishing to PyPI repository</h3><p>The package is ready to be published to PyPI. In order to do that, we need to make use of <strong>twine</strong>. Execute the following command in the terminal:</p><blockquote>pip install twine</blockquote><p>After that, make sure to create an account on <a href="https://pypi.org/">PyPI</a>. Then, execute the following command in the terminal :</p><blockquote>twine upload dist/*</blockquote><p>It’ll ask for your username and password. And that’s it. Your <a href="https://pypi.org/project/number-utility/">package</a> is live on PyPI !</p><p>We come to the end of this tutorial. If you are interested you might even want to contribute to the GitHub Repository. The link to the same is <a href="https://github.com/smv1999/number-utility">here</a>. Also, have a look at a package, that’ll be helpful for understanding and implementing Data Structures and Algorithms. The link to the same is <a href="https://pypi.org/project/py-dsa/">here</a>.</p><p>If you have any queries please post in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my amazing collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="http://vaidhyanathansm.netlify.app/">here</a>.</p><p>Don’t forget to follow The Lean Programmer Publication for more such articles, and subscribe to our newsletter <a href="http://tinyletter.com/TheLeanProgrammer">tinyletter.com/TheLeanProgrammer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3079d409792f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/theleanprogrammer/publish-your-first-python-package-on-pypi-3079d409792f">Publish Your First Python Package on PyPI</a> was originally published in <a href="https://medium.com/theleanprogrammer">TheLeanProgrammer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Custom Utility Header Files in C++]]></title>
            <link>https://medium.com/theleanprogrammer/creating-custom-utility-header-files-in-c-b72a05fa05ef?source=rss-c38e7450a841------2</link>
            <guid isPermaLink="false">https://medium.com/p/b72a05fa05ef</guid>
            <category><![CDATA[header-file]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[c-plus-plus-language]]></category>
            <dc:creator><![CDATA[Vaidhyanathan S M]]></dc:creator>
            <pubDate>Sun, 09 May 2021 15:16:33 GMT</pubDate>
            <atom:updated>2021-05-13T14:15:17.532Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56hSMlA55amx_VoKJkr54Q.png" /></figure><p>When coding in <strong>C++</strong>, we make use of many built-in libraries to simplify our tasks. Sometimes, we do feel some functionalities to be missing in these libraries. What if we could create our own <em>Custom Utility Header Files</em> to add more <strong>functionality</strong> to the existing ones. We are going to learn to do the same in this tutorial. So, gear up! Let’s begin.</p><h4>Introduction</h4><p>Consider the <strong>string</strong> header file in C++. It almost has all the functions that we need to perform various string operations and manipulations. But we can add more useful functions. We feel the need for more addition of new functionalities in the libraries in situations such as Implementing a project, Solving Data Structures and Algorithms based problems and etc. We can take inspiration from other programming languages such as Python and Java and try to implement functions that you find useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7vO2W3DnKHHdhBjeBdhTA.png" /><figcaption>Utility Header Files in C++</figcaption></figure><h4>Implementation</h4><p>Let us first create a file named <strong>String.h </strong>and declare the function prototypes as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/928893de62c87bb90ddb74fa19a4c28a/href">https://medium.com/media/928893de62c87bb90ddb74fa19a4c28a/href</a></iframe><p>Let us define the functions given as prototypes above one by one. The <strong>contains() </strong>function takes two strings as arguments and returns <strong>true</strong> if the second string is contained in the first string and <strong>false</strong> otherwise.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a46a9130fda59506a9ec0b8b75abef53/href">https://medium.com/media/a46a9130fda59506a9ec0b8b75abef53/href</a></iframe><p>We keep track of the frequencies of the characters of the string s1 and s2 using maps mp1 and mp2. We compare the frequency while traversing through the map mp2 and if s2 is not contained in s1 then we return false and otherwise true.</p><p>Let’s move on to the next ones, i.e., <strong>startswith()</strong> and <strong>endswith()</strong>. Programmers familiar with Python would immediately understand what these functions do. These functions check whether the string starts with or ends with the specified sub-string. These functions take the main string, the specified sub-string, the starting and ending index as arguments, where the start and end index are optional arguments.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd3c3f7b1f027211fe5e0cea0591fc27/href">https://medium.com/media/cd3c3f7b1f027211fe5e0cea0591fc27/href</a></iframe><p>Now, the next function is <strong>capitalize(). </strong>This function takes string reference as an argument and capitalizes the first character of the string.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbe8103c1ed054d424423a88dc952daf/href">https://medium.com/media/dbe8103c1ed054d424423a88dc952daf/href</a></iframe><p>The next one is <strong>count(). </strong>This function takes two strings as arguments and returns the number of times string s2 appears in string s1.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5fc27667104de4c0a16e331230e757a/href">https://medium.com/media/a5fc27667104de4c0a16e331230e757a/href</a></iframe><p>Next, we are going to use function overloading to implement a function that searches for the first occurrence of the string s2 or char ch in the string s1. They are defined as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/564f346634f2f2448a383883ba654d67/href">https://medium.com/media/564f346634f2f2448a383883ba654d67/href</a></iframe><p>Again, we are going to use function overloading to implement a function that searches for the last occurrence of the string s2 or char ch in the string s1. They are defined as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc737db2405bda6903a5f69296545bd7/href">https://medium.com/media/fc737db2405bda6903a5f69296545bd7/href</a></iframe><p>The next set of functions return true if <em>all the characters</em> in the string satisfy a <strong>certain condition</strong> such as all are alphabets, all are lower-case letters, etc. The functions are defined as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5546258409b3776607164a391cb32b73/href">https://medium.com/media/5546258409b3776607164a391cb32b73/href</a></iframe><p>The next function is <strong>istitle(). </strong>The function returns true if the string follows the rule of a title, i.e., if all the words in the string start with a capital letter. The function is defined as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/777079af11aaa7cd1d34126fbbf7ee6d/href">https://medium.com/media/777079af11aaa7cd1d34126fbbf7ee6d/href</a></iframe><p>The next set of functions convert the given string to <strong>lowercase</strong> or <strong>uppercase</strong>. The string reference is passed as arguments to these functions. They are defined as shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/408ff95b74c4b754714a94d9dd28ae1e/href">https://medium.com/media/408ff95b74c4b754714a94d9dd28ae1e/href</a></iframe><p>The next one is the <strong>split() </strong>function that takes the given string and the specified separator as arguments and returns a vector of strings split based on the separator.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80ad3c9122913f05c4e3c111200a2535/href">https://medium.com/media/80ad3c9122913f05c4e3c111200a2535/href</a></iframe><p>The next function is <strong>swapcase() </strong>that takes the reference to the given string as an argument and changes the lowercase characters to uppercase characters and vice-versa.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7e8b840799c97f9490250a990693e91/href">https://medium.com/media/e7e8b840799c97f9490250a990693e91/href</a></iframe><p>The next one is <strong>title(). </strong>It takes the reference to the given string as an argument and converts the first character of each word in the string to uppercase.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/77dddce9b9272499d117b4ce39b919af/href">https://medium.com/media/77dddce9b9272499d117b4ce39b919af/href</a></iframe><p>Now, we are going to use function overloading to implement a function that replaces the specified value in the string with the specified value passed as an argument to the function. They are defined as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d55dd55d0b4e71c83da03aa6c50530c/href">https://medium.com/media/0d55dd55d0b4e71c83da03aa6c50530c/href</a></iframe><p>We come to the end of this tutorial. The list of functions given here is not exhaustive and you can add your own functions that would make it more useful. If you are interested you might even want to contribute to the GitHub Repository that focuses on the very title of this article. The link to the same is <a href="https://github.com/smv1999/custom-header-files-cpp">here</a>.</p><p>Hope you enjoyed reading the article!</p><p>If you have any queries please post in the <strong>comment</strong> section below. Connect with me on <a href="https://www.linkedin.com/in/vaidhyanathansm/">LinkedIn</a>. Also, if you want to look at my amazing collection of apps developed, don’t forget to check <a href="https://play.google.com/store/apps/developer?id=Programmers+Gateway">Google Play Store</a>.</p><p>Know more about me <a href="https://vaidhyanathansm.tech/">here</a>.</p><p>With that being said, thanks for reading my article, and <em>Happy Coding!</em></p><p>Don’t forget to follow The Lean Programmer Publication for more such articles, and subscribe to our newsletter <a href="http://tinyletter.com/TheLeanProgrammer">tinyletter.com/TheLeanProgrammer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b72a05fa05ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/theleanprogrammer/creating-custom-utility-header-files-in-c-b72a05fa05ef">Creating Custom Utility Header Files in C++</a> was originally published in <a href="https://medium.com/theleanprogrammer">TheLeanProgrammer</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>