<?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 Shravan Kumar Talabhaktula on Medium]]></title>
        <description><![CDATA[Stories by Shravan Kumar Talabhaktula on Medium]]></description>
        <link>https://medium.com/@tshravan2012?source=rss-e6265e8e4ef9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8orY5yy5tV_pO5KU.</url>
            <title>Stories by Shravan Kumar Talabhaktula on Medium</title>
            <link>https://medium.com/@tshravan2012?source=rss-e6265e8e4ef9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:50:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tshravan2012/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[Install Node.js on mac using NVM — For beginners — MacOS Big Sur]]></title>
            <link>https://tshravan2012.medium.com/install-node-js-on-mac-using-nvm-for-beginners-macos-big-sur-2d74b6d4a68c?source=rss-e6265e8e4ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d74b6d4a68c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Shravan Kumar Talabhaktula]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 18:27:56 GMT</pubDate>
            <atom:updated>2022-03-27T05:45:25.170Z</atom:updated>
            <content:encoded><![CDATA[<h3>Install Node.js on mac using NVM — For beginners — MacOS Big Sur</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ldmQ8TOovXLZ1hrl" /><figcaption>Photo by <a href="https://unsplash.com/@flowforfrank?utm_source=medium&amp;utm_medium=referral">Ferenc Almasi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>Note</strong>: This article has been written on MacOS Big Sur operating system. If you encounter “<strong>zsh command not found</strong>” at any point of time (assuming you are using latest version of MacOS), please type <strong>source ~/.nvm/nvm.sh </strong>to resolve the issue. Thank you for my readers for pointing me the error.</blockquote><p>As a programmer, I strongly believe in perfection whatever it may be, especially in installing any new software. I have come across many people who just simply follow the instructions online and install the applications without knowing how to uninstall them later.</p><p>Always remember, the important thing for a programmer is to know how to uninstall the applications properly rather than installing them with simple clicks and double clicks. Trust me, this knowledge will later help you in debugging the issues at the time of deployment in production servers.</p><p>Without any further ado, let’s get started.</p><p>We may use different versions of Node.js which depends on different project requirements. In order to do that, we should maintain different versions of them in our system to switch easily whenever required. That is where NVM is used for. (<strong>Not recommended in Production Servers</strong>)</p><p>NVM — Node Version Manager, pretty straight forward definition. Used to manage multiple versions of Node.js in our system so that we can easily switch based on our project requirements.</p><p>Installing NVM</p><pre>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash</pre><p>When you run the above command, you may encounter an issue like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*by2e26tbFLVvQezI-RYAdQ.png" /></figure><p>We need to install xcode command line tools and run the script again. Just accept the install option and continue. Once you are done with that, continue running the script again.</p><p>This is what you should see when you run the script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4YaBAKjKlIzW-nyR6H7Og.png" /></figure><p>So what generally the script does is it downloads, clones the nvm repository to .nvm and add source lines to our profile. (.zsh or .bash_profile, etc).</p><p>Now close the terminal and open a new terminal again, type</p><p>nvm --version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*pNYWUq3RjXyN22RQdN5NCg.png" /></figure><p>But, unfortunately you will encounter an issue again like above. Why because nvm generally looks for the profile ‘.zshrc’ but our default mac shell has‘.zsh’ profile. So we need to create a profile and run the script again. To create profile use below command,</p><p>touch ~/.zshrc</p><p>If everything works fine, you will should be able to see the below result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*NCYld67Mr64PYM9XQHMjAw.png" /></figure><p>Now to see what versions are installed, use the below command</p><p>nvm ls</p><p>The above command will result in the output just like below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*GwqqpOLhPUtNTLrOAqfFqw.png" /></figure><p>There are no Node.js installed in our system currently. If you want to see the entire list of node versions which are present remotely then use below command</p><p>nvm ls-remote</p><p>The above command will gives us a very long list of node versions.</p><p>Always prefer the versions which has long term support (LTS) which I consider as safe and also by many. Currently (at the time writing this article), the latest LTS version is <strong>v14.16.0</strong>.</p><p>In order to install the latest LTS version, follow any of the the below commands.</p><p>nvm install 14.16.0</p><p>or</p><p>nvm install —- lts</p><p>The above command will install the latest LTS version of Node.js.</p><p>You should see the output like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--YhyY3D0eVuC3uvBCxqbA.png" /></figure><p>You will be getting both Node.js and node package manager (npm) which is used to install packages in your node related projects. Check the versions now using below commands.</p><p>node —- version</p><p>npm -— version</p><p>You should able to see like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*kt23DAAGNFAdtLuurLiHeA.png" /></figure><p>Now, let me install another version of node and switch to that version, let’s see if it works or not. Lets install version <strong>v12.21.0</strong>.</p><p>nvm install 12.21.0</p><p>The output should be,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VcXA3Xlhc_55tIKN_wohnw.png" /></figure><p>if we check the versions, we will get something like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*wlDTjJKu5lSArXDjPB8zQw.png" /></figure><p>If we list the versions which we have installed so far in our system by using below command, we should see,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*Uv3UPSOgIqTy6m7pWvtZ5w.png" /></figure><p>If you observe the green arrow which is pointing to the version 12, that means currently the shell environment is running version 12 node, but if you see the “<strong>default</strong>” , it is pointing to the latest version 14. That means that anytime you start a new shell, you will be sourced again to version 14 but not to version 12. In order to make the default node to 12, follow the below command.</p><p>nvm alias default 12.0.0</p><p>So now lets switch to our latest version by using the below command,</p><p>nvm use 14.16.0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*nbGJg_jRoS8u1gI8A4CbUA.png" /></figure><p>To uninstall any versions of your node, lets say I want to uninstall version 12, follow the below command,</p><p>nvm uninstall 12.21.0</p><p>You will get the result like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*Sj5FscluPxdSPDRKRwvKEA.png" /></figure><p>You will be having only one version in the system. You can check by listing the node versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*QfmqPU-2alVg75c2GgYMSw.png" /></figure><p>Finally, to remove your NVM completely from your system, follow the below command, (before that uninstall any of your node versions if exist by using uninstall command above)</p><p>rm -rf “$NVM_DIR”</p><p>And remove the lines from “.zshrc” below, which was created at the start of NVM installation process. (You can find at the start of this article)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSTA8qPa2tDi5q_2E0SN7g.png" /></figure><p>So now you know how to install NVM, install versions of Node.js, switch to different versions, uninstalling Node.js, and finally uninstalling the NVM.</p><p>Thats it for now. Thanks a lot for your time. Please add comments if you have any doubts, or if I had missed something or any thing is wrong, I will rectify and publish again. I open to comments.</p><p>Thank you once again. Have a nice day.</p><p><strong>Reference</strong></p><p><a href="https://github.com/nvm-sh/nvm">https://github.com/nvm-sh/nvm</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d74b6d4a68c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to increase the size of your EBS (Elastic Block Store) volume— Amazon Web Services]]></title>
            <link>https://tshravan2012.medium.com/how-to-increase-the-size-of-your-ebs-elastic-block-store-volume-amazon-web-services-ec7a9e03abf0?source=rss-e6265e8e4ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec7a9e03abf0</guid>
            <category><![CDATA[ebs-volume]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Shravan Kumar Talabhaktula]]></dc:creator>
            <pubDate>Sun, 22 Sep 2019 10:58:48 GMT</pubDate>
            <atom:updated>2019-09-22T10:58:48.124Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi friends, hope everyone is doing well. It’s been a long time since I wrote an article in the Medium. So just wanted to share some of my knowledge on how to change the size of volume storage (EBS) for your EC2 instance.</p><p>I was asked to change the storage size of an EC2 instance. The size was 8 GB, the requirement is to change that to 20 GB.</p><p>Always remember to stop your EC2 instance before doing any configuration change to the attached volume. Of course, you could do the without any downtime but to be careful with your data storage I suggest you always follow the ethics.</p><p>Note: For the purpose of demonstration I have not stopped my instance while resizing the volume.</p><p>I’m using Ubuntu server 18.04 free tier. Just accept the default configurations and security groups if you want. Below screenshots are my basic configuration settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZfGklsFvjZBGXRm25-BJw.png" /><figcaption>Ubuntu Server 18.04</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vKmhadshRkh3WT1LZjXoRg.png" /><figcaption>t2.micro instance — General Purpose</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yhQLv2NYDZ5m8At__AW3oA.png" /><figcaption>Default volume storage size</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6hDsUTC-SxdEwmKHx4MJw.png" /><figcaption>My running instance</figcaption></figure><p>Whenever we connect to the instance, it will provide system information like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*8doseyh4XBMoH82WLwlOiw.png" /><figcaption>System information</figcaption></figure><p>If you look at the system information, there you will find usage of system space with information on how much the server has utilised and how much the total storage is. Currently the server has used 13.6% of total storage space which is 7.69 GB (8 GB).</p><p>Well, let us increase the volume size to 20 GB now. Under the AWS management console, you will find volumes section. Check the attachment information of your selected volume. That should refer to your instance like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tce281J1S0h4gAH0YMsPKg.png" /><figcaption>Attachment information referring to ec2 instance ID</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6hDsUTC-SxdEwmKHx4MJw.png" /><figcaption>ec2 instance id</figcaption></figure><p>After selecting the volume, click on “Actions” and choose “Modify Volume” option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*F0CN-nUi8_gKFq5euzIcOg.png" /><figcaption>Modify volume option</figcaption></figure><p>Now increase size to 20 GB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*qsd904EACMAjNhZbjPQlCw.png" /><figcaption>Change size to 20 GB</figcaption></figure><p>It will provide a confirmation dialog, choose “yes” and that’s it.</p><p>The process will take some time approximately 5 mins depending on the size. The progress will be shown like below screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vtNNVao3dTgnI28s2vP2Q.png" /><figcaption>Progress</figcaption></figure><p>After successful completion of optimisation, volume information will show like below screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R21itELK2WntC4YpHAy2Zw.png" /><figcaption>Success</figcaption></figure><p>Note: Sometimes, the above steps are sufficient to increase the size and it reflects automatically to your increased volume. The below command will show whether your instance is using increased size or not.</p><pre><strong>lsblk</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*4G9XW1bXSM9STdtJvW_uug.png" /><figcaption>xvda / xvda1</figcaption></figure><p>If your xvda has your increased space then it means your instance has newly increased size. If that is not the case then you need to extend the file system.</p><p>To verify the file system, enter this command,</p><pre><strong>sudo file -s /dev/xvd*</strong></pre><p>The above command shows the boot volume with an ext4 file system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BMkoOy0fN3VenMmetpGvWA.png" /><figcaption>Boot volume information</figcaption></figure><p>If you want to extend your partition, then follow this command.</p><pre><strong>sudo growpart /dev/xvda 1</strong></pre><p>Now finally extend your file system by using this command.</p><pre><strong>sudo resize2fs /dev/xvda1</strong></pre><p>Now verify whether file system reflects the increased volume size or not by using this command.</p><pre><strong>df -h</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*XVX0vsziQBx0WHhMDNya_w.png" /><figcaption>Volume is increased to 20 GB</figcaption></figure><p>So that’s it. I have referred official AWS website to get these steps. They have a full and detailed explanation on how to resize your volume. For more information please visit this link below.</p><p><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html">Extend a Linux file system after resizing a volume</a></p><p>Thanks a lot for your time. Please give me feedback and suggestions on my article, let me know is there anything I have missed. I’m always open for suggestions. Failures and mistakes are the stepping stones to success and perfection. Thank you once again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec7a9e03abf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflection API — Java. Do you want to access or invoke private members? Lets do it.]]></title>
            <link>https://tshravan2012.medium.com/reflection-api-java-do-you-want-to-access-or-invoke-private-members-lets-do-it-cdac44223576?source=rss-e6265e8e4ef9------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdac44223576</guid>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[reflection-api]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Shravan Kumar Talabhaktula]]></dc:creator>
            <pubDate>Sat, 27 Oct 2018 18:28:15 GMT</pubDate>
            <atom:updated>2018-10-27T18:28:15.685Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reflection API — Java. Do you want to access or invoke private members? Lets do it.</h3><p>Hey guys, hope you are doing great! Today I would like to discuss about <strong><em>Reflection</em></strong> API available in Java. Reflection is an ability of a program to analyse code at run time. It can be used to analyse or modify the behaviour of member variables and methods during runtime. This api is available to all the classes since it belongs to “java.lang.reflect”. The most important classes of “java.lang.reflect” are,</p><ul><li>Method</li><li>Field</li><li>Constructor</li></ul><p>If you want to know to which class an object belongs to, reflection will help you get that information, and if you want to list what methods are available in a class then reflection is the right choice. Irrespective of access specifier provided to the methods, we can access them with the help of reflection.</p><p>Lets dive into coding part. Below is a dummy class which contains a private variable, a public constructor which assigns value to private variable, public methods with and without parameters, and one private method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEaJ1Y2ONIMjuOHnD85odA.png" /><figcaption>Dummy.java</figcaption></figure><p>Now, from another class we are going to access all the above class members.</p><p>First, we need to create an object to the above class.</p><pre>Dummy obj = new Dummy();</pre><p>Now, we need to get class object.</p><pre>Class cls = obj.getClass();</pre><p>Now, to get the hold of constructor, use this</p><pre>Constructor cons = cls.getConstructor();</pre><p>Thats it, we can get the name of the constructor by below code</p><pre>cons.getName();</pre><p>To list methods which are present in “Dummy” class, use below code</p><pre>Method[] meths = cls.getMethods();</pre><pre><strong>for</strong>(Method met : meths)</pre><pre>   System.<strong><em>out</em></strong>.println(&quot;Methods: &quot; + met.getName());</pre><p>To get the hold of the individual method and invoke the method at run time, we have to use “getDeclaredMethod()” and have to pass the name of the method as an argument to the above method. And then we need to use “invoke()” method to access at runtime. Please follow below code.</p><pre>Method meth1 = cls.getDeclaredMethod(&quot;reflectOne&quot;);</pre><pre>meth1.invoke(obj);</pre><p>To access private method, we have to set the accessible to true for that method. We can pass arguments as well if that method contains any parameters. One thing, the type of parameter must be mentioned. Please follow the code carefully.</p><pre>Method meth2 = cls.getDeclaredMethod(&quot;reflectTwo&quot;, <strong>int</strong>.<strong>class</strong>);</pre><pre>meth2.setAccessible(<strong>true</strong>);</pre><pre>meth2.invoke(obj, 123);</pre><p>To access private variable, below is the code.</p><pre>Field fld = cls.getDeclaredField(&quot;str&quot;);</pre><pre>fld.setAccessible(<strong>true</strong>);</pre><pre>fld.set(obj, &quot;hello reflection...&quot;);</pre><p>So, the final code is as follows,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fcy3zqF1Ltb3H3kj6nHweg.png" /><figcaption>ReflectionDemo.java</figcaption></figure><p>Please let me know if you have any doubts or further clarifications, and also please correct me if I have done anything wrong with the above explanation…I’m happy to help you. Happy coding guys….Do not fall in love, girl will stab you from your behind….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdac44223576" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>