<?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 Vishwesh Jainkuniya on Medium]]></title>
        <description><![CDATA[Stories by Vishwesh Jainkuniya on Medium]]></description>
        <link>https://medium.com/@jainkuniya?source=rss-bb4dc7d70e69------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*lKWE3-H2mJ9AxwULeFsTSQ.jpeg</url>
            <title>Stories by Vishwesh Jainkuniya on Medium</title>
            <link>https://medium.com/@jainkuniya?source=rss-bb4dc7d70e69------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:39:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jainkuniya/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[Upgrading PostgreSQL At Scale]]></title>
            <link>https://medium.com/gojekengineering/upgrading-postgresql-at-scale-4a720e94630a?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a720e94630a</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[gojek]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 05:21:31 GMT</pubDate>
            <atom:updated>2021-02-02T05:21:31.653Z</atom:updated>
            <content:encoded><![CDATA[<h4>Preparation, process, principles: Everything that went into upgrading PostgreSQL.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEUkKksfkFyLe6taPd5Uug.png" /></figure><p>PostgreSQL is one of the most commonly used relational databases in the recent times, with over 30 years of <strong>active development</strong> which has earned a strong reputation for reliability, feature robustness, and performance.</p><p>Thus, as the development continues, we get more and more features, and to use them, we have to upgrade. Sometimes it’s a <a href="https://docs.microsoft.com/en-gb/windows/win32/msi/minor-upgrades">minor upgrade</a>, which can be performed on the fly and sometimes it’s a <a href="https://docs.microsoft.com/en-gb/windows/win32/msi/major-upgrades">major upgrade</a>, which requires attention and should be carried out carefully.</p><p>PostgreSQL 10 was released with <a href="https://www.postgresql.org/docs/10/ddl-partitioning.html">Declarative table partitioning</a>, which simplifies many use-cases. So, in order to take advantage of it, PostgreSQL should run on ≥ 10. But our app was already running with an older version of PostgreSQL, having hundreds of millions of live tuples and serving hundreds of thousands of live traffic. This blog talks about our experience upgrading core PostgreSQL databases.</p><h4><strong>The process</strong></h4><p>But first… Here’s a little background: PostgreSQL supports master slave replication and it’s highly recommended to use the same. It gives read/write separation out of the box and we shall leverage it in this upgrade.</p><p>Below is what the current setup looks like, where we have the app running either on VMs or <a href="https://kubernetes.io/">Kubernetes</a>, connecting to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*Ed9pCwTqbCNv3vP-wksllA.png" /></figure><h4>The preparation</h4><p>Since meddling with production databases is always risky, it makes the most logical sense to have a backup. We leverage PostgreSQL replication and setup two cascading slaves which will be our new master (03) and slave (04) post upgrade. As it is a streaming replication, these two new instances should be running the same major version of PostgreSQL. To be on safer side, one can also take disk snapshots of current PostgreSQL instances. Install newer PostgreSQL on 03 and 04 in the preparation step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*3-LE58rPm2izduUJKexvUg.png" /></figure><p>Depending on your database size and network bandwidth, it will take some time to create snapshots and to catch up replicas with master. <a href="https://wiki.postgresql.org/wiki/Streaming_Replication">Here</a>’s one way to setup replication using pg_basebackup.</p><blockquote><em>⚠️ </em>Make sure to tune PostgreSQL configs on new master/slave. At that instance since they don’t have any traffic, restart won’t cause any downtime.</blockquote><p>Once the replicas are up, start the upgrade process.</p><p>👉 We will be scaling down all the application pods running on k8s (and VMs).<br>👉 Ensure no writes to current master (01).<br>👉 As a verification step compare Log Sequence Number (<strong>LSN)</strong> across 4 instances.<br>👉 Then, promote new master (03) to master and run <a href="https://www.postgresql.org/docs/10/pgupgrade.html">pg_upgrade</a> on it, and start upgraded PostgreSQL server on the instance (03).</p><p>The master is now ready with upgraded PostgreSQL, but slave is still on older version. pg_upgrade doesn’t work on slave.</p><h4>So how do we upgrade slave?</h4><p>One way to go about this is, since we have upgraded master (03), we setup another replication. But depending on your data size, it will take longer to catch up with master.</p><p>pg_upgrade provides an option of linking ( — link) old PostgreSQL cluster data with the new cluster instead of copying data to the new cluster. Thus, pg_upgrade will be quick on master. In addition, we need to somehow perform similar linking on slave as well to run newer clusters on it. Hence, we take help from <a href="https://linux.die.net/man/1/rsync">rsync</a> to achieve this.</p><p><a href="https://linux.die.net/man/1/rsync">rsync</a> is known for its extraordinary speed of copying data.</p><p>We shall be running <a href="https://linux.die.net/man/1/rsync">rsync</a> on data directly from master (03) to slave (04). Once we have the same linking on slave as well, we can begin the new upgraded cluster on slave and it will start replicating from the upgraded master (03).</p><p>As a verification step, check for the Log Sequence Number (LSN) on new master (03) and slave (04), and it’s a good practice to verify PostgreSQL logs as well before scaling up the application.</p><blockquote><strong><em>📝 </em>Note:</strong> At any stage, if LSN doesn’t match, don’t work check again. Keep en eye on PostgreSQL logs and look for any error.</blockquote><p><strong>Voila! we have upgraded PostgreSQL 🎉</strong></p><p>Here are the five simple principles, which are crucial while working at scale. These rules helped us in carrying out the whole process effortlessly and the upgrade was achieved with minimal user impact and overall downtime of 15 mins.</p><h4><strong>Have a playbook</strong></h4><p>Best way to be confident about your plan is to jot it down and list all possible tracks migrations that could happen. We hadn’t meddled with existing master/slave, so if anything went wrong while migrating, at any step, we could just scale up the application with the existing master/slave setup. So, list all the things that might go wrong and prepare for the rollback and fallback.</p><h4><strong>Have a playground</strong></h4><p>Production environment is not made for experiments. Create a playground locally to rule out all confusions and come up with a concrete playbook.</p><p><strong><em>How should I make sure that my playbook is sufficient?<br></em></strong>The playbook needs to be self explanatory. It should contain all information on when to do what, listing all the commands step by step. Most importantly, one should be in a position to handover this playbook to anyone and they should be able to upgrade it on their own without asking any questions.</p><h4><strong>Define concrete rollback strategies</strong></h4><p>Even after multiple mock drills on the playground, there can be things which might come up while performing it in production. Like connectivity issues, VPN or with the person who is handling the task. It’s recommended to have a backup who can take over in case of such issues.</p><p>There could also be a situation where your production environment configs differ from playground. So, be prepared for all such scenarios and make note of them in your <strong>rollback </strong>section.</p><p>In our case, we were not even actually intervening with live master/slave. So in case of any issue, we could just abort the process and scale up the application.</p><h4><strong>Minimise user impact</strong></h4><p>Upgrades are not rare scenarios. Taking downtime always is not a good idea since it impacts businesses and the moment the user sees an error, the product is deemed unreliable.</p><p>Introduce one new component in between the app and the database, which will be responsible to serve while the database is being upgraded.</p><p>Depending on your use case and flow criticality, it can be a simple Redis instance which will sync back to the database once we have the upgraded database. Or it can be any queue/log like RabbitMQ/Kafka, which take requests and queue them up. Once the database is up, it can be experimented on. Both require additional component setup, like workers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*YV2OwsiLs75rzvO0h3Wc3A.png" /></figure><h4><strong>Prepare indigents, scripting</strong></h4><p>Upgrade process involves running multiple commands across instances, like scaling down application, promoting to master, checking LSN etc. It’s better to create scripts which will take care of all these steps one by one and you just need to confirm. Something like IVR, enter 1,2…<br>They can be simple shell scripts or <a href="https://www.ansible.com/">Ansible</a> or anything else you’re comfortable with.</p><p>End notes:</p><p>Leaving you with some useful PostgreSQL commands:</p><p>Promote to master</p><pre># pg_ctl promote -D /data/dir/path -t 60 </pre><p>Check if PostgreSQL instance is salve mode</p><pre># select pg_is_in_recovery(); </pre><p>Get current LSN on master</p><pre># SELECT pg_current_xlog_location(); &lt; 10 // for PostgreSQL &lt; 10<br># SELECT pg_current_wal_lsn(); // for PostgreSQL &gt;= 10</pre><p>Get last received LSN on replica</p><pre># SELECT pg_last_xlog_receive_location(); // for PostgreSQL &lt; 10<br># SELECT pg_last_wal_receive_lsn() // for PostgreSQL &gt;= 10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IPWwoozDxeKoXMtXEyrtLw.png" /></figure><p><a href="https://blog.gojekengineering.com/">Click here</a> for more stories about how we build our Gojek #SuperApp.<br><a href="http://gojek.jobs/">Click here</a> if you’d like to build it with us. 💚</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a720e94630a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gojekengineering/upgrading-postgresql-at-scale-4a720e94630a">Upgrading PostgreSQL At Scale</a> was originally published in <a href="https://medium.com/gojekengineering">Gojek Product + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Your Subconscious Mind]]></title>
            <link>https://jainkuniya.medium.com/the-power-of-your-subconscious-mind-1408d617a368?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/1408d617a368</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[power]]></category>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[subconscious]]></category>
            <category><![CDATA[motivation]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Sun, 22 Nov 2020 09:48:24 GMT</pubDate>
            <atom:updated>2020-11-22T09:53:12.641Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/534/0*I4aPUq26ejNWFMaR.jpeg" /></figure><p><strong>The power of your subconscious mind.</strong> My learnings goes here 👇</p><p>1/n</p><ul><li>It’s all about what you think.</li><li>If you think it’s boring, then most interesting work will also be boring for you. If you think tiring, then even without doing any work you will feel tired.</li></ul><p>2/n</p><ul><li>Think good, good follows. Think bad, bad follows.</li><li>Conscious mind is kinda sync flow, actions are instant on any sense.</li><li>Subconscious mind is kinda async flow, build gradually from what conscious mind accepts.</li><li>Be away from negative advice and thoughts.</li></ul><p>3/n</p><ul><li>“Man is what he thinks all day long”</li><li>One expresses whatever he has in his subconscious mind: dedication, jealousy, happiness, sadness etc.</li><li>Subconscious mind have constructed our body. If required it can heal/recreate as well.</li></ul><p>4/n</p><ul><li>Subconscious mind is always open for suggestion.</li><li>Plant a good idea in mind, subconscious mind will give you fruits later.</li><li>Cause of disease is in mind &lt;=&gt; healing can also come from the same.</li><li>Only 1 process of healing =&gt; faith</li><li>Only 1 healing power =&gt; subconscious mind</li></ul><p>5/n</p><p>“The doctor dresses the wound, but God heals it”</p><ul><li>It’s the power of blind faith &amp; prayer therapy, where one keep aside all the negativity and thinks good. Which triggers subconscious mind to release healing.</li><li>People were even cured in time when there was no operation theatre.</li></ul><p>6/n</p><p>A mental picture is worth a thousand words. Your subconscious mind act as an architect, who brings the sketch in reality which was built by your thoughts.</p><p>7/n</p><ul><li>Scientists says: we build a new body every 11 months.</li><li>A lot can change in 11 months, affirm the good, and bad will vanish in the next cycle.</li><li>Get rid of darkness =&gt; light, cold =&gt; hot, overcome negative thoughts =&gt; substitute with good one.</li></ul><p>8/n</p><p>Dreams comes from your subconscious mind. Imagine the fulfillment of your desire over and over again. One day, all your dreams will come true.</p><p>9/n</p><p>Subconscious only accepts what you feel really to be true. It is a bank, multiple and magnifies what you deposit: fear/negative or positive thoughts, wealthy or poverty.</p><p>10/n</p><p>A person is rich or poor from his thoughts in his mind, subconscious mind.</p><p>11/n</p><ul><li>Subconscious mind is the storehouse of memories, deposit good and get good ones in return.</li><li>Success doesn’t come one way. You become successful by helping someone in succeeding.</li><li>Prepare your subconscious mind for the desire, and you will get pushed to it.</li></ul><p>12/n</p><ul><li>The action is your thought, reaction is the response from your subconscious mind.</li><li>Many times, after trying so hard, we aren’t able to solve a problem. And suddenly it clicks up in our mind when we are not thinking of it.</li><li>It’s subconscious mind, which is working for us.</li></ul><p>13/n</p><ul><li>Sometime you dream of what’s gonna happen next.</li><li>Many times you got a solution while you are asleep.</li><li>It’s all because of your subconscious mind. It never sleep.</li><li>There is nothing too hard for your subconscious mind. Give it a chance.</li><li>Sleep in peace and Wake in Joy</li></ul><p>14/n</p><p>Role of subconscious mind in marital relationship. No experience, can’t summarise 🙆🏻‍♂️ But ya in any relationship, belittling or condemning your partner in the eyes of others doesn’t make any sense. Eventually your mind will get filled with negatively and will lead to ∞ prob</p><p>15/n</p><p>The kingdom of happiness is in your thoughts and feelings. Happiness is a habit, and you must desire for it. Nobody can actually take it away from you. Some are happy despite having nothing, while others are unhappy even after having all. It’s your choice to be happy.</p><p>16/n on Human relations</p><ul><li>Ur subconscious mind is a recording machine which reproduces your habitual thinking. Think good of the other, and u r actually thinking good about yourself.</li><li>U r the only Thinker in ur universe, ur thoughts r creative. So what u think is what u feel.</li></ul><p>17/n</p><ul><li>Learn to forgive yourself. Don’t live with a guilt, learn from mistakes and move on.</li><li>Keeping the guilt, will block subconscious mind to think for positive future.</li><li>If you believe in your thoughts, nobody can criticize you. Even if they do, correct your faults and move on.</li></ul><p>18/n</p><ul><li>Solution lies within the problem, believe in yourself, have faith on infinite intelligence of your subconscious mind to solve it for you.</li><li>Habits are byproduct of your subconscious mind.</li><li>Positive thinking will result in good habits, while negatively will develop bad habits.</li></ul><p>19/n</p><ul><li>Subconscious mind takes your fears as a request, proceeds to manifest them, and brings them into your experience.</li><li>Do the thing you fear for, keep confidence and face it, make you mind several times that you can do it to get rid of fear.</li></ul><p>20/20</p><ul><li>Subconscious mind never gets old.</li><li>Your thoughts defines your age.</li><li>One is as strong as he thinks, and as valuable as he thinks.</li><li>Some are old at 30, while others are young at 80.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*FcfecADmHk0beIKP.jpg" /></figure><p>Vishwesh Jainkuniya © 2020</p><p><a href="https://github.com/sergiokopplin/indigo">Indigo theme</a> by <a href="https://github.com/sergiokopplin/indigo">Kopplin</a></p><p><em>Originally published at </em><a href="https://jainkuniya.github.io/summary-the-power-of-your-subconcious-mind/"><em>https://jainkuniya.github.io</em></a><em> on November 22, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1408d617a368" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Looser is not the one who loses, but the one who gives up]]></title>
            <link>https://jainkuniya.medium.com/looser-is-not-the-one-who-loses-but-the-one-who-gives-up-b076dadf28ba?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/b076dadf28ba</guid>
            <category><![CDATA[fail]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[loser]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Wed, 29 Apr 2020 13:30:23 GMT</pubDate>
            <atom:updated>2020-05-01T11:15:11.668Z</atom:updated>
            <content:encoded><![CDATA[<h3>Loser is not the one who loses, but the one who gives up</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2kFG0tq_Bg-L4oisfkj7gQ.jpeg" /></figure><p>This blog is targeted for all those who feel that they are losers, believe me, you are not and you will also feel the same after reading this.</p><p>I am from an engineering background, so mostly this blog will revolve around engineering entrance exams, engineering colleges, and the life of an engineer 😅.</p><p>In India, the Indian Institute of Technology (<a href="https://en.wikipedia.org/wiki/Indian_Institutes_of_Technology">IITs</a>) are considered as one of the best engineering colleges. At the time of writing this, there are 23 IITs which takes around 11,279 students every year.</p><p><strong>But do you know how many students give entrance exams for IITs?</strong></p><p>More than <a href="https://www.careers360.com/question-how-many-students-appeared-for-jee-main-and-jee-advanced-this-year">10,00,000 students</a> appear in this race of getting admission to IITs. Nearly 1.12% of students get into IITs. Around <a href="https://en.wikipedia.org/wiki/Suicide_in_India">2,000 students</a> do suicide due to failure in examination. They feel that they are useless, and are frightened of what others will think.</p><p>So here I want to say that if you didn’t manage to get admission in IIT, then you are not a loser. But if you just give up and stop doing hard work, then you are. Let’s take a simple example here:</p><p>I guess all have played <a href="https://play.google.com/store/apps/details?id=com.kiloo.subwaysurf&amp;hl=en_IN">SUBWAY SURFERS</a> game</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/0*ubgr4_Nx3sD7axfk" /></figure><p>If you have played it earlier then you must be knowing about <strong>HEADSTART</strong> power in it, which provides you some initial lead with points and coins while running.</p><p><em>Mind it, using this headstart does not ensure you a top score or high score in that game. You have to keep moving and work hard to gain that.</em></p><p>IITs are also similar to that headstart. Being the elite institutions of the country, will give you a safe side and provide headstart in your life. <em>But to be successful, you need to keep doing hard labor and good deeds.</em></p><p>So it is not the end of life if you can’t get into IITs. Keep working and the whole world will come to know about your work.</p><blockquote>It’s not IIT which make people successful, it is their talents.!!!</blockquote><p>Few examples:<br><a href="https://en.wikipedia.org/wiki/Satya_Nadella"><strong>Satya Nadella</strong></a><strong> (</strong>CEO of Microsoft<strong>), </strong><a href="https://en.wikipedia.org/wiki/Shantanu_Narayen"><strong>Shantanu Narayan</strong></a><strong> (</strong>CEO of Adobe Systems<strong>) </strong>and many many more (to know more, please follow <a href="https://www.quora.com/Are-there-any-famous-non-IITian-engineers-from-India">this thread</a>)</p><p>Failures are not only in exams, but they are also spread all over the life span.</p><p>I would like to share one more story, which inspires me a lot. This is a story of <a href="https://en.wikipedia.org/wiki/Harrdy_Sandhu">Harrdy Sandhu</a>, he is one of the most popular singers of Punjabi songs. He started his career in cricket and played for 10 years. <a href="https://m.dailyhunt.in/news/india/english/laughingcolours+english-epaper-laughcole/birthday+special+hardy+sandhu+started+his+career+as+a+cricketer+and+is+now+a+top+punjabi+singer-newsid-96313921">He also played in under-19 team</a>. But in 2006, he had an elbow injury. he was a fast bowler and his injury was on my right arm. He tried to get treatment, but nothing happened.</p><p>Now, he had two options: either he could curse his injury and give up and the second option was to move on. He had chosen the second one. He started his new career in singing and did hard work. Now, all know that he is the №1 singer in Punjabi Industry.</p><p><a href="https://en.wikipedia.org/wiki/Alexander_Graham_Bell">Alexander Graham Bell</a> (inventor of telephone), says</p><blockquote>When one door closes, another door opens, but we so often look so long and so regretfully upon the closed door, that we do not see the ones which open for us.</blockquote><p>IITs door is not the only door for you, and if it closed for you other doors are open for you.</p><p>Follow your passion, because doing something which you don’t like won’t keep you motivated, and it will be hard for you to give your best in it.</p><p>Just keep working hard until it is done, and never think for giving up.</p><p>A little about me: I also prepared for IIT, but was not lucky enough to get into the top 1.2%. I did my engineering from <a href="https://lnmiit.ac.in/">LNM-IIT</a>. I was disappointed by the result, but I promised myself that I will not think anymore about the result. I just focussed on what to do next, instead of looking back. When I was in the first year of my graduation, I faced some issues in college, which I realized can be solved by simple apps. And this was the turning point, I started coding, learned Android app development, did my <a href="https://summerofcode.withgoogle.com/">Google summer of Code</a>, contributed to many open-source libraries including <a href="https://github.com/facebook/react-native">react-native by Facebook</a>.</p><p>Recently I watched <a href="https://en.wikipedia.org/wiki/Chhichhore">Chhichhore</a> movie and got the inspiration to write this.</p><p>The message sought by this movie is <strong>‘You are not a Loser if you try your Best.’</strong></p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b076dadf28ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prepare for Mount Batur trek, Bali]]></title>
            <link>https://jainkuniya.medium.com/prepare-for-mount-batur-trek-bali-d1e0486c917e?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1e0486c917e</guid>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[bali]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[trekking]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Sun, 19 Jan 2020 02:04:00 GMT</pubDate>
            <atom:updated>2020-11-22T09:45:50.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e0kYNdbyuf5v8Uj2.jpg" /></figure><p>On my last trip to Bali, I went to <strong>Mount Batur Sunrise Trek</strong>. In this blog post, I am going to tell you all the details you need to know for the trek.</p><p><strong>Mount batur</strong> is situated in the North-East part of Bali, in <a href="https://www.google.com/maps/place/Kintamani,+Bangli+Regency,+Bali,+Indonesia/@-8.2499984,115.2749539,12z/data=!3m1!4b1!4m5!3m4!1s0x2dd1f46fa4effc21:0x4030bfbca7d2c20!8m2!3d-8.2573896!4d115.3548713">Kintamani</a> village. There are multiple points to start the trek. The most famous one is the sunrise trek. It is around ~81KM from <a href="https://www.google.com/maps/dir/Ngurah+Rai+International+Airport+(DPS),+Jalan+Raya+Gusti+Ngurah+Rai,+Tuban,+Badung+Regency,+Bali,+Indonesia/Mount+Batur+Sunrise+Trekking+Starting+Point,+Jl.+Bukit+Mekar+Sari,+Songan+A,+Kintamani,+Bangli+Regency,+Bali+80652,+Indonesia/@-8.4937193,115.142884,11z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x2dd2441650216933:0xdf71da6ddd7bcc1f!2m2!1d115.166787!2d-8.7467172!1m5!1m1!1s0x2dd24733aef83e13:0x1d61e0b3949f653d!2m2!1d115.3944304!2d-8.2408772">Ngurah Rai International Airport (Bali airport)</a>.</p><p>There are many tour packages which offer this trek, they will pick you up from your hotels at around 2–3 AM, followed by trek, breakfast at the top and again back to the hotel in the afternoon. They also provide a guide that will take care of you on the way.</p><p><strong>What did we do?</strong> We landed at <a href="https://www.google.com/maps/place/Ngurah+Rai+International+Airport/@-8.7467172,115.1645983,17z/data=!3m1!4b1!4m5!3m4!1s0x2dd2441650216933:0xdf71da6ddd7bcc1f!8m2!3d-8.7467172!4d115.166787">Bali airport</a> at 02:10 AM, then took the cab to the <a href="https://www.google.com/maps/place/Mount+Batur+Sunrise+Trekking+Starting+Point/@-8.2408772,115.3922417,17z/data=!3m1!4b1!4m5!3m4!1s0x2dd24733aef83e13:0x1d61e0b3949f653d!8m2!3d-8.2408772!4d115.3944304">starting point</a>. It was a ~2 hr drive. You can easily get <a href="https://www.gojek.com/">GoJek</a> or <a href="https://www.grab.com/sg/">Grab</a> or local Taxi. I would suggest you to either take GoJek or Grab because local Taxi will ask for more money ad being foreigner, and you will have to negotiate. Also, you will not be familiar with the local language. GoJek/Grab will charge you around ~450.000 IDR.</p><p>On the way, there was some guy who was collecting 30,000 IDR per person on the way to the starting point. This was a few kilometers away from the point. Nobody checked this ticket, you can avoid this.</p><p>After reaching the point, we asked Cab driver to talk to a local residence for a guide. He asked for 700.000 IDR. This was the way to high and might contain his commission as well. So we refused and found a girl who agreed in 250.000 IDR.</p><p>It was around 3:40 AM, and we started the trek. It was full moon night so the path was visible. The torch was provided by the guide, which helped a lot on the way. The way is almost straight, only a few divergences.</p><p>There are few shops on the way, for water bottles/cold drinks. But the price is more than 2x (around ~70.000 IDR), it gets on the increase as you move forward.</p><p>We took some Apples, and eat it while trekking. I advise you to take some fruit with you.</p><p>We keep on moving forward, there were people from all over the world trekking with us. I meet some people from Korea, Mauritius.</p><p>The point where the car drops you, at the starting point of the trek is already at some height. There is a village down. So after a few minutes of trek, you can get some views like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_p-5GEJsEiEQsh7z.jpg" /></figure><p>The way was not so steep, it is easy to moderate level. There is also a bike service which takes around 1000.000IDR to 2000.000IDR, totally depends on your negotiation. If you are taking a bike service, please make sure to hold your hands tight with the rider. If you fell, you will get hurt hardly.</p><p>It was around 05:30 AM, and the sun started rising. The view was like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2oQDTCn1ANHOiFqI.jpg" /></figure><p>On following the path with fellow trekkers, you will finally reach a point where the bike services stop. From this point, the way is steep, full of rocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YYKWMMfHgqKy_PDY.jpg" /></figure><p>It will take around 15–20 mins from this point to reach the top of Mount Batur.</p><p>We were fortunate we reach at the top by the time sunrise. The winds were mind-blowing. And the view was superb ❤️.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k5ILTqumCusl_kLa.jpg" /></figure><p>There are few more hilltops nearby if you wish you can take some more time and visit them as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D8fg1E72T1RoI8X1.jpg" /></figure><p>This is the village I was talking about, whose light looks fabulous while going up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wch67aJ6uDWjY4ur.jpg" /></figure><p>It was around 07:00 AM we started to go down back. It was easy to run, as you just need to maintain body balance.</p><p>Now the interesting part kicks in, as we are close to reaching bottom base. Our guide asked for her fee which was 250.000IDR. We gave it.</p><p>We were late while coming back, the sun was all most top at 09:00 AM.</p><p>After reaching base camp, there was nobody except a few local guys. And no cabs/transport service to catch the highway. There was a person and a car, whose tire was broken. This person kept on saying wait for a few minutes, the car driver is coming. As while starting the trek, we told our GoJek driver not to wait so he went. Now we were left with no option.</p><p>For a few minutes, we waited for the driver, then found some suspicious activity from this guy. He kept on calling a number on his phone. So we decided to walk with the help of directions in Google Maps. First, this guy was not allowing us to leave. But we kept on insisting that we will manage. And then this started asking for the trek fee around 700.000IDR by showing fake tickets. We refused it. Also at this point, our lady guide was not accepting that she has received money from us. They were having some conversation in the local language.</p><p>We decided to walk, there were no proper roads. I remembered the way while coming, so it was easy but the problem was you need to walk in an unknown place. Most people there don’t know English. While walking we got one farmer, who can only understand “highway, he took us to the main road. Then we saw a board of the cab service. While talking to the cab driver, one man came and started asking for money. This was the same man to whom we have refused for a guide while going up. As we have taken the cab, so the cab driver helped us from this guy and saved our money. Otherwise, we would have paid additional money.</p><p>This main road also had a way to start the trek, so you don’t need to go interior in the village as we did.</p><p><strong>If you are planning to go there, be cautious. Don’t give money without proper investigation, if someone asks for some fee or something else.</strong></p><p>The overall experience was very good. If you love trekking, then this trek is for you. It is of moderate difficulty, I would suggest it for beginners as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M6gA7JaQTMIf4CSW.jpg" /></figure><p>Then we went to a few more places, like <a href="https://www.google.com/search?sxsrf=ACYBGNR70ODK3wr5_fV0bcwwCsmp3ElvFg%3A1580583817263&amp;ei=ics1XsHmD_qe4-EP87WjsAQ&amp;q=handara+gate+bali&amp;oq=handara+gate+bali&amp;gs_l=psy-ab.3..0j0i7i30l3j0j0i7i30j0l4.4802.5722..5956...0.3..0.150.973.0j7......0....1..gws-wiz.......0i71j0i7i10i30.1tnOzEtQthg&amp;ved=0ahUKEwiBz9zHhbHnAhV6zzgGHfPaCEYQ4dUDCAs&amp;uact=5">Bali Handara Gate</a>. I will write another blog post in this series to share my first Bali trip.</p><p>Till then have a good time.</p><p><strong>Disclaimer:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Qzv1jIqa2k3aY6DL.jpg" /></figure><p>Vishwesh Jainkuniya © 2020</p><p><a href="https://github.com/sergiokopplin/indigo">Indigo theme</a> by <a href="https://github.com/sergiokopplin/indigo">Kopplin</a></p><p><em>Originally published at </em><a href="https://jainkuniya.github.io/prepare-for-mount-batur-trek-bali/"><em>https://jainkuniya.github.io</em></a><em> on January 19, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1e0486c917e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write code for humans, not for machines]]></title>
            <link>https://jainkuniya.medium.com/write-code-for-humans-not-for-machines-eb5097279aed?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb5097279aed</guid>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Fri, 30 Aug 2019 03:21:20 GMT</pubDate>
            <atom:updated>2019-08-30T04:26:59.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*kFhNeFug8yQs1EeN.jpg" /></figure><p>Here is a quote from <a href="https://martinfowler.com/">Martin Fowler</a></p><blockquote>Any fool can write code that a computer can understand. Good programmers write code that humans can understand.</blockquote><p>Because the compiler doesn’t care whether your code is cleanly written or unreadable mess — as long as the syntax is correct, the code will compile and it will run. If you are writing code for machines, then</p><blockquote>why aren’t you writing code directly in 0s ans 1s? 0️⃣ 0️⃣ 1️⃣ 0️⃣ 1️⃣</blockquote><p>It’s the programming language which is always helping you in readable code.</p><p>Easily readable code is easy to maintain. From business point of view <em>the shorter it takes to understand the code for a new programmer, the less money is required to bring the new person up to speed. </em>Thus, cleaner code has more worth.</p><p>When it comes to optimising code, most engineers will be frighten to touch messy code. He will think,</p><blockquote>I might break something in refactoring/optimising this code, so let’s not do it.</blockquote><p>On the other hand, it the code is easily readable, then anyone can take it up for refactoring and further optimising it.</p><p>From <strong><em>Structure and Interpretation of Computer Programs</em></strong> by <em>Abelson and Sussman</em></p><blockquote>Programs should be written for people to read, and only incidentally for machines to execute.</blockquote><p>What usually happens in big companies and organisations? 🤔<br>I would like relate this with a poem from high school: <a href="http://www.english-for-students.com/The-Brook.html"><strong>The Brook</strong></a><strong> </strong>by<strong> </strong><a href="https://en.wikipedia.org/wiki/Alfred,_Lord_Tennyson"><strong>Lord Tennyson</strong></a></p><blockquote>For men may come and men may go,</blockquote><blockquote>But I go on for ever.</blockquote><p>This is what exactly the code itself thinks. New programers will come and go, but I will always be there. So previous programmer should left me a state from where the new programer can easily pick me up.</p><p><strong>One more important thing:</strong></p><p>There will be always be some situations where cleaner code is taking 5% more time to execute, but corresponding complex code is taking long time to get understood by new developer. In such scenarios, if your team is growing fast its better to go with cleaner code. It will help a lot in new dev on-boarding and increase team velocity significantly. But if this piece of code is only touched by only one-two dev, then reducing executing time should be top most priority.</p><p>So it depends from case to case, you can not always stick to one.</p><h4>Now, let’s see some very basics but effective ways to write clean readable code:</h4><ul><li>Indentation/Line length</li></ul><p>#1</p><pre>$my_email-&gt;set_from(&#39;test@email.com&#39;)-&gt;add_to(&#39;programming@gmail.com&#39;)-&gt;set_subject(&#39;Methods Chained&#39;)-&gt;set_body(&#39;Some long message&#39;)-&gt;send();</pre><p>#2</p><pre>$my_email<br>-&gt;set_from(&#39;test@email.com&#39;)<br>-&gt;add_to(&#39;programming@gmail.com&#39;)<br>-&gt;set_subject(&#39;Methods Chained&#39;)<br>-&gt;set_body(&#39;Some long message&#39;)<br>-&gt;send();</pre><p>Just after having a quick look on #2, anyone can understand what it is suppose to do, but not with #1.</p><p>Also, if anyone intends to read the code from a terminal window, such as <a href="https://net.tutsplus.com/tutorials/other/venturing-into-vim-new-premium-video-series/">Vim users</a>, it is a good idea to to limit the line length to around 80/100 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*eTg8RHxCrWiYcLXmql3pgw.png" /></figure><blockquote>Do you ever wondered why newspaper articles have narrow columns of text?</blockquote><p>Because our eyes are more comfortable when reading tall and narrow columns of text.</p><p>SAME goes with code as well 🙌</p><ul><li>DRY Principle</li></ul><p>It stands for <strong>Don’t Repeat Yourself</strong>. Also known as <em>DIE: Duplication is Evil.</em></p><p>If you are repeating same code again and again, then first of all it becomes very hard to maintain it. As in future, if there is slight change in the requirement then you need to do changes at various places and it is very likely that you will miss out some places.</p><p>So it significantly effects code readability.</p><ul><li>Avoids comments as much as you can</li></ul><p>Code should be as simpler as it can be (of-course not violating anything). Please don’t write obvious comments like:</p><pre>// if country code is US<br><strong>if</strong> ($country_code == &#39;US&#39;) {</pre><p>This just adds noise to your code, and unnecessary increases file length 🤷‍♂.</p><p><a href="https://martinfowler.com/">Martin Fowler</a> says:</p><blockquote>When you feel the need to write a comment, first try to refactor the code so that any comment becomes superfluous.</blockquote><p>Think twice, when you THINK of writing a comment next time.</p><p>This are the some ways in which you can write clean code. There are other ways as well. I have highlighted only this, because I think they are very easy to take care while writing code, and affects the readability a lot.</p><p>Thanks for reading . I hope you understood, why it important to write clean readable code, because we write it for humans. Your peers should able to understand it . WE DON”T WRITE CODE FOR MACHINES. And its not hard to write clean code. Just we need to take care of small small things. 🙌</p><p>Hope you enjoyed reading it. Next blog post coming soon 🙈</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb5097279aed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Indian education system can be improved with Money]]></title>
            <link>https://jainkuniya.medium.com/how-indian-education-system-can-be-improved-with-money-cd1934abc63b?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd1934abc63b</guid>
            <category><![CDATA[india]]></category>
            <category><![CDATA[indian-education]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Sun, 18 Aug 2019 21:50:29 GMT</pubDate>
            <atom:updated>2019-08-18T21:50:29.472Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*8v6wnoWk15w8IhCG" /></figure><p>Let’s start with a simple question:</p><blockquote>Why education is so important?</blockquote><p><strong>What, what, why this question?</strong></p><p>Because if you giving money, then you are expecting something from it. If is not important, then why Indian is spending around Rs 50,000 crore every year on Education??</p><p>So <strong>Education</strong> is important, it is knowledge gain. It gives us a knowledge of the world around us. It develops in us a perspective of looking at life. And most importantly it helps us build opinions and have points of view on things in life.</p><p><strong>Face of current education system in India:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fj5A9a8T6kR1RBwwhKHa6g.png" /><figcaption>According to National Sample Survey Office (NSSO)</figcaption></figure><p>Why, what’s the reason behind this drop out? On further research following reasons were identified:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_8ge114_fxuriKqWfeRjxw.png" /><figcaption>According to Livemint</figcaption></figure><p><strong>School is far off — </strong>Money plans important role in setting up infrastructure of school.</p><blockquote><a href="http://www.newindianexpress.com/thesundaystandard/2018/sep/16/13500-villages-in-india-dont-have-schools-1872440.html"><strong>13,500 villages in India don’t have schools</strong></a><strong> </strong>(according to Indianexpressnews)</blockquote><p>This new school will also require teachers, their salary also counts in this budget.</p><p><strong>Unable to cope up with studies — </strong>This is mainly due to lack of practicals equipment (toys for primary schools), students are not able to get feel of what is being taught.</p><p><strong>Engaged in economics activities-</strong>In villages, most of the people are poor and can’t afford meal of the day. So they engage their children either to their farm or force them to work at some other place as a child labour.</p><p>Indian government has taken some steps to cop with this, by starting mid day meal. In this scheme, student will get meal in the school itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ooyl9g0eZixluCqjcaHOkA.png" /></figure><p>But more money is required to provide better food. As there are millions of students to feed, and with current scenario money available for one student meal is Rs. 4.58 (which is even not sufficient to get a decent chocolate).</p><p>Spending more money in this direction will help in bringing more students to schools.</p><p>From last many years Indian government is taking education as a priority and launching several programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*klCr_vNQ3NPfHAdo.png" /></figure><blockquote>India stepped up its spending on school education by 9.35% from 2014–15 (Rs 45,722.41 crore) to 2018–19 (Rs 50,000 crore). But education’s share in the total <a href="https://www.business-standard.com/topic/union-budget">union budget </a>fell from 2.55% to 2.05% in this period, according to an <strong>IndiaSpend </strong>analysis of <a href="https://www.indiabudget.gov.in/previousub.asp">budgetary data</a>.</blockquote><p>It is good that government is increasing budget for education industry. But this budget calculation should also take account of current number of students.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd1934abc63b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Are Engineering Colleges In India Country Closing Down?]]></title>
            <link>https://jainkuniya.medium.com/why-are-engineering-colleges-in-india-country-closing-down-4d2c194d6d25?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d2c194d6d25</guid>
            <category><![CDATA[india]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Fri, 16 Aug 2019 01:57:05 GMT</pubDate>
            <atom:updated>2019-08-16T02:34:55.822Z</atom:updated>
            <content:encoded><![CDATA[<h3>Engineering colleges culture is not good</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Jd0aODn3Gtsqn03" /></figure><blockquote>9 students die of ragging every year [<a href="https://www.news18.com/news/india/high-crime-9-students-die-of-ragging-every-year-311096.html">new18</a>]</blockquote><p>Culture of colleges in India is whole full of toxic. Let’s start with some of the facts:</p><ul><li>According to a report of news18, around 9 students die every year.</li><li>8.9 percent of college students smokes, according to D<a href="https://www.drugabuse.gov/related-topics/trends-statistics/infographics/drug-alcohol-use-in-college-age-adults-in-2016">rugabuse</a></li><li>Hookah use is trending down in college students. In 2011, hookah use was 27.9 percent and fell to 16.9 percent in 2016. According to D<a href="https://www.drugabuse.gov/related-topics/trends-statistics/infographics/drug-alcohol-use-in-college-age-adults-in-2016">rugabuse</a></li></ul><p>College culture is like a chain, which keeps on gets passed from one batch to another, from seniors to juniors. So if something either good or bad is started at any point of time, it will get passed to other batches as well.</p><p>It mostly depends on seniors, if they starts some good culture of coding, open source, then it leads to a better culture and acts as a positiveness for both college as well as juniors. On the other hand, if seniors are involved in drinking, smoking, ragging then juniors will also get involved in it.</p><p>So in order to prevent this, college authorities have to take action as soon as such activities are observed it will get accustom in the college culture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d2c194d6d25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some most useful shortcuts of vi]]></title>
            <link>https://jainkuniya.medium.com/some-most-useful-shortcuts-of-vi-2b8a549cf9fa?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b8a549cf9fa</guid>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[vi]]></category>
            <category><![CDATA[shortcuts]]></category>
            <category><![CDATA[keyboard]]></category>
            <category><![CDATA[mouse]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Sun, 11 Aug 2019 23:11:45 GMT</pubDate>
            <atom:updated>2019-08-11T23:11:45.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*LxXxsORE4_KHVj22.gif" /></figure><p>Hi, before few months I rarely used <em>vi editor.</em> I was not familiar with it’s shortcuts and was always lazy to learn. Always thought that there are so many shortcuts and I won’t be able to remember them, and always preferred fancy UI editors.</p><p>During my intern with Gojek, I observed many people using <em>vi editor </em>seamlessly and I found that it way too fast than my fancy UI. Then I decided to use <em>vi editor,</em> and it my default editor. Day by day, as I was to do something in it, I search on Google <strong>How to …… in vi</strong> and then do it. After few searches, I got used to it. And my brain started remembering them.</p><p><a href="http://facweb.cs.depaul.edu/sjost/csc423/examples/anova/efficiency.pdf"><strong>Comparison of Mouse and Keyboard Efficiency</strong></a> (2010) by <em>Omanson, Miller, Young an Schwantes </em>shows that:</p><blockquote>Overall, the <strong>Toolbar-Mouse method was the fastest</strong>, while the <strong>Menu-Keyboard condition showed the most improvement</strong>. A GOMS-based model is presented that accounts for differences among methods. This work confirms the use of toolbars for common commands, but also suggests that <strong>for heavily-used interfaces, keyboard shortcuts can be as efficient as toolbars</strong> and have the advantage of providing fast access to all commands.</blockquote><p>So doing some tasks keyboard is effective while for other mouse is. Like you can easily move/cut/paste lines from keyboard than mouse. Apply styles, format much quicker as compared to mouse.</p><p>I have compiled some <strong>Must to know shortcuts:</strong></p><h4>Moving the cursor helps a lot in navigation quickly</h4><blockquote>Most useful</blockquote><ul><li>B — Previous Word</li><li>W — Next Word</li><li>0 — move the cursor to the beginning of the current line</li><li>$ — move the cursor to the end of the current line</li></ul><blockquote>Good to know</blockquote><ul><li>l — move the cursor one character to the right</li><li>h — move the cursor one character to the left</li><li>k — move the cursor up one row</li><li>j — move the cursor down one row</li><li>G — move the cursor to the bottom of the file</li><li>1G — move the cursor to the top of the file</li><li>H — move the cursor to the top row on the screen</li><li>M — move the cursor to the middle row on the screen</li><li>L — move the cursor to the last row on the screen</li></ul><h4>Inserting text</h4><blockquote>Most useful</blockquote><ul><li>i — insert text immediately before current cursor position</li><li>A — append text to end of current line</li></ul><blockquote>Good to know</blockquote><ul><li>a — append text immediately after current cursor position</li><li>o — open line below current one for input</li><li>I — insert to beginning of current line</li><li>O — open line above current one for input</li></ul><h4>Undo</h4><ul><li>u — undo the last action</li></ul><h4>Cut &amp; Paste</h4><ul><li>yy — yank lines into a temporary buffer, where they are saved for later use</li><li>p — paste the previously yanked lines</li></ul><h4>Saving</h4><ul><li>:w — write the file and save the changes</li><li>:w name — write the file and save the changes into a file with the new name</li><li>:wq — write and quit</li></ul><p>Get complete reference at <a href="https://www.daveperrett.com/articles/2006/08/18/useful-vi-commands/">https://www.daveperrett.com/articles/2006/08/18/useful-vi-commands/</a></p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b8a549cf9fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GIT: How to extract code with its history??]]></title>
            <link>https://jainkuniya.medium.com/git-how-to-extract-code-with-its-history-dcb8ff7df51e?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcb8ff7df51e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[extract]]></category>
            <category><![CDATA[history]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Sun, 11 Aug 2019 22:43:37 GMT</pubDate>
            <atom:updated>2019-08-12T09:02:18.251Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, in the software industry Microservices architecture is the hot topic.</p><blockquote><strong>Microservices</strong> are a software development technique — a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. In a <strong>microservices</strong> architecture, services are fine-grained and the protocols are lightweight.</blockquote><p>Almost all companies want to move in the direction of Microservices architecture. It helps in scaling and many teams can work on their respectively services codebase without interfering others, thus resulting in faster delivery of the product.</p><p>At an abstract level, the story of all fast-growing startups is the same.</p><blockquote><strong>Started from a standalone project — &gt; created impact — &gt; wants to scale =&gt; moving out modules from standalone project to its standalone Microservice</strong></blockquote><p>Now just copy-pasting modules from one bigger project without its history doesn’t make any sense. As lots of time is already invested in maintaining its history, it’s version.</p><p>Here comes the real magic :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/0*mFpcauLSrT03W83P.gif" /><figcaption>It’s magic</figcaption></figure><p>In <strong>git</strong>, one can easily filter out files with commit/tags history from a bigger repository. All you need to do is to follow these steps:</p><ul><li>First, you need to figure out what all the files you want in the new project. You can create a script like</li></ul><pre>#!/bin/bash<br><br>mkdir -p combined/<br><br># Pipe output to silence &quot;file not found&quot; warnings.<br>mv modules/netinfo/NetInfoModule.java combined/ 2&gt;/dev/null<br>mv Libraries/Network/RCTNetInfo.h combined/ 2&gt;/dev/null<br>mv Libraries/Network/RCTNetInfo.m combined/ 2&gt;/dev/null<br>mv Libraries/Network/NetInfo.js combined/ 2&gt;/dev/null<br><br>true</pre><p>Create this script somewhere outside the repository. Let’s save it in ~/treefilter.sh. Then run following git commands:</p><blockquote>git fetch origin --unshallow</blockquote><p>--unshallow is used here, so:</p><p>If the source repository is complete, convert a shallow repository to a complete one, removing all the limitations imposed by shallow repositories.</p><p>If the source repository is shallow, fetch as much as possible so that the current repository has the same history as the source repository. <a href="https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---unshallow">read more</a></p><blockquote>git checkout -b history</blockquote><blockquote>git filter-branch -f --prune-empty --tree-filter ~/treefilter.sh @</blockquote><p>This will take a while and will use the script to move all of the files you’re interested in into a single folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38JXfzrTZTn63KdXHmaVqA.png" /><figcaption>Tree filter result</figcaption></figure><blockquote>git filter-branch --prune-empty -f --subdirectory-filter combined</blockquote><p>This will be fairly quick and will move the files from the new folder to the root and then keep only the commits that alter any of the files you want to keep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TM4hFWRP1cphfgrJGBOa-A.png" /><figcaption><em>Subdirectory filter result</em></figcaption></figure><p>Now you have all the required file with history in the new repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O_Y-HpvuqVq_2uduGBTyHA.png" /><figcaption>Files</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSVz01fwKtqn0rlv90QrSg.png" /><figcaption>git history</figcaption></figure><p>And yes! we dit it. This approach has been used in <a href="https://github.com/facebook/react-native/issues/23313">Lean Core Project</a> in <a href="https://github.com/facebook/react-native">react-native</a>. As a result following repos have been created</p><ul><li><a href="https://github.com/react-native-community/react-native-netinfo/">https://github.com/react-native-community/react-native-netinfo/</a>,</li><li><a href="https://github.com/react-native-community/react-native-picker">https://github.com/react-native-community/react-native-picker/</a>,</li><li><a href="https://github.com/react-native-community/react-native-cameraroll">https://github.com/react-native-community/react-native-cameraroll</a></li><li>and many more</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*B5GihLIkVzQ_rz27.gif" /></figure><p>Thanks a lot for reading it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcb8ff7df51e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learnings in the first week of the Bootcamp]]></title>
            <link>https://jainkuniya.medium.com/learnings-in-the-first-week-of-the-bootcamp-19b5f2b5c35d?source=rss-bb4dc7d70e69------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b5f2b5c35d</guid>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Vishwesh Jainkuniya]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 19:22:03 GMT</pubDate>
            <atom:updated>2019-08-09T03:46:58.770Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone! Gojek started it’s Bootcamp this week. And I am part of it. In this blog I am going to share some of my learnings:</p><p><strong>Don’t assume anything — </strong>Never pre assume anything. This applies in many ways, like: never assume what customer/end-user needs, clear the requirement with the customer. Also never assume that this library or this piece of code do this thing, go and verify it.</p><p><strong>Back your arguments with facts/data — </strong>Literally there is no sense in making/convincing someone without data. An argument without fact is useless. It is not like that if you feel its correct, means its correct. No.No.No.No</p><p><strong>Communication is an art — </strong>Presenting your point in front of someone is a great technique. The whole audience should get the same argument should be the only objective of your presentation.</p><p><strong>Failures don’t pull you back, rather they make you stand two-step ahead — </strong>Never get afraid from failures, it comes with a FREE lesson. Just learn from it and move forward and never repeat the same mistake.</p><p><strong>Human lacks doing the repetitive task correctly — </strong>That’s where machine/computer comes into the picture. To take full advantage of them, try to automate as much as possible. This will help you to target on other more important stuff.</p><p><strong>Try to find the reason behind everything — </strong>If you know the reason, it will be easy for you to remember it, apply it, use it, relate it.</p><p><strong>Never fall in love with your creation/code — </strong>Because if you do, it will make your decision biased. And you will be afraid to alter it to do improvements.</p><p>These are some of my learnings, will be sharing more in the next blog post.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b5f2b5c35d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>