<?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 Gaurav Dasgupta on Medium]]></title>
        <description><![CDATA[Stories by Gaurav Dasgupta on Medium]]></description>
        <link>https://medium.com/@dasguptagaurav?source=rss-f3eda508e6f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*1tjoRRlako08uBsN5YlyPA.jpeg</url>
            <title>Stories by Gaurav Dasgupta on Medium</title>
            <link>https://medium.com/@dasguptagaurav?source=rss-f3eda508e6f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:52:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dasguptagaurav/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[Website Visitor Analytics System Design]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://dasguptagaurav.medium.com/website-visitor-analytics-system-design-8d3a6fc9040d?source=rss-f3eda508e6f6------2"><img src="https://cdn-images-1.medium.com/max/1260/1*twGjRrJUUns4FhsYYO4HwQ.jpeg" width="1260"></a></p><p class="medium-feed-snippet">My System Design for a privacy friendly visitor analytics on my website using Cloud based Postgres and Serverless Netlify Javascript&#x2026;</p><p class="medium-feed-link"><a href="https://dasguptagaurav.medium.com/website-visitor-analytics-system-design-8d3a6fc9040d?source=rss-f3eda508e6f6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://dasguptagaurav.medium.com/website-visitor-analytics-system-design-8d3a6fc9040d?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d3a6fc9040d</guid>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[gen-ai-revolution]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Tue, 17 Feb 2026 20:46:35 GMT</pubDate>
            <atom:updated>2026-02-17T20:47:09.302Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Fixing my broken website with Prompt Engineering]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://dasguptagaurav.medium.com/fixing-my-broken-website-with-prompt-engineering-700392af41cc?source=rss-f3eda508e6f6------2"><img src="https://cdn-images-1.medium.com/max/2398/1*m4SPdRXzdBw05z948pC6FA.png" width="2398"></a></p><p class="medium-feed-snippet">Classic example of debugging &amp; fixing my own broken website &#x201C;with AI&#x201D; and not &#x201C;by AI&#x201D;</p><p class="medium-feed-link"><a href="https://dasguptagaurav.medium.com/fixing-my-broken-website-with-prompt-engineering-700392af41cc?source=rss-f3eda508e6f6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://dasguptagaurav.medium.com/fixing-my-broken-website-with-prompt-engineering-700392af41cc?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/700392af41cc</guid>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 19:53:05 GMT</pubDate>
            <atom:updated>2026-01-29T20:44:30.930Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[GenAI.. the trend, the necessity or something more ?]]></title>
            <link>https://dasguptagaurav.medium.com/genai-the-trend-the-necessity-or-something-more-d6a3d6265783?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6a3d6265783</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Thu, 27 Feb 2025 19:57:35 GMT</pubDate>
            <atom:updated>2025-02-27T19:57:35.139Z</atom:updated>
            <content:encoded><![CDATA[<h3>GenAI.. the trend, the necessity or something more ?</h3><p>Reading The Phoenix Project: A Novel about IT, Devops and Helping Your Business Win on an indigo 6E flight enjoying a hot cup of my favorite Indigo coffee and enjoying a chicken junglee sandwich, it took me some odd 2.5 hours to reach Bangalore from New Delhi. Touching down the land of Bangalore was nostalgic for me since it is the place where my career got the start and one of my aspirations of becoming a software engineer came to life when I joined WIPRO Technologies on the 11th of July 2011.</p><p>I joined WIPRO under the WILP (Work Integrated Learning Programme) of BITS Pilani for pursuing my Masters of Technology in Software Engineering. In one of my white paper dissertations during the 4 year long course, I chose the topic of Natural Language Processing and named my whitepaper as “The Artificial Brain”. My research was around the various work which was being done across the world using the concept of Natural Language Processing and focussing on how we can use such science &amp; methods in our real business use cases. Even then the primary business question was how reliable are these models of artificial intelligence, are they production ready, how long can it take to understand and implement such a thing in real business apps/tools and is there ROI in such implementations.</p><p>Coming out of the flashback, I am back in the present. Its the Post-covid world, year 2025 and I am at the 2nd Edition of GenAI conference hosted by UBS forums as an attendee to gain insights into what the rest of the world is up to ! What are the great companies around us building using the outcomes of year long researches done in Machine Learning and AI.</p><p>The event was filled up of leaders from small and large organizations, there were speakers from different product and consulting companies. These speakers were primarily the directors of AI/ Data Science in their respective organizations like Ola Electric, Games 24x7, Uber, Nobroker.com, etc. And we also had panel discussions around the different nuances around the implementation of GenAI from leaders of AI in companies like WIPRO, Philips, Flipkart, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H5iQAKYlRpnkgTWl0DKTZw.jpeg" /></figure><p>I was witnessing all this sitting at one of the centrally placed round table along with the Global Solution Development Lead of my organization censhare. We at Censhare work for building the tech around our product which is <strong>C</strong><a href="https://www.censhare.com/en"><strong>enshare</strong></a> itself. It’s an omnichannel content platform which can easily boast about its simplicity and prowess of storing millions of assets and their relations, helping varied industries manage their content being made for campaigning or marketing sort of needs. And now we can proudly say that Censhare is part of <a href="https://entirely.com/"><strong>Entirely</strong></a> ! I am currently working here as the Team Lead of Research &amp; Development and I am responsible of building the recently launched <a href="https://documentation.censhare.com/"><strong>Censhare Cloud</strong></a> and managing the team of developers. We are evolving our offerings everyday and to enhance the user experience and productivity of our end users, we are also integrating GenAI gradually &amp; mindfully into our product. Listening to the brightest minds of the Applied AI space throughout the day and understanding how Generative AI is being used in these different organizations is an experience worth having. Communicating with such huge variety of leaders from some great product companies like Uber, Ola, etc, gave me the realization that yes its 2025 and we are here not anymore thinking of pros and cons of implementing AI but now we are actually doing it in daily lives.</p><p>We got to learn that now its not the question of how to do it, but what all to consider if we think of implementing it. Some of the questions we can ask ourselves while evaluating the need for GenAI in our solutions -<br>1. Who is our user and what does he/she need ?<br>2. Why they are using our product ?<br>3. How are they using it ?<br>4. At what level do we need to scale our solution ?<br>5. Can we adhere to all the Data Protection and AI related ACTs and Policies imposed by various governments (Like the DPDP ACT 2023 in India)<br>6. What are we trying to improve ?<br>7. Is GenAI the only solution ?<br>8. Is the implementation having the required ROI ?</p><p>As we progress in this journey of making our products AI enabled, we also need to consider all the nuances around it like the Security aspects &amp; the rising risks with the use of LLMs (Large Language Models). Some the evolving risks can be categorised as follows -<br>1. Hallucinating models<br>2. Data Poisioning<br>3. Data Exfiltration<br>4. Aligning LLM output by human prompts</p><p>For making sure you can deliver your solution to the required platforms, you need to understand about the packaging aspects, deployment pipeline aspects, Data Governance, AI Governance, Devops, DevSecOps, MLOps and what not! In short we are right now witnessing the best moment in the field of Information Technology and Computer Applications. Isn’t this the time and space I always dreamt of when I was doing my bachelors of computer applications in my college ? The answer from the within was… A BIG YES !</p><p>There’s a lot to discuss, a lot to build and a lot to write but I would like to end this beautiful journey of mine to this amazing space of GenAI filled with wizards across the industry and different walks of life!</p><p>I would like to end this by quoting one of the speakers Mr. <a href="https://medium.com/u/ea31156dce19">Srikanth Vidapanakal</a> , the Director of AI at Ola Electric Mobility —</p><blockquote>“Let AI do my laundry and the dishes and leave the poetry and arts to me”……</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6a3d6265783" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Access your website without www]]></title>
            <link>https://dasguptagaurav.medium.com/access-your-website-without-www-19f6b168d66?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/19f6b168d66</guid>
            <category><![CDATA[custom-domain]]></category>
            <category><![CDATA[godaddy]]></category>
            <category><![CDATA[hosting]]></category>
            <category><![CDATA[netlify]]></category>
            <category><![CDATA[nameserver]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Sun, 21 May 2023 18:10:16 GMT</pubDate>
            <atom:updated>2023-05-21T18:10:16.980Z</atom:updated>
            <content:encoded><![CDATA[<h4>Domain by godaddy and managed using netlify</h4><blockquote>What was the Issue ?</blockquote><p>I purchased by domain from godaddy for my personal portfolio by the name gauravdasgupta.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8i_S2CO7evRxmrhSEhVnQ.png" /></figure><p>I spent some time in playing around the web app . Started with Angular but then mood changed and built it again from scratch using React. But that’s a different story! Will be writing about this experience, may be in some other blog sometime.</p><p>After development I decided to host it and after some research and knowledge gained from some real good people I know on LinkedIn, I found out this amazing platform to built , deploy, manage domain settings and much more. Its called Netlify, which is already very popular among the developers, who love to quickly showcase their latest apps and other work on the web!</p><p>Next I spent some 2 days with netlify and hosted my application using the platform and configured it to use my domain from godaddy. Below is the Domain management dashboard .. how it looks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQW4jqLcKN0441XwwutUvA.png" /></figure><p>My site came up quickly and I was able to access it on <a href="https://gauravdasgupta.com/">https://www.gauravdasgupta.com</a></p><p>The problem started when I started distributing my website name to my friends, family and colleagues. I got the feedback that the users are not able to hit the application. I checked the deployment and the domain settings and everything looked fine. I started checking the problem as a user myself and got the problem that when I try to access my website by just typing gauravdasgupta.com on my browsers, its landing nowhere but to a godaddy default page. But next I saw that the problem is not huge and I can still survive with the URL <a href="https://www.gauravdasgupta.com/">https://www.gauravdasgupta.com</a> embedded everywhere in my profiles, resumes, posts, etc. So I was lazy and was living with it for another 1 year almost!</p><blockquote>But then what happened ? Did you solve it ?</blockquote><p>Yes then one fine day when this problem suddenly popped up in front of me and I decided to solve it now without any delay. And as any other developer would do, I started the art of solving issues called “googling”. After reading some stackoverflow threads, godaddy and netlify support threads, I started connecting the dots and found out that the main issue is that I am missing the redirection of domain in my netlify configurations. So I started the Trial and Error method and below are the set of final steps I followed to get it working !</p><h4>Final Solution</h4><ol><li>On godaddy go to your domain portfolio</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RippqlZumZDGY0Ef5O_D6g.png" /></figure><p>2. Click the spread button (3 dots …) next to the domain name and select “Edit Nameservers”. Earlier I used to have the default Godaddy Nameservers. Now I changed them to “I will use my own nameservers”. (see screenshot below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tDKY4W7TXlN2HYGbLNvreA.png" /></figure><p>3. Next to get the nameservers, on your netlify account you need to configure custom domain. If you have not already done it. Here are the those steps — <a href="https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/">https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/</a></p><p>4.After setting up the custom domain as the domain which we have from godaddy. In my case, gauravdasgupta.com. We will see the “Awaiting External DNS ” status next to the custom domian.</p><p>5. When we click on the above status we will get to see the custom nameservers provided by netlify. Now since my app is deployed/hosted on netlify and I want to use the domain taken from godaddy, I will have to go to my domain registrar(godaddy) and change my domain’s name servers to the following custom hostnames assigned to my DNS zone. (see screenshot below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNqnBPFcnjjbl67kpi26TA.png" /></figure><p>6. So as we understand by now, we have to copy these nameservers one by one and add them to the Edit Nameservers module of godaddy. (screen shown in step 2)</p><p>7. After step number 6, it might take around 24 hours for the DNS changes to propagate. Although in my case it was done within 30 mins.</p><p>8. Once the “Awaiting External DNS” status is resolved and vanished from the netlify custom domains section (discussed in step 4), next step is to solve the actual issue that my site is now accessible only using www in the URL. What we want is that my site should implicitly get redirected to www but the user should not provide the same while typing the URL. For this the article shared here gives the exact solution — <a href="https://answers.netlify.com/t/site-wont-open-without-www-managing-dns-through-netlify/9100">https://answers.netlify.com/t/site-wont-open-without-www-managing-dns-through-netlify/9100</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-NWKJsp6RSjMgL6D0TLYA.png" /></figure><p>9. Finally along with <a href="http://www.gauravdasgupta.com,/">www.gauravdasgupta.com,</a> I also added the domain gauravdasgupta.com and marked it as the primary domain and made sure that in the config the secondary domain redirects automatically to the primary one (see screenshot below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qz9jTipKpRYVcShujI-LIQ.png" /></figure><blockquote>Remember….</blockquote><p>As we are changing DNS configs and the changes need to get propagated among Netlify and Godaddy servers, sometimes you might face some delays in between some steps. So sometimes a little patience (max 10 mins) can help !</p><p>And now you can simply reach out to me via <a href="https://gauravdasgupta.com/">gauravdasgupta.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGq4aR6KgSy6o3mTI9agNw.png" /></figure><p>This is my web app which is a single page app build solely using <a href="https://react.dev/">reactjs</a> and it shows my content published on youtube, my resume, too many ways to reach out to me and in future it’s going to show much more creative content (which I am working on in my whenever found so called leisure time) !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19f6b168d66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being known as a technology enthusiast organisation]]></title>
            <link>https://dasguptagaurav.medium.com/being-known-as-a-technology-enthusiast-organisation-9808401909e5?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/9808401909e5</guid>
            <category><![CDATA[social-media-marketing]]></category>
            <category><![CDATA[hiring-strategy]]></category>
            <category><![CDATA[technology-and-software]]></category>
            <category><![CDATA[branding]]></category>
            <category><![CDATA[company-culture]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Sat, 26 Jun 2021 21:32:45 GMT</pubDate>
            <atom:updated>2021-06-28T08:01:10.685Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1xeoIhlGrJChLyPz" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s start thinking like an individual who steps into the sea of jobs and opportunities and is looking for a place that meets his requirements whether it’s financial, geographical, social or anything else which is personal. On top of that if this person is a software engineer who is a technology enthusiast, who is in the process of giving interviews in different Product and Service companies, may have some of the below expectations in his/her list before chosing a right place for him/her-<br>1. Competitive pay package<br>2. Friendly employee policies and perks<br>3. The correct work culture<br>4. A technically enriched and influential brand</p><p>Above items in the list are some of the few features which make places like Google, Microsoft, Amazon, Facebook, Walmart, etc the most cherished options for many. These companies may be the peak of influencing work places but there are many other players in the industry who are known for making the workplace a desired place to be in. You may be having your own such favorites. But what is the main ingredient that makes some companies so special in the wishlist/priority list of technology enthusiasts ?</p><p>In this blog post I will try to look for this very special ingredient with my own perspective, experience and influences. And this may vary, from person to person.</p><h4><strong>Becoming the home for innovations</strong></h4><p>For me it is the practice of developing a place where a product or products is/are made with the passion for best practices in technology, innovation, latest industry trends, focus on sound architecture, long term vision and sound enough product and project lifecycle methodologies.</p><p>Without pointing to some companies/organizations specifically, I would list down some of the common traits found in all of them.</p><ol><li>Freedom of creativity (<em>need constant push and motivation</em>)</li><li>Freedom to share ideas (<em>also inspire people to share ideas</em>)</li><li>Employee growth parameters linked to learning</li><li>An environment which kindles the passion for learning</li><li>Constant employee feedback mechanism and quick process to implement suggestions(<em>obviously after filtering them</em>)</li><li>Flexible working hours</li><li>Work from home (<em>especially with reference to the current pandemic situation</em>)</li><li>Employee friendly policies and perks</li><li>Policies related to health and wellness (<strong><em>very important aspect</em></strong>)</li><li>Organisation should make efforts towards the health and fitness of people and must boost people for sports, physical fitness as well as mental &amp; spiritual health.</li><li>A strong, simple and robust hiring process.</li></ol><p>Above are some of the many important traits of a successful, famous and attractive to employee companies. These things are very easy to be listed down but the real challenge is execution. Let’s try to see things from a deeper perspective.</p><h4><strong>Being known for your culture of innovation</strong></h4><p>Some cool steps which can be taken to create a culture of innovation and at the same time create the same image outside the company(these steps can be taken into the action only after understanding that this will not work like a magical wand, it will take years and years of hard work, passion and dedication to create the culture)</p><ol><li>Engage the technical people into discussions with the help of deep dive sessions, tech talks, webinars, etc.</li><li>Make the organisation a home to open source contributors by pushing and encouraging people to get involved in such practices (people will need influencers in the beginning and then a time will come when this company will be known to create influencers)</li><li>Help people develop the habit of writing technical blogs. Remember these things need to get published to outside world in order to get known as the technology loving and open source contributing organisation!</li><li><strong><em>Studies say that in the present times people find it easier to understand concepts/recipes by watching a video over just plain text </em></strong><em>(stats given in the image below)</em></li><li>Actively take part in bigger and global forums. (Examples- ngConf, GraphQL conferences, technical community meetups like Google Cloud Developer conferences happening all around the globe)</li><li>Help people to develop the habit of learning something in a sound way before starting to implement the same. This will eventually lead to having technical experts all over in your organisation.</li><li>Start hosting technical events. Remember, to get known as a technology company, <strong>you have to stop just being the audience</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CUiHCRc1w1lyILlhliUCA.png" /><figcaption>source: <a href="https://www.orbitmedia.com/blog/blogging-statistics/">https://www.orbitmedia.com/blog/blogging-statistics/</a></figcaption></figure><p><strong>Disclaimer</strong>: In the above process, we should <strong><em>make sure to keep the environment inside our work place</em></strong> <strong><em>easy to breathe in</em></strong>. We should not simply force people or impose things upon them. <strong><em>Learning and innovation is a creative process</em></strong> and should be dealt with high level of compassion and with respect for people’s opinion and interests. <strong>Remember, everybody can’t and ought not learn everything!</strong></p><h4><strong>Start growing physically, mentally and spiritually</strong></h4><p>In present days, just paying ok and having some technical project work is not enough. Now a days people are dealing with numerous ailments related to physical and mental health. The sedentary jobs we have are just making sure to make these things go worse. We should be the ambassador for fitness by conducting regular fitness sessions like aerobics, yoga and meditation. We should make sure we are projecting these aspects in our culture to the outside world.</p><h4><strong>Getting the hiring process right</strong></h4><p>Having a sound hiring process has always been a constant challenge for every company. On top of it the present era of work from home/ remote working has made the process even challenging! So it is very important to take this aspect of your company culture in consideration.</p><p>There are unending factors which can help a company to make a robust, concrete and at the same time a very flexible hiring process. But while we think of listing down some of those factors, we should keep in mind to design interviews in a way that projects a very good image of the company in front of the applicants. Few of them from my perspective can be below -</p><ol><li>Keeping it generic - focus less on programming language but more on concepts.</li><li>Hands-on is what is really important, we can’t be sure of a person without having him tested on the grounds of actual code writing.</li><li>Emphasize on use cases rather than direct questions.</li><li>Don’t judge everyone with the same lens. We might lose good talent!</li><li>Make the interview a real learning process for the individual applicants.</li><li>It really makes sense to provide as well as receive feedback on the hiring process even if we are rejecting a candidate.</li></ol><h4><strong>The social angle</strong></h4><p>In the present times, just working brilliantly but within a silo is foolishness! If we are doing great things then we must be projecting the same to the outside world. Some final points to understand this angle-</p><ol><li>Projecting our knowledge over technical topics/ technologies to the outside world via blogs, videos, participation in technical forums, hosting technical events, etc.</li><li>Keeping an eye on the external forums like glassdoor. Not even a single negative comment should be under estimated.</li><li>Keeping the attitude of contributing to open source projects, technologies or libraries and also being known for the same</li><li>Project your developers as heroes to the technology community around us!</li><li>Being active on platforms like linkedIn, twitter, youtube, etc!</li><li><strong>Remember- It is important to make some noise!</strong></li></ol><p>I hope the article has been able to address a topic which you might have been looking for, in the back of your mind. I am always open for suggestions and discussions. I am a passionate technical video content maker, I believe in sharing and helping the world in whatever way I can. My technical videos are published on my youtube channel <a href="https://www.youtube.com/channel/UCU2ORXboj6_hQW1gnakzaVg">https://www.youtube.com/channel/UCU2ORXboj6_hQW1gnakzaVg</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9808401909e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[noEmitOnError]]></title>
            <link>https://dasguptagaurav.medium.com/noemitonerror-61cabd59bfbb?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/61cabd59bfbb</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript-development]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Wed, 04 Mar 2020 15:47:07 GMT</pubDate>
            <atom:updated>2020-03-04T15:47:07.673Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Error in Typescript, still the Javascript is generated by the Transpiler ? Let’s dig in why ?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Y4bSopnT-O0EwZigcqy3Q.png" /></figure><p>Have you ever come across the problem that there are some errors in your typescript (.ts) file and when you compile it, even after displaying an error in the terminal ( either in your command line or in terminal of VSCode) it successfully generates the equivalent javascript (.js) file !</p><blockquote>Point of concern here is <strong>why is the typescript transpiler is behaving in such a way ? Is this a known behaviour or is it a bug ? If it’s a bug, is there a solution available already ? And if its an obvious behaviour then what exactly might be the reason ?</strong></blockquote><p>We will go answering the concerns above one by one …</p><h3>Why Transpiler generates javascript even after errors in typescript ?</h3><p>This is an intended behaviour as a key scenario for migrating existing javascript. Here is an answer to this issue reported on github</p><blockquote>This is a key scenario for migrating existing JavaScript — you rename some .js file to .ts, get some type errors, but want to keep getting compilation of it while you refactor it to remove the type errors. They are ‘warnings’ in that sense; we cannot <em>guarantee</em> that your program does not work just because it has type errors. — <a href="https://github.com/RyanCavanaugh">RyanCavanaugh</a> (Development lead for the TypeScript team at Microsoft)</blockquote><p><a href="https://github.com/Microsoft/TypeScript/issues/828">https://github.com/Microsoft/TypeScript/issues/828</a></p><p>So as we understand that if by default we restrict the transpiler to generate javascript only if the typescript has no type errors, then it would not solve the whole sole purpose of the typescript superset.</p><p>Typescript is built on top of javascript and adds syntactic sugar to the already beautiful javascript. So in order to make the whole community easily adapt and migrate to typescript or typescript based frameworks, it is extremely important to ensure that people are not hard bounded by the type checks.</p><h3>But how to address this scenario ?</h3><p>In order to make sure that in case of any type error in your typescript file(s) the transpiler does not generate the javascript file(s), typescript has come up with a flag known as <strong><em>“noEmitOnError”</em></strong> as part of the <strong><em>“compilerOptions”</em></strong> in the tsconfig.json file !</p><p>If we set <strong><em>noEmitOnError: true</em></strong> in the <strong>tsconfig.json</strong> file then on compiling my typescript code in case of error the javascript will not be generated. Let’s see step by step how to achieve this in a sample typescript project.</p><h4>Example: Simple Typescript Project working on VSCode</h4><p><strong><em>Step 1</em></strong>: Let’s make sure we understand the problem statement being made in this story. So let’s create a <strong>greeter.ts</strong> file with the below code</p><pre>function greeter(person) {</pre><pre>  return &quot;Hello, &quot; + person;</pre><pre>}<br>let user = &lt;number&gt;&quot;Jane&quot;;<br>document.body.textContent = greeter(user);</pre><p>we can see the below errors in vscode</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*UQBgDNu_iHsCc3s0bpPRmA.png" /><figcaption>See the red underlines in the code</figcaption></figure><p>Instead of the errors above, we just compile the typescript using below command</p><pre>tsc greeter.ts</pre><p>The compiler displays the errors on the terminal</p><pre>Parameter &#39;person&#39; implicitly has an &#39;any&#39; type.ts(7006)</pre><pre>Conversion of type &#39;string&#39; to type &#39;number&#39; may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to &#39;unknown&#39; first.ts(2352)</pre><p>But still we see that an equivalent greeter.js file is generated</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPFqc91JFqZPrZNnLdcNFg.png" /></figure><p><strong><em>Step 2</em></strong>: Generate a tsconfig.json file in your project or workspace or folder using the below command</p><pre>tsc --init</pre><p><strong><em>Step 3</em></strong>: The command above will generate the tsconfig.json file. Check for “compilerOptions” in the file and add the below property under the same. Below is an example</p><pre>&quot;compilerOptions&quot;: {</pre><pre> &quot;noEmitOnError&quot;: true,</pre><pre>}</pre><p><strong><em>Step 4</em></strong>: Delete the javascript file generated by the transpiler earlier. Then go with either of the approach that suits your case</p><p><strong><em>Approach 1</em></strong>: When you create the build of your project using webpack or any such javascript module bundler, you will see that compiler throws error and javascript file is not generated.</p><p><strong><em>Approach 2</em></strong>: Now just execute the below command on your terminal to compile the typescript ( this is in the case when we want to directly compile a list of typescript files ). Here we need to pass the noEmitOnError to the command below, since in this case the compiler doesn’t pick the configuration from the file, this may be a further improvement which the team of Visual Studio Code or Typescript does in the near future)</p><pre>tsc --noEmitOnError greeter.ts</pre><p>You will see that compiler throws the error and javascript file is not generated</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGFotGZm5Y53zW_4Xf5s-A.png" /><figcaption>No javascript generated when compiling with — noEmitOnError</figcaption></figure><p>I hope this story would have helped in clearing this basic concept that why javascript is generated even after type errors in your typescript. The “noEmitOnError” option was added as a solution to the issue reported on github (mentioned the issue link in the story itself)</p><p><strong>References</strong> :</p><ul><li><a href="https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html">Documentation - Migrating from JavaScript</a></li><li><a href="https://github.com/Microsoft/TypeScript/issues/828">Do not create JavaScript files on errors · Issue #828 · microsoft/TypeScript</a></li><li><a href="https://github.com/microsoft/TypeScript/issues/15249">noEmitOnError doesn&#39;t work in tsconfig.json · Issue #15249 · microsoft/TypeScript</a></li><li><a href="https://github.com/microsoft/TypeScript/issues/23179">[SOLVED] Compiler option `noEmitOnError` not working with tsc 2.8.1 · Issue #23179 · microsoft/TypeScript</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61cabd59bfbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Look ma, no Servers!]]></title>
            <link>https://dasguptagaurav.medium.com/look-ma-no-servers-728f482ed2dd?source=rss-f3eda508e6f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/728f482ed2dd</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Gaurav Dasgupta]]></dc:creator>
            <pubDate>Sun, 01 Dec 2019 12:32:35 GMT</pubDate>
            <atom:updated>2019-12-11T04:16:51.846Z</atom:updated>
            <content:encoded><![CDATA[<h3>Serverless Design..really no Servers?</h3><h4>Key Takeaways at a Geek Night event and my own perspective</h4><figure><img alt="Some notepads kept over a round table at the Geek Night event" src="https://cdn-images-1.medium.com/max/1024/1*8PeJu-Ula7N8t8GHWf89Pg.jpeg" /></figure><p>Nov 30, 2019 was marked with yet another amazing meetup organized by <strong>Thoughtworks</strong>. This is the <strong>Geek Night</strong>, one of the favorites of many tech enthusiasts interested with Java, Spring Boot, Microservices, Cloud Computing and so on.</p><p>This edition of Geek Night was dedicated to the serverless architecture of today’s world equipped with Cloud Computing options provided primarily by AWS(Amazon Web Services), Microsoft Azure and Google Cloud Platform.</p><p>This was almost a full day event, comprising of hands-on with AWS Lambda, demo and presentations on using Functions-as-a-service (FaaS), Azure Functions and other serverless options provided using Kubernetes.</p><h3>So what exactly is serverless-design ?</h3><p>First of all, when we say serverless it doesn’t actually mean there are no servers! There are servers to respond to the client requests, but neither you own those servers nor do you manage them. Talking about serverless architecture/design/trends we come across many other paradigms such as <strong>nano-services, functions-as-a-service(FaaS) and Lambdas(by AWS)</strong>.</p><p>When we start thinking of separate functions (with single responsibilities) as separate services, we start moving towards the idea of serverless architecture. Think about any of your PUT,GET,POST or DELETE requests and imagine them as separate services. If you are able to imagine, then there is a good chance of you being able to deploy them as separate Lambdas. The best part is that Amazon will be charging you only for the duration of time your Lambda or function takes to execute (c<em>ompute time</em>).</p><p>When you start thinking on these lines you will observe that we are gradually <strong>moving from the micro-services architecture towards a nano-services design</strong>. Which is actually good but does my application or product needs to follow this design paradigm totally depends on the way my services are structured, how much interdependent they are and do I even need to put my logic on some alien machine!</p><h3>The World is full of Events</h3><p>When all our functions are actually atomic particles of a micro service broken down into nano services it will be a real challenge to achieve a working product out of it wherever there are cases that one function is dependent on some other function to execute. But not to worry since we know that our world is driven by Events! Imagine a payment service dependent on an order service. An order placed event pushed to an Event Bus can be subscribed by the payment service which can get this message and go on with the payment operations! Our Lambdas can be publishing to an Event Bus or can subscribe to one as the case may be. Coming to Event Bus we can think of <em>RabbitMQ, Amazon SNS, Amazon SQS, Kafka, etc</em></p><p>So from now on, whenever you think of event listeners as a bridge of communication between two services do remember that these kind of listeners can be replaced by a Lambda and save much of your cost to manage servers and at the same time ensuring the benefits below -</p><p>1. <strong>Decouple our services</strong> (All services work as separate unit and at the same time connected using some messaging service or notification service)<br>2. <strong>Segregate Faults</strong> (An issue in the order service can be caught and handled easier rather than when all these services are merged into one)<br>3. <strong>Better User Experience</strong> (by using the serveless design we make sure that none of our services are down ever, also if by chance a payment service is down when the order service is waiting for confirmation, there is not much to worry because these messages are not lost by the queue until they are consumed)<br>4. <strong>Adding new consumers are easy</strong> (we can always add or introduce a new service without affecting the functionality of other running services and need no down time for doing the same)</p><h3>Microsoft’s approach towards FaaS</h3><p><em>Declarative way of creating functions!</em></p><p>Microsoft too is not left behind in the race of Cloud Computing as it comes with its own unique solutions for achieving serverless design with its own cloud platform Azure!</p><p>The Azure way of doing Lambdas or FaaS is what they call a <strong>Function App</strong>. Just like a Lambda, <strong>a function app is the unit of deployment</strong> when it comes to Azure. They have broken down a function further into<br>1. <strong>Triggers</strong> (The event or events which will trigger the function, for eg., a function can be triggered by an http call or a timer)<br>2. <strong>Input Bindings</strong> (All channels which can act as an input to the function)<br>3. <strong>Output Bindings</strong> (eg., A messaging Queue can be an output channel)<br>4. <strong>Function Body</strong> (The logic itself)</p><p>So in short, in Azure we keep the function separate from its configurations and <strong>the same function app can be used to run multiple functions</strong>!</p><h3>Bringing it All Together : The Knative Eventing System</h3><p>The Knative by Kubernetes is a very unique solution to bring the flavors of AWS, AZURE, GCP and such other cloud platforms on a same plate. Actually its much more than that (explore their documentation here <a href="https://knative.dev/docs/">https://knative.dev/docs/</a> ). Think of a service which subscribes to an Event Bus which is deployed on Azure and on execution it triggers a function which is deployed on Google Cloud. These type of custom designs can be made possible using the Knative eventing!</p><p>So we understand that we are in a constant process of breaking down our services into more granular details and trying to achieve the benefits of performance, availability, scaling, cost and risk mitigations using several different cloud solutions. As a developer, System designer, tech team manager, product visionaries or even a CEO it is essential to keep learning and keep ourselves upgraded with the latest trends and paradigms in the market!</p><figure><img alt="Shashank and Abhishek walking through the participants with the AWS Lambda Handson" src="https://cdn-images-1.medium.com/max/1024/1*OVdkB5YQRAXUDLpdAgVd5w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=728f482ed2dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>