<?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 Amrendra Yadav on Medium]]></title>
        <description><![CDATA[Stories by Amrendra Yadav on Medium]]></description>
        <link>https://medium.com/@amrendrayadav?source=rss-ba1029b64a49------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ELtlX3bhTO5oYJnF.</url>
            <title>Stories by Amrendra Yadav on Medium</title>
            <link>https://medium.com/@amrendrayadav?source=rss-ba1029b64a49------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:03:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amrendrayadav/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[Getting Started With Reactive using Java]]></title>
            <link>https://medium.com/@amrendrayadav/getting-started-with-reactive-using-java-2535f022508d?source=rss-ba1029b64a49------2</link>
            <guid isPermaLink="false">https://medium.com/p/2535f022508d</guid>
            <dc:creator><![CDATA[Amrendra Yadav]]></dc:creator>
            <pubDate>Thu, 20 Apr 2023 07:54:19 GMT</pubDate>
            <atom:updated>2023-04-20T07:54:19.357Z</atom:updated>
            <content:encoded><![CDATA[<p>Reactive programming is a programming paradigm that deals with asynchronous data streams and their transformations. It is a way to write programs that can handle large amounts of data with minimal memory usage and high performance. Reactive programming is particularly useful in systems that have a high degree of concurrency and interactivity, such as web applications and real-time data processing systems.</p><p>Java is a popular programming language for developing reactive applications. In this blog post, we will explore the basics of reactive programming with Java, its benefits, and some examples.</p><h3>What is Reactive Programming?</h3><p>Reactive programming is a programming paradigm that focuses on data flows and the propagation of changes. It is a way of programming that deals with asynchronous data streams and their transformations. Reactive programming is particularly useful in systems that have a high degree of concurrency and interactivity, such as web applications and real-time data processing systems.</p><p>In reactive programming, we work with data streams, which are sequences of events that occur over time. These events can be anything from user interactions to data updates. We can transform these data streams by applying operators, which are functions that take one or more streams as input and produce another stream as output.</p><p>The reactive programming paradigm is based on four key concepts:</p><ul><li><strong>Observable</strong>: An observable is a stream of events that can be observed by a subscriber. An observable can emit zero or more items, and can complete or terminate with an error.</li><li><strong>Subscriber</strong>: A subscriber is an entity that observes an observable. It receives notifications for each item emitted by the observable, as well as notifications for completion or errors.</li><li><strong>Operators</strong>: Operators are functions that transform one or more observables into another observable. Operators can be used to filter, transform, or combine data streams.</li><li><strong>Schedulers</strong>: A scheduler is an entity that controls the execution of observables and subscribers. Schedulers can be used to run observables and subscribers on different threads or execution contexts.</li></ul><h3>Benefits of Reactive Programming</h3><p>Reactive programming has several benefits, including:</p><ul><li><strong>Concurrency</strong>: Reactive programming is well-suited to systems that require high levels of concurrency. Reactive programming allows you to process multiple data streams concurrently, which can improve performance and responsiveness.</li><li><strong>Asynchronous processing</strong>: Reactive programming is based on asynchronous processing, which means that your application can handle large amounts of data without blocking the main thread. Asynchronous processing can improve the performance and responsiveness of your application.</li><li><strong>Error handling</strong>: Reactive programming makes it easy to handle errors in your application. Observables can complete or terminate with an error, and subscribers can handle errors in a predictable and consistent way.</li><li><strong>Testability</strong>: Reactive programming makes it easier to write unit tests for your code. Observables and subscribers are decoupled from each other, which makes it easier to test them in isolation.</li></ul><h3>Reactive Programming Examples in Java</h3><p>Let’s take a look at some examples of reactive programming in Java.</p><h3>Example 1: Creating an Observable</h3><p>In this example, we will create an observable that emits a sequence of integers.</p><pre>Observable&lt;Integer&gt; observable = Observable.create(emitter -&gt; {<br>    emitter.onNext(1);<br>    emitter.onNext(2);<br>    emitter.onNext(3);<br>    emitter.onComplete();<br>});</pre><p>In this code, we use the Observable.create method to create an observable. We pass a lambda expression that takes an Emitter object as input. The Emitter object is used to emit events, such as onNext, onComplete, and onError.</p><p>We use the onNext method to emit three integers: 1, 2, and 3. We then use the onComplete method to signal that the observable has complete.</p><h3>Example 2: Subscribing to an Observable</h3><p>In this example, we will subscribe to the observable we created in the previous example and print each integer as it is emitted.</p><pre>Observable&lt;Integer&gt; evenObservable = observable.filter(i -&gt; i % 2 == 0);</pre><h3>Example 3: Transforming an Observable</h3><p>In this example, we will transform the observable to emit only even numbers.</p><pre>Observable&lt;Integer&gt; evenObservable = observable.filter(i -&gt; i % 2 == 0);</pre><h3>Example 4: Combining Observables</h3><p>In this example, we will combine two observables to create a new observable that emits the concatenated sequence of events.</p><pre>Observable&lt;Integer&gt; firstObservable = Observable.just(1, 2, 3);<br>Observable&lt;Integer&gt; secondObservable = Observable.just(4, 5, 6);<br>Observable&lt;Integer&gt; mergedObservable = Observable.merge(firstObservable, secondObservable);</pre><h3>Example 5: Error Handling</h3><p>In this example, we will handle errors in the observable by logging the error message.</p><pre>observable.subscribe(<br>    System.out::println, // onNext<br>    throwable -&gt; System.err.println(&quot;Error: &quot; + throwable.getMessage()), // onError<br>    () -&gt; System.out.println(&quot;Completed&quot;) // onComplete<br>);</pre><p>These examples demonstrate the basic concepts of reactive programming in Java. By using these concepts and operators, you can write applications that are more efficient, scalable, and responsive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2535f022508d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create ReactJs app using ChatGPT]]></title>
            <link>https://medium.com/@amrendrayadav/using-chatgpt-to-create-functional-react-app-d33b22948913?source=rss-ba1029b64a49------2</link>
            <guid isPermaLink="false">https://medium.com/p/d33b22948913</guid>
            <category><![CDATA[html-css]]></category>
            <category><![CDATA[typescript-with-react]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Amrendra Yadav]]></dc:creator>
            <pubDate>Thu, 20 Apr 2023 06:02:11 GMT</pubDate>
            <atom:updated>2023-04-28T01:54:50.282Z</atom:updated>
            <content:encoded><![CDATA[<p>This document is for someone who wants to start with react js (using typescript or javascript) and create an app within minutes.</p><p>Again! I am fascinated by precision and intelligence of this AI tool. I am backend developer but I am curious to learn frontend technologies too, so after little bit of learnings on my own I jumped to this tool to help me create a simple react app. For the sake of this story lets consider a simple registration form for a customer.</p><p>This registration form will have some input fields such as — text, drop-down (select), checkbox and buttons.</p><p>Later I will ask AI to generate css too.</p><p>Step 1. Lets phrase a requirement to feed chatGPT —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B5NvNyLRfTwWC1Zer9VAAw.png" /></figure><p><em>“Create a registration form in react using typescript. This form contains following fields — Name, Age, Gender, Email, password <br>Use appropriate types for inputs”</em></p><p>Response —</p><p>chatGPT generates code as asked (in typescript)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KzBkmlvVrOgyvi4DicVzQQ.png" /></figure><p>Step 2. Open your favourite IDE, I am using Visual Studio Code. Open a new folder/workspace and run create react app in the terminal, so that we have a react app running on local. We will incorporate above component in this app. So again I am taking chatGPT’s help to create react app and use response generated in step 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n7WpzyyUBz9bkeV3hJM8Cw.png" /></figure><p>Following is the response —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqyAWRtptKBJaEmTjnmX5A.png" /></figure><p>So, lets follow what the AI says!</p><p>And here is the result-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JUq83mSEOXMO7sRmE-4s5w.png" /></figure><p>Step 3. Now, we will incorporate the above generated form in our newly created react app.</p><p>Step 4. Create components folder and create a new file — RegistrationForm.tsx and copy code that was generated from step 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7-MklbW-qpjlrrk5RGb0w.png" /></figure><p>Step 5. Replace index.js and run the app using</p><blockquote>npm start</blockquote><p>Successful deployment should look like —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbW9EbVsV7rwrq3YQqYXXg.png" /></figure><p>If you observe above, our app is running on localhost:3001, so open browser and hit <a href="http://localhost:3001/">http://localhost:3001</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EG_SYPx5yfaJWRkts7KmSQ.png" /></figure><p>Step 6. It looks ugly, so lets ask AI to apply some css</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_n-P_79_OPdwh71wbYlNKQ.png" /></figure><p>Step 7. Create css file, copy ai generated code and apply to form</p><p>Final Result —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M02X7Px5JuFcpWdAeOUzYA.png" /></figure><p>Not bad huh!</p><p>For someone who is just starting with react js or someone who doesn’t want to spend much time in writing such simple code, this will be helpful. So within matter of minutes, I have a beautiful (nearly!) registration page.</p><p>Step 8. So, lets test whether the basic functionalities are working or not</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kCfA3AE6N-s1wcZSDaTapw.png" /></figure><p>we can see log being printed in console. Voila!</p><p>Next steps — We can similarly ask chatGPT to help us create new tabs and then to transfer data between tabs (we can use redux) and many more such requirements.</p><p>So, someone who wants to get started with some new technology, they can take this route, along with other helpful tutorials. This can save lot of time!</p><p>I have created a detailed <a href="https://youtu.be/CLhtHxb5Fq0">video</a> over above topic.</p><p>Please like and follow for more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d33b22948913" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ChatGPT to solve Leetcode problems]]></title>
            <link>https://medium.com/@amrendrayadav/using-chatgpt-to-solve-leetcode-problems-1938ce270a51?source=rss-ba1029b64a49------2</link>
            <guid isPermaLink="false">https://medium.com/p/1938ce270a51</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[leetcode]]></category>
            <category><![CDATA[chatgpt3]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Amrendra Yadav]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 14:01:02 GMT</pubDate>
            <atom:updated>2023-04-07T14:01:02.890Z</atom:updated>
            <content:encoded><![CDATA[<p>Curious mind and hyped news around ChatGPT intrigued me to try it. I tried asking chatGPT many silly questions and it answered me as if someone from the other side is typing, as if I am talking to someone.</p><p>So, I thought of checking its coding capabilities and as a popular platform what other option than Leetcode could I choose?</p><p>Let me show you with some screenshots and stepwise blog what was the result.</p><p>Step 1. Sign up and login to Openai.com</p><p>Step 2. There are many other tools offered from openai.com, but we are interested more on chatGPT, so click on <a href="https://chat.openai.com/chat">Try ChatGPT</a></p><p>Step 3. There would be a textField which takes your queries or questions. For curious kids, you can ask anything in the chat section, it will respond. Note — It is trained to discard inappropriate requests too.</p><p>Step 4. Go to <a href="https://leetcode.com/problemset/all/">leetcode</a> (if required, create an account and sign in) and go to problems section.</p><p>Step 5. Pick any problem, it is pretty neatly explained what is expected from you, so either try to solve it or use ChatGPT to solve it for you.</p><p>Step 6. Copy the link from the browser, I am trying following problem — <a href="https://leetcode.com/problems/reverse-integer/">https://leetcode.com/problems/reverse-integer/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*kDxWXdhYjDXholRWnMmAOQ.png" /></figure><p>Step 7. Paste the copied link from previous step into the chat field of ChatGPT and hit send</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*YbcGa-YPZf4spWa-GUlICg.png" /></figure><p>Step 8. It will explain the problem statement from the link you pasted and will solve the problem</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*8webS4xawHiOCDGn25k8AQ.png" /></figure><p>Step 9. Ask in chat window to solve it in desired language, I asked it to solve in java</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*tMdDDg8akXC78XdywXZhhw.png" /></figure><p>ChatGPT not only solves the problem, it also explains the thought process and code flow.</p><p>Step 10. Now, we need to verify whether the solution is correct. So, click on copy code right top corner of the response and paste it in leetcode workspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*NgW51Fr9DdNnUP44FVfJSg.png" /></figure><p>It passed the basic test cases with flying colors (i.e. 0ms)</p><p>Step 11. Now its time to submit the code and check if it passes all the other test cases (we all know leetcode has n number of corner cases and test cases covered for a problem)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtYnnV9IWwG9Wal_7frF-g.png" /></figure><p>Cooool!!! Machines are so well trained.</p><p>It solves the leetcode problems with desired space and time complexities. Also, it explains the flow.</p><p>I have made a detailed <a href="https://youtu.be/Cfez4CCP8e4">video</a> of above blog, kindly subscribe/follow if you liked the content. More exploring to follow. Happy learning!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1938ce270a51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with AWS CLI on Mac OS]]></title>
            <link>https://medium.com/@amrendrayadav/getting-started-with-aws-cli-on-mac-os-3c2d89cda76e?source=rss-ba1029b64a49------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c2d89cda76e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[aws-cli]]></category>
            <dc:creator><![CDATA[Amrendra Yadav]]></dc:creator>
            <pubDate>Fri, 09 Dec 2022 04:38:52 GMT</pubDate>
            <atom:updated>2022-12-09T04:38:52.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V88whvRJlnbTyF_KJHJRIw.png" /></figure><p>Following document contains step wise details to install AWS CLI on local.</p><p>Step 1. Open Terminal and go to location where you have space to download awscli-bundle zip.</p><p>Step 2. Use following command to get the awscli-bundle.zip from amazon s3. (S3 is a location/storage where files are placed and can be accessed with a url) —</p><blockquote>curl “https://s3.amazonaws.com/aws-cli/awscli-bundle.zip&quot; -o “awscli-bundle.zip”</blockquote><p>Step 3. Unzip the above zip folder —</p><blockquote>unzip awscli-bundle.zip</blockquote><p>Step 4. Make sure you have python installed on your mac.</p><blockquote>python — version</blockquote><p>Step 4 a. If python is not on your system use brew or any other installer to install python —</p><blockquote>brew install python</blockquote><p>Step 5. Run following command to install aws —</p><blockquote>sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws</blockquote><p>Step 6. Verify -</p><blockquote>aws — version</blockquote><p>Output would be something like. —</p><blockquote>aws-cli/1.27.26 Python/3.10.8 Darwin/21.6.0 botocore/1.29.26</blockquote><p>PS — (double hyphens without space is depicted as — )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c2d89cda76e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>