<?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"><channel><title><![CDATA[Shloka's Blog]]></title><description><![CDATA[Sharing my Learning & Experiences | SDE II @ HackerRank]]></description><link>https://blog.shlokashah.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 11:56:36 GMT</lastBuildDate><atom:link href="https://blog.shlokashah.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A Leap into the Stars]]></title><description><![CDATA[As I sit on the swing at my home in Bangalore and chat with my brother, he tells me about a star gazing event his friends plan to visit near Mumbai. I have a sudden jump in my stomach, going to an astronomy camp is something I always wanted to do (st...]]></description><link>https://blog.shlokashah.com/a-leap-into-the-stars</link><guid isPermaLink="true">https://blog.shlokashah.com/a-leap-into-the-stars</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 01 Feb 2025 16:10:22 GMT</pubDate><content:encoded><![CDATA[<p>As I sit on the swing at my home in Bangalore and chat with my brother, he tells me about a star gazing event his friends plan to visit near Mumbai. I have a sudden jump in my stomach, going to an astronomy camp is something I always wanted to do (still hoping to visit the Indian Astronomical Observatory someday).</p>
<p>I wonder what has been stopping me from attending one so far, but this time, I decided to get out of my head and just go for one. I grab my phone and quickly start looking for such camps near Bangalore.</p>
<p>Five minutes into the search, I came across RiSa Astronomy, and the stars aligned, they had an event coming up with registrations still open. It was a two-day event at a remote place in Tamil Nadu. I quickly message Anish (he along with his wife and two daughters runs the astronomy camps at RiSa) gathering all the details and registering for the event.</p>
<p>I see the registration successful screen on my phone, and then I start wondering, wait I will be going alone with 40 other strangers, how will I manage all of this? But it was time to take the leap of faith and get out of my head.</p>
<p>Fast forward to Friday, I got the details of the driver who will be driving me to the farm in Tamil Nadu, I saw the name and thankfully I had traveled with him before, the trip was to a good start.</p>
<p>I packed my bag and the short trip to witness the stars had officially started.</p>
<p>On the way to the farm, I stopped for a quick stop to have a hot plate of Rava Dosa. As the waiter served the dosa, I wondered, if it was a bad decision to go alone, it was my first time going alone with a group of strangers to a place where there was going to be no network, maybe it was time to take a U-turn and go back home. But it was time to just go with the flow.</p>
<p>The camp was going to start at 3, but I didn’t want to take a chance of missing any part of it and considering the worst-case scenario of things going wrong on the way, I reached there at 1. The road on the way was covered with mountains on both sides and clear skies.</p>
<p>As I reached the farm, I said bye to the driver and asked him to pick me up tomorrow. I was greeted by the farm owner, who showed me the tents where we were all going to stay for the night. He assigned me my tent and the excitement in me pumped up. It was my first time staying in a tent.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424137034/461743b1-4c2b-47ec-888d-fa5ddc581a58.jpeg" alt class="image--center mx-auto" /></p>
<p>Since I had two hours before the camp started, I had all the time to roam around and explore the farm. I went to their cafe where I was greeted by two cute ducks and a few rabbits. The view from there was beautiful. I found a nice cozy spot, facing the view, and started reading the book I carried. After some time, I got bored and went to explore the farm. It was a calm and quiet place in the middle of nowhere with no network.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424217625/29a338fb-edb3-4947-b490-ca5c1de7b6fd.jpeg" alt class="image--center mx-auto" /></p>
<p>As the clock struck 3, I was waiting with all my excitement for the camp to start and see the people who would be attending it, I finally met Lakshmi, who was our instructor for the camp.</p>
<p>I saw her set up the hydrogen telescope and it was finally time to view the Sun. As I slowly went near the telescope and peeked my eyes near the lens, there it was, a huge ball of yellow-reddish light, it looked massive.</p>
<p>One by one everyone took turns in watching the Sun and settling in their tents. It was now time for the astronomy theory session.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424303206/d669b091-63fc-4e93-b456-152dae4a0fed.jpeg" alt class="image--center mx-auto" /></p>
<p>We were given a sheet, showing the alignment of stars, and which satellites would cross Denkannikotai which may be visible to us. This was later followed by Laxmi explaining to us how to measure the altitudes with our hands to get the position of the satellite and what Azimuth was.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424502296/fff02260-b1c0-4d6f-a270-3bf333429e45.jpeg" alt class="image--center mx-auto" /></p>
<p>Riddhi then came in and explained the Big Bang to us, we went on discussing black holes and, the difference between meteorites, meteors, and meteoroids.</p>
<p>This is when things got more interesting, they had collected some meteorites from around the world and we had the chance to see them. They explained how one could determine which meteorite it was based on the element composition. These are the meteorites that we saw, the Chelyabinsk meteor (this one looked like silicon) and Gebel Camil (a reptile skin-like texture but was a huge mass of Iron and magnetic).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424604302/0201b42e-157a-4368-9258-5aaeb6acff57.jpeg" alt="Chelyabinsk meteor" class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424649501/93c3bfc1-5d20-41dc-96a2-515ca3e02c8c.jpeg" alt="Gebel Camil" class="image--center mx-auto" /></p>
<p>We ended the theory session with some trivia and a cup of chai and pakoda and now it was time was a short hike to a nearby peak to view the sunset.</p>
<p>As we were about to start the hike, I met Aishwarya, she was here with her cousin from Bangalore. Our conversation somehow started with discussing books where I told her about my favorite books and that’s when she told me how she started a library 16 years back, her experience running it, and how she still had some old classics with her (even though the library was now closed). As soon as she told me she ran a library, in my mind the first instinct was (wow, that’s like a dream). She became my hike buddy and both of us slowly started the walk towards the peak.</p>
<p>With the sun almost starting to set in the west, as we crossed farmlands, I saw grass, the ones I did not witness in real life, the actual light green color. We passed through a small house with cows outside and a huge tamarind tree.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424900272/7a6bdcf7-6071-49a9-b8b7-2d8718ab3381.jpeg" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738424909550/e4c991a7-bfef-46a2-b920-22627388c57b.jpeg" alt class="image--center mx-auto" /></p>
<p>So far, the trail had been easy with some huge rocks in the middle. The next stretch was a narrow steep path with grass on both ends followed by a steep massive rock to cross. As we reached the steep path, I slowly started seeing people fade ahead. Aishwarya was ahead of me and kept motivating me as I took small breaks.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425084913/860f33c3-d04a-4a6c-b04a-c82b6e4a9b76.jpeg" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425118557/a53aa409-176b-458c-8216-5ae6e772f225.jpeg" alt class="image--center mx-auto" /></p>
<p>We finally reached the peak and the view was amazing. We could see our tents, the green grass we just crossed, and the sun? that was just beautiful.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425325088/b06ca0ad-261e-4929-a2fd-db19e88db963.jpeg" alt class="image--center mx-auto" /></p>
<p>I was happy about just reaching the top, even though it was a relatively easy one, finally this time no one had to drag me to the top. As a small token to remember this hike forever, I picked up a few stones from the peak and carefully kept them in my small bag.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425290376/c3956f5b-5a2c-434e-a3b5-d81392f81041.jpeg" alt class="image--center mx-auto" /></p>
<p>As I sat on the corner of the mountain, with the view of the sun setting, I was happy that I took the leap of faith and came here. It was only 4 hours into the camp and I was already feeling so content. After soaking in the view for half an hour, it was time to climb down, this one felt easy. As I climbed down, I was constantly juggling between keeping my phone intact and making sure I did not lose the stones.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425347320/20530dc0-70fa-4a73-8c3e-15e320e23da6.jpeg" alt class="image--center mx-auto" /></p>
<p>The next part was now to view the planets. We went to the observatory deck where we were greeted by the huge telescope.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425473041/f8f3fcfd-5424-4ce2-9ec5-9429b3acfdbe.jpeg" alt class="image--center mx-auto" /></p>
<p>As it started getting darker, we also turned off all the lights of the farm, it was pitch dark, and we could see some of the things with our naked eyes like the reddish tint of Mars, the Orion, and wait the best part? We saw satellites moving in the sky. We quickly took the sheets out that were given at the start of the camp and started guessing which satellite it was.</p>
<p>If I had to describe how the satellites looked, it would be one word, it went like ZOOOP.</p>
<p>Tent by tent we took our turns in viewing the planets. We saw Saturn, looking pretty with its rings as usual, followed by Mars which looked like a red ball, Jupiter, Venus, and finally Uranus which was blue.</p>
<p>As I looked through the telescope at the planets, it struck me how small I was in comparison to the vast universe around me. The sheer size of Saturn’s rings, the red hue of Mars, and the tiny, distant glow of Uranus — it all felt so distant, yet in a way, it connected to something much larger. It made me realize how fleeting our moments are in the grand scheme of things. It was humbling and awe-inspiring all at once.</p>
<p>While we viewed through the telescope, we saw the Canis Major, and Canis Minor (hunting dogs of Orion), tried locating the pole star, and learned about the mythological rivalry between Scorpius and Orion, which is why they appear on opposite sides of the sky at different times. We also spotted Betelgeuse (the yellow-orange star) Rigel (the blue star), and the constellation of Taurus.</p>
<p>Another interesting thing that Lakshmi told us about was why the Sun sign was called as Sun sign. The Sun shines in different constellations during the time of the year, and based on the time of the month you were born, and the constellation in which the sun shines, that becomes your Zodiac/Sun-sign.</p>
<p>We were also told that it is not advisable to use white light when trying to see the stars since once your eyes are exposed to white light, it takes about 20 minutes for them to adjust and become accustomed to viewing the sky again.</p>
<p>No picture could do justice to the view, but here’s one that I was able to capture.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425616626/3ec64f1a-78b5-4e36-917d-4ac6fbe10aa4.jpeg" alt class="image--center mx-auto" /></p>
<p>We now dispersed for dinner where we were treated to some homely food at the cafe.</p>
<p>I quickly wrapped my dinner and went back to the observatory deck where it was now time to view the Orion Nebula (a region where new stars are being born. It's where gravity causes the material to collapse and form new stars). While the telescope was adjusted to point to the Nebulla, we were explained how the stars that we will just view, in terms of human age, are just 3 days old!</p>
<p>As the night unfolded, the view kept getting mesmerizing. We discussed about Milky Way and the right regions and places to witness it. We also saw how the stars moved towards the west from the time when we saw them before dinner.</p>
<p>It was now time to return to our tents since we had to wake up at 4 to witness the Lunar objects and Moon.</p>
<p>It was my first time staying in a tent, I quickly settled it with my sleeping bag and hoped to not face any insects or snakes. It was a peaceful night.</p>
<p>As the dawn crept in at 4 AM, I quickly went out of my tent towards the observatory deck, where I witnessed the moon. Since there was no one there yet, I went for a walk, and when I returned the moon was gone, completely hidden by the fog and the clouds. We waited for some time but there were no chances of it being seen since the fog kept getting intense.</p>
<p>We had now almost reached the end of the camp. The only thing left now was a tractor ride to a nearby temple on the hill and witnessing the sun again with the hydrogen telescope.</p>
<p>We quickly had our morning tea and tried squishing in the tractor. We crossed muddy trails, and a dam and saw some local villagers going to their farms. As we reached the temple, we explored the hill for some time, soaked in the morning sun, and took the way back. We witnessed the morning mist covering the dam water and the sun shining brightly in all its glory!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738425967944/b05c92a4-c9c5-4ae6-a771-0c244e592a19.jpeg" alt class="image--center mx-auto" /></p>
<p>At breakfast, we had some hot Thatte idlis and Vadas, post which it was time for the final ride to the observatory deck.</p>
<p>The sun was bright up and the fog had almost cleared, and as I peaked through the telescope, I witnessed the filaments of the sun and a hot ball of red color coming straight at you.</p>
<p>After saying bye to Aishwarya and some other folks I met at the camp, soaking the view from the cafe, and grabbing my stuff from the tent, waited for my car to arrive.</p>
<p>On the way back, I narrated my experience to the driver who was eager to know why I came here alone and what was so special about it. While I wasn’t able to explain it to him while we were going to the farm, I for sure had a good enough answer for the question now when we returned home.</p>
<p>It was two days of pure bliss. It made me realise that sometimes getting out of your comfort zone and exploring the unknown can give you experiences you never expected. Sometimes the best experiences happen when you let go of expectations and just go with the flow.</p>
<p>As I sit on the swing today writing the blog, where the idea of going to an astronomy camp originally popped up in my head, I can just say one thing, I can’t wait to go for another astronomy camp!</p>
]]></content:encoded></item><item><title><![CDATA[A Walk down the familiar/unfamiliar path]]></title><description><![CDATA[As I sit down on the swing planning for my trip to Mumbai and scrolling down through Instagram, I come across BombayBookies, a silent reading community based in Mumbai. I see their videos, and there is a sudden jump in my stomach; I wish I had Doraem...]]></description><link>https://blog.shlokashah.com/a-walk-down-the-familiar-unfamiliar-path</link><guid isPermaLink="true">https://blog.shlokashah.com/a-walk-down-the-familiar-unfamiliar-path</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 03 Nov 2024 10:09:31 GMT</pubDate><content:encoded><![CDATA[<p>As I sit down on the swing planning for my trip to Mumbai and scrolling down through Instagram, I come across <a target="_blank" href="https://www.instagram.com/bombaybookies/">BombayBookies</a>, a silent reading community based in Mumbai. I see their videos, and there is a sudden jump in my stomach; I wish I had Doraemon’s Anywhere Door to take me right to those sessions.</p>
<p>I quickly fill out the registration form, hoping to get in before my trip. I wanted to attend it. I love these communities/places where people come together and read silently.</p>
<p>Fast forward to last Sunday, when I finally got past the registration and was all set to attend.</p>
<p>It was 1:30 AM on Sunday. I quickly set an alarm for 5:30 AM, all excited to experience it. I woke up at 5:30 and quickly packed my bag with the book I had been reading and the new highlighters I had just gotten from Muji. The session was going to start at 8:00 AM. I had to catch a local train at 6:30 AM for Churchgate. I wanted to be there on time to avoid missing part of the experience. It would be my first time traveling on the local train in over a year.</p>
<p>I hurriedly walked to the railway station from my home, got my ticket to Churchgate, and made it onto the train just in time. The platform had changed so much that I had to ask a police officer for directions to the ladies compartment. As I sat in the local train on the same window seat that used to be my favorite when traveling to and from college, nostalgia hit.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730628305540/ec7c373d-bc1a-42db-a503-3a86566b229f.jpeg" alt class="image--center mx-auto" /></p>
<p>As I looked out the window, I noticed that while some things were the same as before, a lot had changed. Through these paths, I have seen different versions of myself over the years. At that point, <em>I realized that sometimes a walk down familiar lanes offers a gentle reminder of how much potential lies within you. The paths we've taken soon become a part of who we are</em>.</p>
<p>An hour later, I arrived at Churchgate and took a 15-minute walk past the Mumbai High Court and Oval Maidan to reach the garden. As I entered the garden, I saw hundreds of people, all dressed in blue, which was the theme for the day. After registering, I found a spot and settled in with my book. At 8:00 AM, the garden went completely silent. The only rule: no phones for two hours. I doubted it could work but was amazed that everyone followed it. For an entire two hours, no one used their phone; everyone was silently engrossed in reading.</p>
<p>As the session drew to a close, the silence gradually gave way to gentle murmurs. People stretched, exchanged shy smiles with their reading neighbors, and gathered for pictures, chai, and bun maska. Took this picture after the session ended.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730628406788/1a0f6e55-cbab-4438-9597-4003c8301bc7.jpeg" alt="Took this picture after the session ended" class="image--center mx-auto" /></p>
<p>As I started walking back to Churchgate station in the scorching heat, I saw the Air India building, my favorite spot to sit at Marine Drive. I quickly changed my path and started walking toward the building; five minutes later, I regretted it due to the heat but kept walking and finally reached there and stayed for some time.</p>
<p>With no energy left to walk further, I started looking for a taxi to go home. Finally, one taxi stopped with an old uncle driving it.</p>
<p><strong>Me</strong>: “Uncle, Churchgate station chhod denge?”<br /><strong>Uncle</strong>: “Beta, baju mein toh hai, chal kar chale jao.”<br /><strong>Me</strong>: “Uncle, garmi bohot hai, chala nahi jaa raha.”<br /><strong>Uncle</strong>: “Acha baith jao, but 30 rupees cash hai na?”<br /><strong>Me</strong>: “Haan, uncle. Aap UPI nahi use karte? Aaj kal sab wohi use karte hai.”<br /><strong>Uncle</strong>: “Nahi beta, sirf Sunday gaadi chalata hu, apne shauk ke liye, isiliye sirf cash use karta hu. Lagta hai tum bhi Sunday ko college ja rahi ho bag lekar. Achi baat hai, sabko apna kaam pure mann aur mehnat se karna chahiye. Lo, station aa gaya. Dhyan se jana beta.”</p>
<p>I gave him the cash and went to catch the local on my way back.</p>
<p>As I sat on the local train, a feeling of warmth and comfort washed over me. It was a day filled with small yet significant moments: the train rides, the silent reading session, and the taxi driver’s kind words.</p>
<p>Maybe sometimes, all it takes is stepping out and letting these paths, both known and unknown, remind us of our potential. The familiar ones show us how far we've come, while the unfamiliar ones push us to recognize the untapped strength and possibilities within us. Growth often lies in the space between comfort and challenge, and that Sunday was a perfect reminder.</p>
]]></content:encoded></item><item><title><![CDATA[Happy Teacher's Day]]></title><description><![CDATA[Happy Teachers' Day to all the amazing teachers out there!
Growing up, becoming a teacher was probably my dream profession. I was fortunate enough to have crossed paths with some truly remarkable teachers and mentors. Watching them, I always felt tha...]]></description><link>https://blog.shlokashah.com/happy-teachers-day</link><guid isPermaLink="true">https://blog.shlokashah.com/happy-teachers-day</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 08 Sep 2024 12:42:38 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://media.assettype.com/bloombergquint%2F2023-09%2F7258b9d2-4596-4443-a75b-43bb93e41d22%2F2814182_1_.jpg?auto=format%2Ccompress&amp;w=1728" alt="&lt;div class=&quot;paragraphs&quot;&gt;&lt;p&gt;Source: Representative/Freepik&lt;/p&gt;&lt;/div&gt;" /></p>
<p><strong>Happy Teachers' Day to all the amazing teachers out there!</strong></p>
<p>Growing up, becoming a teacher was probably my dream profession. I was fortunate enough to have crossed paths with some truly remarkable teachers and mentors. Watching them, I always felt that teaching was such a powerful profession – one where you could inspire and influence so many lives around you. It wasn't just about academics, but about shaping perspectives and instilling values that would last a lifetime.</p>
<p>As school came to an end and I entered new phases of life, I made a promise to myself: every year, on Guru Purnima and Teachers' Day, I would message my teachers/mentors. It was my way of expressing gratitude for all the knowledge, wisdom, and guidance they had shared with me. It became a small, personal tradition that allowed me to keep in touch with those who had profoundly impacted my journey.</p>
<p>Some of my incredible teachers/mentors:</p>
<ul>
<li><p><strong>My parents</strong> – The first teachers, who taught me the foundation of anything &amp; everything I know today. My mom was the one who introduced me to the world of coding when she showed me the first project she built using COBOL while my dad taught me how to stay calm in stressful situations.</p>
</li>
<li><p><strong>Akbar Sir</strong> – He was my tuition teacher in 9th and 10th standard. As someone terrified of geometry in school, he was the one who made it fun for me. He taught how any difficult problem can become a piece of cake if broken down into small simple tasks.</p>
</li>
<li><p><strong>Manjula Miss</strong> – She was my Computer teacher back in school. When I took Computer Applications as my optional subject in 9th standard and began to learn coding, she was the one who made computer lab sessions even more fun.</p>
</li>
<li><p><strong>Bala Miss</strong> – She was my History teacher back in school. She had a rule where she wanted all the students to carry their textbooks every Thursday and if you failed to do so, you would be punished. I always admired her for the punctuality and discipline she instilled in all of us.</p>
</li>
<li><p><strong>Rachna Bahl</strong> – She was the first Software Engineer I ever knew who used to stay in my building and the one who became my go-to person for all the doubts I had about engineering, coding &amp; career paths. I remember when I was building a hotel management system in Java back for the board's project, she always encouraged me to be curious by answering all my questions, showing that curiosity is the path to lifelong learning.</p>
</li>
<li><p><strong>Winit Sir</strong> – He was my Mathematics teacher in 11-12th Standard and the one who made maths my favorite subject. He always had a solution to all the problems I had.</p>
</li>
<li><p><strong>Babu Sir</strong> – He was one of the most senior teachers I ever had. He used to teach Integration and Differentiation back in 11-12th in the most interesting way. I have never seen him be late even for a 7 AM class. He taught that when you are truly passionate about something, you put your heart &amp; soul into it, for him, it was Teaching.</p>
</li>
<li><p><strong>Hari</strong> – He is my mentor now at HackerRank and has taught me so much, not just about engineering but so much more in general. Whether it is about building scalable systems, code quality, problem-solving, or remaining calm in stressful situations, the list goes on.</p>
</li>
</ul>
<p>Each of them played a pivotal role in shaping who I am today, not just as a professional, but as a person. Teaching, in its essence, is about more than passing on knowledge; it’s about touching lives and sparking inspiration. Every one of these teachers/mentors did just that for me, and for that, I am forever grateful.</p>
<p>To anyone reading this, take a moment to reach out to your teachers today. A simple "thank you" can mean the world to someone who has helped shape your life, even if it was many years ago.</p>
<p>After all, a teacher's influence extends far beyond the classroom – it stays with you forever.</p>
]]></content:encoded></item><item><title><![CDATA[3 years as a Software Engineer]]></title><description><![CDATA[I have been drafting bits and pieces of this blog for around 6 months, finally putting everything together.
I recently completed 3 years working as a Software Engineer at HackerRank; it has been an amazing journey filled with learnings, growth, chall...]]></description><link>https://blog.shlokashah.com/3-years-as-a-software-engineer</link><guid isPermaLink="true">https://blog.shlokashah.com/3-years-as-a-software-engineer</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 09 Jun 2024 10:10:36 GMT</pubDate><content:encoded><![CDATA[<p><em>I have been drafting bits and pieces of this blog for around 6 months, finally putting everything together.</em></p>
<p>I recently completed 3 years working as a Software Engineer at HackerRank; it has been an amazing journey filled with learnings, growth, challenges, and a lot of coding!</p>
<hr />
<h3 id="heading-the-beginning">The Beginning</h3>
<p>It all began in September 2020, when I stumbled upon a LinkedIn post announcing that HackerRank was hiring SDE interns. With a mix of excitement and curiosity, I applied, hoping to try my luck.</p>
<p>A week later, I received a message from <a target="_blank" href="https://www.linkedin.com/in/vaasavi-suncol/">Vaasavi</a>, inviting me to schedule my first interview with <a target="_blank" href="https://www.linkedin.com/in/anilgulecha/">Anil</a>.</p>
<p>As a regular user of HackerRank Community for practicing coding challenges and preparing for job searches, I was already fascinated by the platform. I often wondered about the code and the scale behind the scenes that powered such a large community of millions of developers.</p>
<p>In preparation for my interview, I delved deeper into the company’s origins and came across their <a target="_blank" href="https://www.hackerrank.com/about-us/">Humble Beginnings</a> which inspired me (it still does) and solidified my desire to be a part of this team.</p>
<hr />
<h3 id="heading-the-interview-experience">The Interview Experience</h3>
<p>Excitement and nerves blended as the interview day arrived. My initial interview lasted 25 minutes, and shortly after an hour, Vaasavi contacted me again. This time, it was to schedule another interview, but with <a target="_blank" href="https://www.linkedin.com/in/sp2hari/">Hari</a>, the CTO himself. I was both thrilled and apprehensive at the opportunity to interact directly with him. The next day, I was dressed up in formals, waiting for the Zoom link to be shared. As the interview time came closer and I didn't receive a link, my panic started but that is when my phone rang, and on the other side was Hari, ready to take my interview over a phone call.</p>
<p>And with this email began the journey with HackerRank</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1717920147661/4f243455-6296-4325-9c65-c821adfd87ca.png" alt class="image--center mx-auto" /></p>
<hr />
<h3 id="heading-the-journey">The Journey</h3>
<p>From that email to today, obviously, a lot has happened. Landed my first job, transitioned into a full-time role, worked on building Hexagon. Visited Bangalore for the first time to meet the entire team, paused Hexagon, got promoted to SDE II. We formed the Labs Team, spearheading new product development from scratch.</p>
<p>Learned something new every day, worked on the HackerRank Community, broke the entire Community in production, relocated to Bangalore, and eventually, worked from the office with the entire team. Fast forward to today, being a Senior Software Engineer.</p>
<p>Reflecting on these, life seems to have come full circle. From being captivated by how HackerRank Community worked behind the scenes to becoming a part of the team that builds and maintains it, a team that pushes me to become a better version of myself every day.</p>
<p>I could keep writing about each of the phases in the journey in detail, but here’s what I’ve learned so far:</p>
<ul>
<li><p><strong>Software engineering is so much more than just coding</strong>. It’s about understanding the user’s problems, imagining yourself in their place, and creating solutions. It also involves thinking about how different parts of the system will work together, how it will grow, and how easy it will be to maintain.</p>
</li>
<li><p><strong>Being able to debug code is important, but often overlooked</strong>. When you write code, consider how it will run and how it might break. Think about how you’ll fix it when it’s live. Make sure to leave trails in your code to trace what happened, store data in easy-to-read formats, and invest in good tools for managing and fixing issues.</p>
</li>
<li><p><strong>Take responsibility for the systems you work on, not just your code</strong>. Act like you’re personally in charge of the entire system’s success, from start to finish.</p>
</li>
<li><p><strong>Be consistent</strong>. You don’t need to be an expert at everything right away. You’ll get better by doing things over and over. The first time you try something, you might make mistakes. But next time, you’ll know what to do and what to avoid. Your brain will naturally get better at it.</p>
</li>
<li><p><strong>Every decision in software development involves trade-offs</strong>, whether it's choosing between different technologies, balancing speed with quality, or allocating time between competing tasks. You need to understand what needs to be prioritized first and move forward.</p>
</li>
<li><p><strong>You can do so much more than you think</strong>. Just trust yourself, love your work, show up every day, and give it your 100%.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Savandurga Trek]]></title><description><![CDATA[I did something yesterday, which I never thought I would do. I did the Savandurga Trek. I had heard a lot about this trek being the most difficult one in Bangalore and I had made up my mind that I never would finish this.
To give some context, I am b...]]></description><link>https://blog.shlokashah.com/savandurga-trek</link><guid isPermaLink="true">https://blog.shlokashah.com/savandurga-trek</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 14 Apr 2024 11:20:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1713093314132/87e197b6-f7a8-43e4-baa2-78fb73793d19.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I did something yesterday, which I never thought I would do. I did the <a target="_blank" href="https://indiahikes.com/documented-trek/savandurga-trek">Savandurga Trek</a>. I had heard a lot about this trek being the most difficult one in Bangalore and I had made up my mind that I never would finish this.</p>
<p>To give some context, I am bad at hikes, like terrible. I don't know how to describe it, but I am slow, I need time to motivate myself in every step I take when I am hiking.</p>
<p>I never told this to anyone but I love mountains and there is a part of me that loves this entire concept of climbing mountains, soaking in the beauty of nature, and reaching the peak. But then comes this other side that I think for a long time has been dominating, the one where I constantly feel that I can't do it because maybe I am not physically fit or because I am slow when it comes to climbing mountains or the leg pain that happened to me 2 years back will be back again.</p>
<p>The same story happened this time as well. I agreed to join the trek with my team but one day before I started doubting the yes.</p>
<p>Anyway, I joined for the trek &amp; there we were on the bus at 4 in the morning starting our journey to Savandurga. I was sleeping throughout the journey &amp; didn't think about the hike.</p>
<p>As soon as we reached &amp; got off the bus, I saw the mountain, my first reaction was <em>How the hell am I going to climb this?Is there a way I can run from here?</em> But none of this was an option &amp; I started mentally preparing myself for the long journey ahead.</p>
<p>10 minutes into the hike &amp; I had given up. I was like, I am sitting here and asked the rest of the folks to continue. Hari stayed back with me, &amp; we slowly started our journey to the peak with enough breaks in between. As we were climbing up, I was blown away by the view. There was a feeling of calmness and gratefulness in being able to witness the view.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713092946383/c15b1a2d-884b-452c-b927-4c19a8a36062.jpeg" alt class="image--center mx-auto" /></p>
<p>There were enough places in between where I had given up but thanks to the constant motivation and encouragement from Hari I somehow reached the Fort Wall. I had no plans on going to the peak and was done.</p>
<p>By this time, the rest of the folks had visited the peak &amp; were on their way back to the Fort Wall. When they reached there, Sivanesh mentioned the peak was only 15 minutes from the Fort Wall &amp; which motivated me, I have this moment, right now, and I have to make the most of it. I don't know if I will ever visit Savandurga again &amp; wanted to prove to myself that I can do it and not go back home with the self-doubt and regret of not finishing it.</p>
<p>I mentally prepared myself &amp; thus began the journey to the peak. It took me more than 15 minutes to reach the peak but when I reached there, it was the best feeling ever. Suddenly all the self-doubt that had been cropping up slowly vanished.</p>
<p>As I sat at the peak, slowly soaking in the view, I realized that sometimes, the things that scare us the most are probably the things that we need to do the most. All the things that I have been worried or scared about felt so small in front of the mountains.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713093242942/f8d0ba44-e662-4304-8a4e-4c6301a4c975.jpeg" alt class="image--center mx-auto" /></p>
<p>Soon, we started our descent, and as a gift for completing the hike, Karthik plucked these flowers from the tree.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1713092720937/a320ffb6-564b-4e7f-a013-b73e5e240018.jpeg" alt class="image--center mx-auto" /></p>
<p>As we started our descent, I couldn't stop thinking about how at the very same points during the ascent I was under doubt on whether I would ever finish it or not.</p>
<p>This was my fourth hike, but Savandurga is so far my favorite one.</p>
<p>I never thought I would say this, but for some reason, I can't wait to do my next hike. I know there is still a lot of effort I need to put in to prepare myself but I am looking forward to the next one.</p>
<p><em>PS: Once again, thanks to Hari, Karthik, Sivanesh, Akshay, and everyone for being patient with me &amp; helping me finish the hike.</em></p>
]]></content:encoded></item><item><title><![CDATA[Food & Memories]]></title><description><![CDATA[I think I have always been someone who got excited about food, looking to try new cuisine, and was happiest in making others try it as well & I have realized that there are so many memories attached to food.
Maybe it happens to all of us.
Whether it ...]]></description><link>https://blog.shlokashah.com/food-memories</link><guid isPermaLink="true">https://blog.shlokashah.com/food-memories</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Tue, 09 Apr 2024 08:45:28 GMT</pubDate><content:encoded><![CDATA[<p>I think I have always been someone who got excited about food, looking to try new cuisine, and was happiest in making others try it as well &amp; I have realized that there are so many memories attached to food.</p>
<p>Maybe it happens to all of us.</p>
<p>Whether it is the two rupees Pepsi cola that we used to get outside of our school &amp; you need to rush to the store, get the cola &amp; make sure you don't miss the school bus back home. I don't know where we get that Pepsi cola anymore, but maybe someday if I do, it will transport me back in time to the shop in the corner, just next to my school.</p>
<p>Eagerly waiting for the lunch break in school so that you could make your best friend eat her favorite Dhoklas. As I think about it, it is funny how I met some of my closest friends back in school over our shared love for Dhokla, Corn Cutlet &amp; Neer Dosa.</p>
<p>As the summer season starts I miss the feeling of waiting for the Ice Gola Uncle who used to come outside my building at 7 in the evening. We used to rush from our houses/playgrounds to ensure we didn't miss him. That uncle has stopped coming now to sell gola, but every time I pass by the road, there is hope that maybe someday I will see him again &amp; the kid who used to get excited about buying gola will be back.</p>
<p>Buying yourself your favorite ice cream from Apsara every time you felt proud of accomplishing something or just wanted to cheer yourself up.</p>
<p>Whether it is the festivals like Holi &amp; Diwali where I always look forward to having my favorite Moong dal Halwa &amp; Kanji vada or helping in making the festive snacks at home or the long bus rides back in Rajasthan during the winter season where we used to buy roasted peanuts just before the journey &amp; have them along the way or having your favorite food during exams to make sure you can focus on studies, all of them have a memory attached to it.</p>
<p>On my way back home from college, there was a Bangalore Iyengar Bakery where every morning &amp; evening they used to bake Rava cakes. The smell used to be so good that I didn't realize when but slowly it became a ritual to go there. Now every time I eat rava cakes it reminds me of that moment.</p>
<p>From trying out food at the fanciest places to having the perfect ginger tea in a tea stall (or Cutting Chai as it is popularly called), to having the Ghee podi Idli at IDC to the pav bhaji at a midnight stall in Mumbai, the list goes on &amp; on.</p>
<p>These memories are a treasure trove, and they continue to grow. Maybe someday, I'll find that two-rupee Pepsi again, or the Ice Gola uncle will return with his cart. Perhaps I'll even recreate my favorite childhood snacks holding on to the traditions and creating new memories. The journey of food exploration is a lifelong adventure, and I can't wait to see where my taste buds take me next, with a heart full of warm nostalgia for the delicious experiences that came before.</p>
]]></content:encoded></item><item><title><![CDATA[Behind the Scenes of a Talk]]></title><description><![CDATA[I've been thinking about this for a while now. It just hit me that a whole year has passed since I gave my first tech talk. In the past year, I got to speak at some of my dream events and meet some really amazing people.
But you know, there are some ...]]></description><link>https://blog.shlokashah.com/behind-the-scenes-of-a-talk</link><guid isPermaLink="true">https://blog.shlokashah.com/behind-the-scenes-of-a-talk</guid><category><![CDATA[#techtalks]]></category><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Thu, 18 Jan 2024 16:13:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/LETdkk7wHQk/upload/1ec74207be29b359d4e8ab38dc025658.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been thinking about this for a while now. It just hit me that a whole year has passed since I gave my first tech talk. In the past year, I got to speak at some of my dream events and meet some really amazing people.</p>
<p>But you know, there are some things about giving talks that not many people talk about. I'm not sure if it's just me feeling this way or if others go through it too.</p>
<p>Think of it like a coin – there are two sides to preparing for tech talks.</p>
<hr />
<h3 id="heading-the-bright-side"><strong>The Bright Side</strong></h3>
<h4 id="heading-feeling-proud">Feeling Proud</h4>
<p>Giving tech talks makes you feel proud. When you take complicated ideas and break them down into simple bits that people can understand, it's like winning a challenge. You're not just sharing what you know or giving back to the community; you're proving to yourself that you can overcome tough things. This makes you more confident and helps you grow personally.</p>
<h4 id="heading-making-connections">Making Connections</h4>
<p>One of the coolest things about tech talks is meeting awesome people. It's not just about standing on stage alone; it's about creating a community. The friendships you build during these talks go beyond job titles and company names. Networking is more than just a fancy word; it's like having a group of friends who support you.</p>
<hr />
<h3 id="heading-the-shadow"><strong>The Shadow</strong></h3>
<h4 id="heading-feeling-the-pressure">Feeling the Pressure</h4>
<p>Behind those fancy slides and well-spoken speeches, there's a hidden challenge. Speakers often feel a lot of pressure. The fear of talking in front of people and the expectation to be perfect, tailoring it to the audience to make sure everyone gets the most value out of the content can be really tough on the mind.</p>
<h4 id="heading-doubting-yourself">Doubting Yourself</h4>
<p>Ever heard of imposter syndrome? It's that feeling of not being good enough, and it can bother even the smartest folks. The more people notice your tech talk, the more imposter syndrome might sneak in and make you doubt yourself.</p>
<hr />
<p>In simple terms, giving tech talks is like a rollercoaster ride. There are highs where you feel proud and connected, and there are lows where you feel the pressure and doubt. It's a mixed bag, and I wonder if others feel this rollercoaster too.</p>
<p>In conclusion, despite the challenges that come with giving tech talks, I've found the experience to be incredibly rewarding. Each presentation has not only allowed me to share knowledge but has also revealed a new version of myself.</p>
<p>To anyone who reads this &amp; plans on taking a first step towards giving their tech talk, remember that behind a perfectly delivered talk that you have witnessed is a speaker who was equally nervous at some point.</p>
<p>So, to those considering taking the stage, relish the opportunity to discover and present the ever-evolving you—one talk at a time.</p>
]]></content:encoded></item><item><title><![CDATA[Engineers & OnCall]]></title><description><![CDATA[Last month when I was back at my hometown & on-call simultaneously, I got an alert from OpsGenie at 4:30 am. The alert was loud enough to wake everyone up. Everyone was curious about who was calling this early so I explained to them that it was a bug...]]></description><link>https://blog.shlokashah.com/engineers-oncall</link><guid isPermaLink="true">https://blog.shlokashah.com/engineers-oncall</guid><category><![CDATA[oncall]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Mon, 04 Dec 2023 17:18:43 GMT</pubDate><content:encoded><![CDATA[<p>Last month when I was back at my hometown &amp; on-call simultaneously, I got an alert from OpsGenie at 4:30 am. The alert was loud enough to wake everyone up. Everyone was curious about who was calling this early so I explained to them that it was a bug in my code alerting me. The immediate question was why an error in the code had to give me a call when it was occurring.</p>
<p>Now to explain it, the simplest analogy I could think of was of a fire-fighter. Similar to how when a fire happens, the fire alarm alerts the fireman, similarly in the case of software engineering, the bug is the fire, the call is the fire alarm &amp; I am the firefighter.</p>
<p>In recent months, I have been trying to set up the on-call process in my team &amp; this blog post, we will be breaking down and understanding what the on-call process looks like and what are some of the things to keep in mind when setting up the process.</p>
<p>Firstly, let's understand why a developer needs to be on-call. This is something I read about the practice that is followed at PagerDuty, <strong>"you build it, you own it"</strong>. Since developers usually want the flexibility to deploy to production whenever they want, they being the subject matter experts on the code, should be the ones taking ownership of any alerts. It's a practice that is followed where SREs/DevOps Engineers are usually responsible for the infrastructure (hardware, databases) while the Developers are responsible for everything built on top of it. This responsibility division is usually followed in most of the organizations but may vary depending on the team size &amp; the organization structure.</p>
<p>Now that we have understood why a developer needs to be on-call, let's break down the on-call process.</p>
<h3 id="heading-setting-up-alerts">Setting up Alerts</h3>
<p>This is the most essential step in starting your on-call process. The main goal of this step is to identify the most crucial services, which if down, can disrupt the user experience or indicate some fault in the infrastructure which may not be impacting the user directly but has some indirect effect on the overall functioning of the product. One of the important things to keep in mind is to avoid alert fatigue i.e. making sure the alerts are fewer by removing unactionable/unwanted alerts. This is something that gets better over time by experimentation. One of the ways to check if the experimentation is working or not is to see the trend of alerts over time.</p>
<p>Multiple apps might be used like New Relic, Sentry, and HoneyBadger but it is always recommended to redirect all the alerts from different platforms to one alert management tool (OpsGenie/PagerDuty).</p>
<h3 id="heading-setting-up-the-oncall-schedule">Setting up the OnCall Schedule</h3>
<p>When it comes to on-call schedules, there's no one-size-fits-all. The schedule varies from team to team. For teams that are spread across geographies, teams usually adhere to a <em>follow-the-sun</em> process where people have to be on call only during the day &amp; as the day sets, team members from the other end of the geography take charge of on-call. In cases where the team is in the same geography, the team members are on-call for both day &amp; night but might vary from team to team.</p>
<p>One of the things to note is to encourage people on-call to swap their schedules with other teammates if they are available in case of emergency/travel plans so that they can try to maintain their regular schedule as much as possible. When doing so it is important to update the alert management system to make sure all alerts are redirected to the right person.</p>
<p><em>Remember, that on-call can sometimes be tiring for the engineer &amp; hence it is recommended to relax or swap hours in between.</em></p>
<h3 id="heading-escalation-policy">Escalation Policy</h3>
<p>There are times when the on-call engineer might not be able to acknowledge an alert due to various reasons like being AFK, or internet issues. In such cases, having an escalation policy helps.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1701708861746/f28e0d11-fa7a-4796-8084-4ea50868c426.png" alt class="image--center mx-auto" /></p>
<p>This is what a sample escalation policy looks like. At the 0th Minute, that is when the alert occurs, the on-call engineer is notified. If the alert stays unacknowledged till the 4th minute after the alert occurred, the next on-call engineer will be alerted, and so on.</p>
<p>The escalation policy can again be modified from team to team based on the requirements.</p>
<p>Now that we have understood how to set the on-call process, let's understand the process during an outage.</p>
<h3 id="heading-during-an-outage">During an Outage</h3>
<p><strong>When the Alarm Rings: The Act of Acknowledgment and Assessment</strong></p>
<p>At the heart of on-call, acknowledging an alert is the first move. The on-call engineer becomes the first responder, swiftly assessing the severity and impact of the alert. The key here is to stay calm. It is recommended to document the severity criteria (P0 - entire site down, P1 - some parts not functioning) so that the on-call engineer can map the alert to severity &amp; respond. This is called Triaging.</p>
<p><strong>Inform and Mobilize: The Symphony of Stakeholder Communication</strong></p>
<p>With the facts in hand, it's time to inform the right stakeholders. Communication is key, and orchestrating it effectively ensures everyone is on the same page. This usually involves keeping the customer-facing &amp; engineering teams in the loop with the progress of the outage. Try keeping the appropriate channels of communication updated. It can also be in the form of JIRA tickets with relevant data, graphs, and CLI outputs.</p>
<p><strong>Seeking a Lifeline: Collaboration in War Rooms</strong></p>
<p>For complex issues, enter the war room—a collaborative space where different engineers unite to tackle the problem head-on. Seeking help is not a sign of weakness but a strategic move towards resolution. This also involves getting direction on the outage from the subject matter experts.</p>
<p><strong>Mitigate, Don't Muddle: The Art of Temporary Fixes</strong></p>
<p>In the heat of the moment, the goal is clear: mitigate the damage and restore functionality. Avoid fixing what's in production; instead, return to the last known stable state. Remember to never fix code when an outage is going on.</p>
<p><strong>Root Cause Quest: Don't Dilly-Dally, But Don't Rush</strong></p>
<p>Once the mitigation is done, follow the structured approach that involves finding the root cause first, fixing it to the core &amp; ensuring a more stable foundation for the future.</p>
<p><strong>Testing, Deployment, and the Healing Process</strong></p>
<p>Don't bypass testing and deployment practices in the aftermath. Learn from the incident, implement preventive measures, and fortify your defenses against future disruptions.</p>
<p><strong>Closing the Curtains on Chaos: When the Root Cause is Resolved</strong></p>
<p>An outage can be considered resolved when all the alerts are back to normal &amp; we see that the product is behaving expectedly for all the customers. It is important to note that an outage is considered resolved not after mitigation but once the permanent fix is in production.</p>
<p><strong>The Post-Incident Analysis: A Blameless Review</strong></p>
<p>As a last step, it's time for Root Cause Analysis (RCA) with a blameless mindset. Answer the quintessential who, what, where, when, and why to extract meaningful insights. It is in this step that we can document what went good/bad &amp; what can be improved further with the next steps.</p>
<h3 id="heading-metrics-to-look-at">Metrics to look at</h3>
<p>Now that we know how to respond to an alert, some of the metrics that can help us understand how the on-call process metrics of the team are</p>
<p><strong><em>MTTA (mean time to acknowledge)</em></strong> <em>is the average time it takes from when an alert is triggered to when work begins on the issue. This metric is useful for tracking your team’s responsiveness and your alert system’s effectiveness.</em></p>
<p><strong><em>MTTR (mean time to resolve)</em></strong> <em>is the average time it takes to fully resolve a failure. This includes not only the time spent detecting the failure, diagnosing the problem, and repairing the issue but also the time spent ensuring that the failure won’t happen again.</em></p>
<p>I hope this article helps you in understanding the on-call process better.</p>
]]></content:encoded></item><item><title><![CDATA[Code Review: A Developer's Guide]]></title><description><![CDATA[Code reviews are an integral part of a developer's daily routine, ensuring the quality, correctness, and maintainability of the codebase. Whether you are requesting a review or providing one, adhering to best practices can significantly enhance the c...]]></description><link>https://blog.shlokashah.com/code-review-a-developers-guide</link><guid isPermaLink="true">https://blog.shlokashah.com/code-review-a-developers-guide</guid><category><![CDATA[code review]]></category><category><![CDATA[software development]]></category><category><![CDATA[engineering]]></category><category><![CDATA[best practices]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Mon, 06 Nov 2023 03:12:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1699240209843/6e93498a-4927-469b-aa8c-2d8c5d44fa8e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Code reviews are an integral part of a developer's daily routine, ensuring the quality, correctness, and maintainability of the codebase. Whether you are requesting a review or providing one, adhering to best practices can significantly enhance the code review process. In this blog, we will explore some of the practices that I have been following.</p>
<h2 id="heading-asking-for-a-review">Asking for a Review</h2>
<ol>
<li><p><strong>Ensure Github Actions Pass</strong>: Before assigning a Pull Request (PR) for review, it's crucial to ensure that all Github actions have passed successfully. This basic requirement helps confirm that the new code doesn't break existing functionality and saves reviewers time.</p>
</li>
<li><p><strong>Break Down the Code</strong>: For large Pull Requests, breaking down the code into multiple commits within the same PR can make the review process more manageable. This allows reviewers to focus on specific changes and understand them in isolation.</p>
</li>
<li><p><strong>Detailed PR Description</strong>: Provide a comprehensive PR description, explaining what the changes are, why they are necessary, and the testing plans. A well-documented PR description helps reviewers understand the context and purpose of the changes.</p>
</li>
</ol>
<h2 id="heading-giving-a-review">Giving a Review</h2>
<ol>
<li><p><strong>Gather Just Enough Context</strong>: In the initial review, focus on getting just enough context about the feature or issue without understanding the implementation from the author itself. This minimizes biases and increases the chances of identifying blind spots in the code.</p>
</li>
<li><p><strong>Review the Code in Steps</strong>: Start by reviewing the entire code to get a high-level understanding of the changes. Then, dive deeper into specific functions or segments to identify performance optimizations, decoupling of code, and large functions.</p>
</li>
<li><p><strong>Understand Testing &amp; Deployment Plans</strong>: Before giving your approval, it's good to understand the testing plans for the feature. Ensure that the code has been adequately tested, covering both functionality and edge cases. At times when there are changes in different repositories that are dependent on each other or there is a certain production script to be run before merging the code, it's good to have an understanding of the plan to push the code to production.</p>
</li>
<li><p><strong>Do a QA of the feature</strong>: Reviewing is more than just the code. Try testing the feature, validating the technical approach, and ensuring it meets product expectations.</p>
</li>
<li><p><strong>Maintain a Priority List</strong>: I usually maintain a list of the PRs &amp; the expected date of when the feature needs to go live. This helps me organize the reviews by priority. Next, when reviewing the code, understand which parts of the code are most critical and can lead to production issues. Those hot paths should be reviewed first. This approach helps ensure that the most important issues are addressed on priority.</p>
</li>
<li><p><strong>Avoid Context Switch</strong>: To maintain focus and ensure thorough review, avoid reviewing multiple different features together in a single session. Context switching can lead to confusion and overlook critical issues.</p>
</li>
<li><p><strong>Focus on Code Quality</strong>: Once the functionality is confirmed as correct, and any necessary performance optimizations are in place, comment on code quality. Address issues related to code structure, maintainability, and adherence to coding standards.</p>
</li>
<li><p><strong>Suggest, Don't Instruct</strong>: When making suggestions or pointing out issues, use a constructive and supportive tone. Instead of instructing with phrases like "You should stop doing," opt for more collaborative language like "I think it would be better to." Avoid blameful or aggravating language.</p>
</li>
</ol>
<p>As the reviewing engineer, remember that your approval is required before the code can be merged. This is a significant responsibility, as it ensures that the codebase remains robust and clean.</p>
]]></content:encoded></item><item><title><![CDATA[Ganesh Chaturthi: Emotion & Tradition]]></title><description><![CDATA[As I sit down scrolling through Instagram full of Ganesh Chaturthi videos from Mumbai, there is an entire wave of emotions that comes through and I can't help but miss Mumbai more. It's the first time ever that I will be away for the festival.
As I t...]]></description><link>https://blog.shlokashah.com/ganesh-chaturthi-emotion-tradition</link><guid isPermaLink="true">https://blog.shlokashah.com/ganesh-chaturthi-emotion-tradition</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 17 Sep 2023 16:51:03 GMT</pubDate><content:encoded><![CDATA[<p>As I sit down scrolling through Instagram full of Ganesh Chaturthi videos from Mumbai, there is an entire wave of emotions that comes through and I can't help but miss Mumbai more. It's the first time ever that I will be away for the festival.</p>
<p>As I think more about it, I realize the festival is more than just faith, it's an emotion.</p>
<p>Growing up, when I was in school, our final exams used to always start after Ganesh Chathurthi. That means you need to prepare for the first paper beforehand so that you can enjoy the festival. I remember we used to plan beforehand which day we would go for pandal hopping to visit all the various Ganesh Idols in our locality. The motivation to study used to be the excitement to go pandal hopping afterward or to stay up late so that you get to play Housie in the society and if you are lucky, win some prizes.</p>
<p>The other thing that made the festival so special was the chance to meet my old school friends. In my friend circle, if you don't meet throughout the year, it's fine but I need to visit my friend's place for Ganesh Chaturthi. For almost a decade now after school, it's been a ritual to visit my friends' place and catch up over a plate of modak—a sweet treat that, for us, symbolized the essence of the festival. I think it's these little things that made the festival even more special.</p>
<p>My society is in a well-connected area, which is the road where all the idols used to go from, before the festival and even during visarjan. That means you can hear all the songs and the festivities happening and the best part is getting to hear the Nasik Dhol and the aarti. The energy and fervor of the festival filled the air, making it a sensory delight.</p>
<p>One of the most anticipated moments used to be planning a night trip to Lalbagh, home to one of Mumbai's famous pandals. Sitting in a kaali-peeli taxi riding through the roads with an atmosphere that was electric, with artistic idols, dazzling decorations, and a palpable sense of devotion that left an indelible mark on me.</p>
<p>Ganesh Chaturthi is a reminder that amidst the chaos of everyday life, there is always room for devotion, love, and community. It's a tapestry of emotions, memories, and traditions woven together. It's a time to cherish the friendships that endure, the cultural richness that unites us, and the faith that sustains us.</p>
]]></content:encoded></item><item><title><![CDATA[The Joy of Stationery]]></title><description><![CDATA[There is something genuinely magical about the everyday pleasure of stationery in a world dominated by technology and digital advancements. For many people, stationery is more than just a set of tools; it's a way to express their personalities, a sou...]]></description><link>https://blog.shlokashah.com/the-joy-of-stationery</link><guid isPermaLink="true">https://blog.shlokashah.com/the-joy-of-stationery</guid><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 05 Aug 2023 04:25:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1691209386299/ef222d81-ca36-4031-a5bd-ea35c7f2f046.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There is something genuinely magical about the everyday pleasure of stationery in a world dominated by technology and digital advancements. For many people, stationery is more than just a set of tools; it's a way to express their personalities, a source of inspiration, and a doorway to a universe of limitless possibilities. I'll take you on a tour of my love for stationery in this blog and explain why these seemingly unremarkable items have come to hold a special place in my heart.</p>
<p>When I was a kid, I used to look forward to exam time because it gave me the justification I needed to go out and buy a new pen and all the stationery I wanted. The feel of the grip, the ease of the ink, and the elegance of the design all played a part in my decision when selecting the ideal pen; it became an art form. Each new pen I acquired served as both a tool and a companion, bearing witness to both my highs and lows. My favorite pens were Uniball ones. All of the pens I used in school are still safely stored.</p>
<p>Not only pens, but also board markers and diaries used to excite me, and they still do. I am happiest doing stationery shopping or when someone gifts me stationery.</p>
<p>Stationery, in my opinion, is a source of power. A pen has the ability to transform me into a person of authority, ready to conquer whatever comes my way. There's an undeniable allure to using a luxurious pen, whether it's during a meeting or simply in the solitude of journaling in my diary or creating my checklist. It's an elegant and sophisticated symbol that inspires me to embrace my thoughts and ideas. A pen provides an unparalleled sense of empowerment; it is more than just an instrument; it is an extension of myself. I recently purchased a set of ten different colored pens to make my note-taking more enjoyable. I carry it everywhere I go.</p>
<p>The same is true for whiteboards and markers. When I was in school and saw teachers writing on the whiteboard, I thought they were so powerful. By writing on the whiteboard, they had the power to transform the world. One of the reasons I wanted to be a teacher when I grew up was because of this. I got my first whiteboard in fourth or fifth grade where I used to solve maths problems. I still have a whiteboard which has now become my place to write checklists.</p>
<p>Every pen, marker, and diary serves as a link between my thoughts and the physical world. They motivate me to slow down and appreciate life's simple pleasures.</p>
<p>So, the next time you pass by a stationery store, stop for a moment and let the magic of stationery enchant you. With each pen stroke and page turn, you might discover a universe of enchantments waiting to be discovered—one colorful pen at a time.</p>
]]></content:encoded></item><item><title><![CDATA[Understanding Indexes in MySQL]]></title><description><![CDATA[Indexes are important as our Database grows in size. We can consider Indexes as Keys that will help us perform faster lookups of rows. In this blog, we will understand the different types of Index in MySQL, their use cases, various strategies to deci...]]></description><link>https://blog.shlokashah.com/understanding-indexes-in-mysql</link><guid isPermaLink="true">https://blog.shlokashah.com/understanding-indexes-in-mysql</guid><category><![CDATA[MySQL]]></category><category><![CDATA[Databases]]></category><category><![CDATA[indexing]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Mon, 03 Jul 2023 09:00:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688453900003/19816dac-8d7e-4f3a-a9d5-629048d19f15.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Indexes are important as our Database grows in size. We can consider Indexes as Keys that will help us perform faster lookups of rows. In this blog, we will understand the different types of Index in MySQL, their use cases, various strategies to decide the index for a table, and finally the benefits of having Indexes. So, let's get started.</p>
<hr />
<h1 id="heading-different-types-of-index">Different Types of Index</h1>
<h2 id="heading-b-tree-index">B-Tree Index</h2>
<p>This is the default type of Index in MySQL which is based on the B-Tree data structure.</p>
<p>The B-Tree index doesn't need a full table scan to find the desired data hence it speeds up the data access process. Similar to how a B-Tree works, in this index, the search starts from the root node and goes to the leaf node. Each node contains the minimum and maximum values for the child nodes. We find the right pointer by looking at these values and reaching the leaf node that has the pointer to the data needed. The depth of the B-Tree depends on how big our data is.</p>
<p><img src="https://www.cs.cornell.edu/courses/cs3110/2012sp/recitations/rec25-B-trees/images/B-trees.gif" alt="B-trees" class="image--center mx-auto" /></p>
<p>B-Tree stores the columns in an ordered manner which makes them useful for searching over a range of data, <code>ORDER BY</code> and <code>GROUP BY</code> operations.</p>
<p>B-Tree does a lookup from the leftmost indexed columns. Let's take an example to understand how adding a B-Tree Index will help us.</p>
<p>Consider the example of an Employee Database where we want to search for employees.</p>
<h3 id="heading-employee-table-schema">Employee Table Schema</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> EMPLOYEE (
    first_name <span class="hljs-built_in">varchar</span>(<span class="hljs-number">40</span>) <span class="hljs-keyword">not</span> <span class="hljs-literal">null</span>,
    last_name <span class="hljs-built_in">varchar</span>(<span class="hljs-number">40</span>) <span class="hljs-keyword">not</span> <span class="hljs-literal">null</span>,
    department <span class="hljs-built_in">varchar</span>(<span class="hljs-number">40</span>) <span class="hljs-keyword">not</span> <span class="hljs-literal">null</span>,
    joining_date <span class="hljs-built_in">date</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">null</span>
);
</code></pre>
<p>Consider the following data inserted in the table,</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>first_name</td><td>last_name</td><td>department</td><td>joining_date</td></tr>
</thead>
<tbody>
<tr>
<td>Jaxon</td><td>Armstrong</td><td>Engineering</td><td>2005-05-20</td></tr>
<tr>
<td>Donna</td><td>Mckee</td><td>Sales</td><td>2015-08-02</td></tr>
<tr>
<td>Donna</td><td>Walton</td><td>Finance</td><td>2005-01-10</td></tr>
<tr>
<td>Donna</td><td>Hardy</td><td>Engineering</td><td>2023-05-20</td></tr>
<tr>
<td>Donna</td><td>Benton</td><td>Product</td><td>2010-07-28</td></tr>
<tr>
<td>Donna</td><td>Sawyer</td><td>Sales</td><td>2005-03-29</td></tr>
<tr>
<td>Donna</td><td>Schaefer</td><td>Finance</td><td>2019-01-18</td></tr>
<tr>
<td>Donna</td><td>Bauer</td><td>Engineering</td><td>2020-09-14</td></tr>
<tr>
<td>Tomas</td><td>Pennington</td><td>Engineering</td><td>2019-05-20</td></tr>
</tbody>
</table>
</div><p>Now that we have the schema defined, let's try to search for some Employees in the table and understand how the indexes can be defined and used.</p>
<hr />
<h3 id="heading-single-column-index">Single Column Index</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> EMPLOYEE (
    <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span> first_name, 
    <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span> department, 
    <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span> joining_date
);
</code></pre>
<p><strong>Query 1:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE <span class="hljs-keyword">WHERE</span> first_name = <span class="hljs-string">'Donna'</span> <span class="hljs-keyword">and</span> department = <span class="hljs-string">'Engineering'</span>
<span class="hljs-comment">-- Uses the Index on first_name</span>
</code></pre>
<p>Even though there is an Index on the <code>department</code> column, we only use the index on <code>first_name</code> as the three individual indexes act as three separate tables.</p>
<p>Now when we run this query, MySQL will have to scan across 7 rows where the <code>first_name</code> is Donna, imagine the same scan across a huge table where around 1 million people have a similar name. Adding a single-column index won't help a lot.</p>
<hr />
<h3 id="heading-multi-column-index">Multi-Column Index:</h3>
<pre><code class="lang-sql"><span class="hljs-keyword">ALTER</span> <span class="hljs-keyword">TABLE</span> EMPLOYEE (
    <span class="hljs-keyword">ADD</span> <span class="hljs-keyword">INDEX</span> (department, first_name, joining_date)
);
</code></pre>
<p>The following table contains a composite index on <code>(department, first_name, joining_date)</code>.</p>
<p><strong>Query 1:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE <span class="hljs-keyword">WHERE</span> department = <span class="hljs-string">'Engineering'</span> <span class="hljs-keyword">AND</span> first_name = <span class="hljs-string">'Donna'</span>
<span class="hljs-comment">-- Uses the Index on (department, first_name)</span>
</code></pre>
<p>As compared to single column index, this will be faster as the number of rows to scan will get decreased by using the composite index on <code>(department, first_name)</code></p>
<p><strong>Query 2:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE <span class="hljs-keyword">WHERE</span> last_name = <span class="hljs-string">'Hardy'</span>
<span class="hljs-comment">-- Doesn't use any Index</span>
</code></pre>
<p><strong>Query 3:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE 
         <span class="hljs-keyword">WHERE</span> first_name = <span class="hljs-string">'Donna'</span> 
         <span class="hljs-keyword">AND</span> joining_date &gt; <span class="hljs-number">2010</span><span class="hljs-number">-07</span><span class="hljs-number">-28</span>
<span class="hljs-comment">-- Doesn't use any Index </span>
<span class="hljs-comment">-- since the lookup follows the leftmost side of indexed columns</span>
<span class="hljs-comment">-- we are not mentioning the department</span>
<span class="hljs-comment">-- hence composite index is of no use</span>
</code></pre>
<p><strong>Query 4:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE 
         <span class="hljs-keyword">WHERE</span> department = <span class="hljs-string">'Engineering'</span> 
         <span class="hljs-keyword">AND</span> first_name <span class="hljs-keyword">LIKE</span> <span class="hljs-string">'%S%'</span> 
         <span class="hljs-keyword">AND</span> joining_date = <span class="hljs-number">2010</span><span class="hljs-number">-07</span><span class="hljs-number">-28</span>
<span class="hljs-comment">-- Uses the Index on (department, first_name)</span>
<span class="hljs-comment">-- since for first_name we have a range query </span>
<span class="hljs-comment">-- it will only use first two columns of index</span>
</code></pre>
<p>In the case of using indexes for range queries, we should try using the range condition field last in the index. This is because after applying the range query there is no way for the B-Tree to apply the next filter, hence we should keep the range condition column at last.</p>
<p>For the Multi-column Indexes in this Table, we have index search capabilities on <code>(department)</code>, <code>(department, first_name)</code> and <code>(department, first_name, joining_date)</code></p>
<h3 id="heading-order-by">ORDER BY</h3>
<p>Consider the following query</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE <span class="hljs-keyword">WHERE</span> department = <span class="hljs-string">'Engineering'</span> <span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> last_name
</code></pre>
<p>This will use the <code>department</code> index to give us the records, and then perform a sort on the records to sort them by <code>last_name</code>. This is because we didn't have any index on <code>last_name</code> hence the records were not sorted by that column. This type of sort fetches the data in a temporary buffer before returning it (File Sort) which leads to extra computation.</p>
<p>This can be avoided by adding an index on <code>last_name</code>. The new composite index for us would be <code>(department, first_name, joining_date, last_name)</code></p>
<h3 id="heading-group-by">GROUP BY</h3>
<p>Proper Indexing also helps in GROUP BY operation.</p>
<p>Consider an example like</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE <span class="hljs-keyword">WHERE</span> department = <span class="hljs-string">'Engineering'</span> <span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span> first_name
</code></pre>
<p>The records would already be sorted <code>department</code> hence speeding up the filtering. After these results are returned they are also then sorted by <code>first_name</code> due to the second part of the index, and so they are already grouped for us. This won't require any other sorting hence making our query fast.</p>
<h3 id="heading-index-selectivity">Index Selectivity</h3>
<blockquote>
<p>Index selectivity is the ratio of a number of distinct indexed values(cardinality) to the total number of rows in the table(#T). The range for selectivity is from 1/#T to 1.</p>
</blockquote>
<p>An index is said to be highly selective if for each value we have fewer rows. Having a highly selective index is good as it filters out more rows when searching for query matches.</p>
<h3 id="heading-choosing-the-right-order">Choosing the Right Order</h3>
<p>Now that we have understood what Index Selectivity is, let's see how it helps in deciding the column order.</p>
<p>Consider the same Employee Table Schema with the multicolumn index on <code>(department, first_name, joining_date, last_name)</code> . This composite index will perform better than a single column on queries but let's check if this is the perfect column order for the given set of values in the Employee Table.</p>
<p>Firstly, let's check the Index Selectivity of each of the four columns,</p>
<ol>
<li><p><code>first_name</code>: 3/9 = 0.33</p>
</li>
<li><p><code>Department</code>: 4/9 = 0.44</p>
</li>
<li><p><code>last_name</code>: 9/9 = 1</p>
</li>
</ol>
<p>Since <code>joining_date</code> is a date field and we might want to do range queries on it, it is good to have it last in the order of index.</p>
<p>Based on the Selectivity, the ideal order looks like this <code>(last_name, department, first_name, joining_date)</code>.</p>
<p>If we see the Query Examples above the initial order we defined works well for us as we can use Indexes for most queries. Hence along with selectivity, the use case of the <code>WHERE</code> clause also matters.</p>
<p>In Conclusion, the Index order for the Multi-Column Index depends on:</p>
<ul>
<li><p><code>WHERE</code> conditions to effectively lookup data</p>
</li>
<li><p>Use of <code>ORDER BY</code> and <code>GROUP BY</code></p>
</li>
<li><p>Use of <code>Range</code> conditions in the query</p>
</li>
<li><p><code>Index Selectivity</code> when unsure about the column order</p>
</li>
<li><p>The columns we want to <code>SELECT</code> in the Query</p>
</li>
</ul>
<blockquote>
<p>It is important to note that the indexes shouldn't be optimized only for the WHERE clause but for the entire query.</p>
</blockquote>
<hr />
<h2 id="heading-hash-index">Hash Index</h2>
<p>Hash Indexes are used when we want to do exact lookups on every column in the table. Hash codes are generated for each row on the indexed columns. Since the original values are converted to short values based on the hash function, they are compact.</p>
<p>In the case of Hash Indexes, the index contains only pointers to the values rather than the entire values, hence MySQL uses the in-memory rows to fetch the values from the pointers.</p>
<p>Some of the drawbacks of Hash Indexes are</p>
<ol>
<li><p>Since we are generating Hash using a function, we can't use it for partial matching of values. Example: If we have an Index on (A, B), we can't use this Index in a query that only uses column A.</p>
</li>
<li><p>In case of two or more rows having the same values for a column, when generating the Hash Index, it will lead to a collision. In such a case, the engine will traverse all the row pointers and read the values for comparison to find the right value leading to extra computation.</p>
</li>
<li><p>Hash Indexes are not very useful for columns that have low selectivity since they will lead to hash collisions.</p>
</li>
<li><p>They can't be used for sorting because they don't store rows in a sorted fashion.</p>
</li>
</ol>
<h3 id="heading-adaptive-hash-index">Adaptive Hash Index</h3>
<p>In the InnoDB storage engine when the values are being used frequently it creates a hash index on top of the B-Tree Index which leads to faster lookups. This is known as adaptive hash indexes.</p>
<hr />
<h2 id="heading-other-types-of-indexes">Other Types of Indexes</h2>
<p>Some other available Index Types include the Spatial Index which is used for geometry and geography types and Full-text Indexes which split the text into words and make an index over the words and not the whole text. This works faster for text searches when looking for specific words.</p>
<hr />
<h2 id="heading-benefits-of-indexing">Benefits of Indexing</h2>
<p>The benefits of indexing are measured on the three-star system</p>
<ol>
<li><p><em>One Star</em> if the Index reduces the rows that we have to scan.</p>
</li>
<li><p><em>Two Star</em> if it improves performance by removing the overhead of sorting and temporary tables.</p>
</li>
<li><p><em>Three Star</em> if all the required columns for querying are a part of the index.</p>
</li>
</ol>
<hr />
<h2 id="heading-points-to-remember-while-indexing">Points to Remember while Indexing</h2>
<h3 id="heading-use-of-functions-in-queries">Use of Functions in Queries</h3>
<p>MySQL can use columns only if they are isolated in the query. We should avoid using functions in the WHERE clause.</p>
<p><strong>Bad Query:</strong></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> EMPLOYEE 
         <span class="hljs-keyword">WHERE</span> department = <span class="hljs-string">'Engineering'</span> 
         <span class="hljs-keyword">AND</span> <span class="hljs-keyword">YEAR</span>(joining_date) = <span class="hljs-number">2010</span>
</code></pre>
<p>The above query will only use the index <code>department</code> even though an index is present on <code>joining_date</code>. This is because we have enclosed <code>joining_date</code> within a function.</p>
<h3 id="heading-index-merge">Index Merge</h3>
<p>In the case of multiple single-column indexes, MySQL sometimes uses multiple indexes by performing Index Merge. But it is not efficient since in the case of OR conditions, operations like sorting, grouping can utilize a lot of resources. In the case of AND conditions, it makes more sense to use a multicolumn index over multiple single-column indexes.</p>
<h3 id="heading-other-things-to-note">Other Things to Note</h3>
<ol>
<li><p>Indexes are implemented at the storage engine level and not the server level, hence differs from engine to engine.</p>
</li>
<li><p>Even though we use an ORM, we can't rely on it for indexing as they usually generate queries that satisfy the underlying logic.</p>
</li>
<li><p>Indexes come with drawbacks as well. There is a performance impact on <code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code> operations. Every time we perform a write on a table, the indexes have to be maintained. Hence, it's important to choose Index wisely.</p>
</li>
<li><p>Always Test the indexes on the queries the application is performing by measuring the response time.</p>
</li>
<li><p>Using the <code>EXPLAIN</code> statement to understand how the query is executing and reveal why it is slow. Explain statement shows values such as the indexes used, order used for joining the table, rows accessed, use of Filesort or not, and a temporary table used or not.</p>
</li>
</ol>
<hr />
<p>I hope this article helps you in starting to use Indexes in your MySQL Databases.</p>
]]></content:encoded></item><item><title><![CDATA[Decoding Web Scraping with Python]]></title><description><![CDATA[Web scraping has become an important technique for extracting valuable information from websites. With the growing need for data-driven insights, web scraping provides a powerful means to gather data from various sources on the internet.
In this blog...]]></description><link>https://blog.shlokashah.com/decoding-web-scraping-with-python</link><guid isPermaLink="true">https://blog.shlokashah.com/decoding-web-scraping-with-python</guid><category><![CDATA[web scraping]]></category><category><![CDATA[web crawling]]></category><category><![CDATA[Python]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 28 May 2023 16:55:45 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1685293026650/00c4dbd6-573b-4408-a01f-d26d42afb9cf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Web scraping has become an important technique for extracting valuable information from websites. With the growing need for data-driven insights, web scraping provides a powerful means to gather data from various sources on the internet.</p>
<p>In this blog post, we will delve into the world of web scraping with Python, exploring its definition, differences from web crawling, traditional methods, implementation with Python, how can the data be utilized, importance, and ethical considerations.</p>
<h3 id="heading-what-is-web-scraping">What is Web Scraping?</h3>
<p>Web scraping refers to the automated extraction of data from websites. It involves parsing the HTML structure of web pages, extracting specific data elements, and storing them in a desired format, such as a csv or database. By automating the retrieval of data, web scraping saves time and effort compared to manual data collection.</p>
<h3 id="heading-web-scraping-vs-web-crawling">Web Scraping Vs Web Crawling</h3>
<p>Although the terms web scraping and web crawling are frequently used interchangeably, they are not the same thing.</p>
<p>Web scraping typically involves extracting specific data from targeted web pages, whereas web crawling entails traversing the web systematically in order to index or analyse web content.</p>
<p>A web crawler starts with a seed, which is a list of URLs to visit. The crawler finds links in the HTML for each URL, filters those links based on specific criteria, and then passes those links to a scraper so that the desired information can be extracted from them.</p>
<p>Web scraping is a subset of web crawling that serves more specific purposes such as obtaining product information, obtaining customer reviews, or gathering news articles.</p>
<h3 id="heading-traditional-methods-of-web-scraping">Traditional Methods of Web Scraping</h3>
<p>Before the libraries with Python came into picture, the go to methods to get data from the internet included:</p>
<ol>
<li><p><strong><em>Regular Expressions:</em></strong> To extract data from structured HTML documents, regular expressions were commonly used. We could use regex syntax to define patterns that would match specific data elements within the HTML source code. Regex-based scraping, while powerful, was limited to cases where the HTML structure was predictable and consistent. Handling complex or nested structures with regular expressions can be difficult and error-prone.</p>
</li>
<li><p><strong><em>Manual Copying and Pasting:</em></strong> Manually copying and pasting data from websites into a local file or spreadsheet was one of the earliest and simplest methods of web scraping. This method worked well for scraping small amounts of data, but it became inefficient and time-consuming for larger-scale scraping tasks.</p>
</li>
</ol>
<p>These traditional methods had drawbacks. They worked best with static websites with simple HTML structures and struggled with dynamic or JavaScript-rendered content. Furthermore, these methods were less scalable and necessitated a significant amount of manual labour, making them inefficient for large-scale data extraction tasks.</p>
<h3 id="heading-web-scraping-with-python">Web Scraping with Python</h3>
<p>Some widely used Python libraries for web scraping include BeautifulSoup, Scrapy, Selenium &amp; Extruct.</p>
<hr />
<p><strong>BeautifulSoup</strong></p>
<p>BeautifulSoup is used for parsing HTML and XML documents. Beautiful doesn't directly interact with the server of the url we are trying to scrape. We need to use libraries like <code>request</code> to get the response data from the url. Once that is done, we can use parser like <code>html.parser</code> or <code>lxml's parser</code> to get the HTML content. Once we have the HTML content, we can fetch the required data.</p>
<p>We can use Beautiful when we need to extract data from a single webpage or webpages of the same HTML structure which don't require complex navigation. <em>One drawback with BeautifulSoup is, it works only for static web pages.</em></p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> bs4 <span class="hljs-keyword">import</span> BeautifulSoup

url = <span class="hljs-string">"https://beautifulsoup.com"</span>
response = requests.get(url)

<span class="hljs-comment"># Parse the HTML content</span>
soup = BeautifulSoup(response.content, <span class="hljs-string">"html.parser"</span>)

<span class="hljs-comment"># Extract data in the title tag from the parsed HTML</span>
title = soup.title.text
print(<span class="hljs-string">"Title of the page is "</span>, title)
</code></pre>
<hr />
<p><strong>Selenium</strong></p>
<p>Selenium is a web testing framework that allows automated browser interactions. It can be used for web scraping by controlling a browser instance and extracting data from <em>dynamic or JavaScript-driven web pages</em> which is one of it's major advantages.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> selenium <span class="hljs-keyword">import</span> webdriver

<span class="hljs-comment"># Configure the chrome webdriver</span>
driver = webdriver.Chrome()

<span class="hljs-comment"># Load the web page</span>
url = <span class="hljs-string">"https://selenium.com"</span>
driver.get(url)

<span class="hljs-comment"># Extract data in the title tag using Selenium</span>
title_element = driver.find_element_by_tag_name(<span class="hljs-string">"title"</span>)
title = title_element.text
print(<span class="hljs-string">"Page title:"</span>, title)

<span class="hljs-comment"># Close the browser</span>
driver.quit()
</code></pre>
<p>We can also combine Selenium with BeautifulSoup to get content rendered dynamically. Selenium automates web browser interaction. Hence the data rendered by JavaScript links can be made available with Selenium and then can be extracted using Beautiful Soup. Below is a snippet on how to use the combination of two.</p>
<pre><code class="lang-python">soup = BeautifulSoup(driver.page_source, <span class="hljs-string">'html.parser'</span>)
title = soup.title.text
</code></pre>
<hr />
<p><strong>Extruct</strong></p>
<p>Python's <code>extruct</code> library is useful for extracting structured data from web pages. The extruct library comes in handy when you need to extract structured data from web pages, such as <code>microdata</code> or <code>json-ld</code>. It makes it simple to access and process structured information embedded in HTML. We need requests to load the web page data, just like BeautifulSoup.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> extruct.jsonld <span class="hljs-keyword">import</span> JsonLdExtractor

<span class="hljs-comment"># Make a request to the website</span>
url = <span class="hljs-string">"https://extruct.com"</span>
response = requests.get(url)

<span class="hljs-comment"># Extract JSON-LD structured data from the HTML content</span>
extractor = JsonLdExtractor()
data = extractor.extract(response.text)
</code></pre>
<hr />
<p><strong>Scrapy</strong></p>
<p>Scrapy offers an integrated method for following links and extracting data from multiple pages. Scrapy is typically used to scrape data from multiple pages, follow links in web crawling, handle pagination, and perform more complex scraping tasks. It includes advanced features such as <code>middleware</code>, <code>pipelines</code>, and <code>built-in asynchronous</code> request handling. One disadvantage of Scrapy is that it does not support JavaScript by default, instead relying on Splash.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> scrapy

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MySpider</span>(<span class="hljs-params">scrapy.Spider</span>):</span>
  name = <span class="hljs-string">"example_spider"</span>
  start_urls = [<span class="hljs-string">"https://scrapy.com"</span>]

  <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">parse</span>(<span class="hljs-params">self, response</span>):</span>
    <span class="hljs-comment"># Extract title tag data from the response</span>
    title = response.css(<span class="hljs-string">"title::text"</span>).get()
    print(<span class="hljs-string">"Page title:"</span>, title)
</code></pre>
<h3 id="heading-analyzing-andamp-storing-data">Analyzing &amp; Storing Data</h3>
<p>Now that we have the data from the web, we can save it in the formats we want, such as CSV or databases. We can use Python libraries such as Pandas for data cleaning, transformation, and obtaining the final version of our preprocessed data.</p>
<p>Next, we can use Matplotlib or Seaborn to understand the trends, patterns, or correlations in the scraped data.</p>
<p>We can use Natural Language Processing to perform sentiment analysis on data containing customer reviews or movie reviews.</p>
<p>There are numerous applications for Machine Learning in scraped data.</p>
<h3 id="heading-importance-of-web-scraping">Importance of Web Scraping</h3>
<p>Web scraping is important in many industries. It aids in the monitoring of product prices, the analysis of customer reviews, and the tracking of competitors in e-commerce. Web scraping is used in finance for stock market analysis, tracking economic indicators, and collecting financial data. It is useful in investigative reporting and data journalism.</p>
<p>The applications are numerous, and web scraping enables businesses to remain competitive and make data-driven decisions.</p>
<h3 id="heading-ethical-consideration-andamp-best-practices">Ethical Consideration &amp; Best Practices</h3>
<p>Some Ethical &amp; Best Practices for web scraping include:</p>
<ol>
<li><p><strong><em>Respecting website policies:</em></strong> Check the website's terms of service and <code>robots.txt</code> file to ensure compliance with their guidelines.</p>
</li>
<li><p><strong><em>Rate limiting:</em></strong> Implement delays between requests to avoid overwhelming the target website's server and potentially causing disruption.</p>
</li>
<li><p><strong><em>Adding User Agents:</em></strong> Include a <code>user agent</code> in your HTTP requests that identifies your web scraping script. This allows website owners to contact you if needed.</p>
</li>
<li><p><strong><em>Scraping public data:</em></strong> Focus on scraping publicly available data and avoid sensitive information or private areas of websites.</p>
</li>
</ol>
<p>Hope this article helps you in getting a brief overview on Web Scraping &amp; how it can be achieved using Python.</p>
]]></content:encoded></item><item><title><![CDATA[Life in a Metro]]></title><description><![CDATA[I recently took a one-hour-long metro train ride during the peak hour. As the metro journey started, I couldn't help but notice the diverse group of people around me. Each person seemed to be in their own little world, lost in their thoughts and acti...]]></description><link>https://blog.shlokashah.com/life-in-a-metro</link><guid isPermaLink="true">https://blog.shlokashah.com/life-in-a-metro</guid><category><![CDATA[life]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Fri, 28 Apr 2023 09:38:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/PMxT0XtQ--A/upload/f9b2289636fc300156395220995f397e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I recently took a one-hour-long metro train ride during the peak hour. As the metro journey started, I couldn't help but notice the diverse group of people around me. Each person seemed to be in their own little world, lost in their thoughts and activities. But as I looked around, it made me wonder about the individual universes of each person.</p>
<p>I couldn't help but wonder about the folks around me as I continued to examine them. What are their stories? What has brought them to this specific metro train at this specific time? What are their dreams and hopes?</p>
<p>Every time I am in a crowded place or stuck in traffic or traveling on public transport, I have a similar feeling where I can't stop thinking about how small I or my little concerns or issues are in the grand scheme of things, and how many different lives exist around me and the existence of infinite universes.</p>
<p>The sight of so many people in one place is both overpowering and fascinating. I cannot help but think about how many different experiences, emotions, and tales each person must have had. Each person has faced unique difficulties, joys, and struggles throughout their lives. Nonetheless, here we are, sharing a space and a moment.</p>
<p>Walking through a crowd of people reminds us that we are all connected and that, despite our differences, we all share a common humanity.</p>
<p>Taking a moment to notice and appreciate this difference is both humbling and enlightening.</p>
<p>One of the reasons I enjoy viewing the sky when walking is that it serves as a continual reminder of our place in the cosmos and the connectivity of all things.</p>
<p>Finally, busy areas or the sky are not only a voyage through diversity and quiet reflection for me, but they are also a reminder of the endless universes that exist around us and the huge assortment of sensations that exist.</p>
]]></content:encoded></item><item><title><![CDATA[ML Model Deployment Strategies]]></title><description><![CDATA[Deploying any ML Model to production involves certain challenges which include:

Concept Drift & Data Drift: Concept Drift is basically when the relationship between the training variable & the target output changes whereas data drift is the change i...]]></description><link>https://blog.shlokashah.com/ml-model-deployment-strategies</link><guid isPermaLink="true">https://blog.shlokashah.com/ml-model-deployment-strategies</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[mlops]]></category><category><![CDATA[deployment]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 26 Mar 2023 11:45:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/w7ZyuGYNpRQ/upload/eca20aeeaf1cdc3ff34b6f9872470eb3.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Deploying any ML Model to production involves certain challenges which include:</p>
<ol>
<li><p><strong><em>Concept Drift &amp; Data Drift:</em></strong> Concept Drift is basically when the relationship between the training variable &amp; the target output changes whereas data drift is the change in the distribution of the data over time. Both can lead to a decline in the model's performance.</p>
</li>
<li><p><strong><em>Software Engineering Issues:</em></strong> When we are deploying an ML Model there are certain factors that we need to think about, for example, the latency &amp; the throughput needed, whether to have real-time or batch predictions. How to log the results for monitoring &amp; maintaining the security &amp; privacy of data.</p>
</li>
</ol>
<p>When we train Machine Learning using a specific algorithm, the best way to deploy the model in production depends on a number of factors:</p>
<ol>
<li><p>The acceptable downtime of our Machine Learning Solution.</p>
</li>
<li><p>The operation cost &amp; the human involvement in deploying the model.</p>
</li>
<li><p>The ease with which we can roll back the model in case of a drift.</p>
</li>
<li><p>Whether there is a need to test with production traffic or not.</p>
</li>
</ol>
<p>Now that we have understood what are the different challenges in deploying a Model, let's take a look into the different deployment strategies.</p>
<hr />
<h3 id="heading-recreate-deployment"><strong><em>Recreate Deployment</em></strong></h3>
<ol>
<li><p>In this strategy, we scale down the prior model before scaling up the new model version. Because it takes time to scale down the current model and scale up the new model version, the recreate technique is slow and causes downtime for the ML solution. Because we just have one version of the model, this strategy is incredibly straightforward to use. Recreate Deployment is not a scalable method and is best suited for small-scale applications.</p>
</li>
<li><p>We should use the Recreate Deployment when we can afford downtime with the product or when we don't want the new deployment to be backward compatible.</p>
</li>
<li><p><strong><em>Example:</em></strong> In Machine Learning applications where we run the predictions in the form of batches.</p>
</li>
</ol>
<h3 id="heading-shadow-deployment"><strong><em>Shadow Deployment</em></strong></h3>
<ol>
<li><p>Shadow Deployment technique is used when we already have an ML model running in production. We used this technique to run the new model alongside the existing one in production. The forecast from the previous model is returned to the application, while the response data from the new model is saved for testing and comparing the outcomes. We require sufficient monitoring to access performance and must operate more servers for the new prediction service.</p>
</li>
<li><p>We should use Shadow Deployment when we want to test the new version across actual production data &amp; at the same time don't disrupt the existing users.</p>
</li>
<li><p><strong><em>Example</em>:</strong> In Machine Learning applications where we want to forecast the business performance or growth, we can use shadow deployment to compare the predicted value from the model &amp; actual growth.</p>
</li>
</ol>
<hr />
<h2 id="heading-gradual-ramp-up-with-monitoring"><strong><em>Gradual Ramp-Up with Monitoring</em></strong></h2>
<p>The next 2 deployment strategies involve releasing the model for a certain % of users &amp; then based on the performance monitoring, making it available to 100% of users.</p>
<h3 id="heading-canary-deployment"><strong><em>Canary Deployment</em></strong></h3>
<ol>
<li><p>In Canary Deployment, we have the old &amp; new versions both running in production &amp; serving the application. The major difference between canary &amp; shadow deployment is that in Shadow, the response data from the new model is used for performance monitoring whereas here it is used to serve the application. The new model version is made available to a minimum set of users and then exposed to the entire set.</p>
</li>
<li><p>We should use Canary Deployment when we want to test the new version across actual production data &amp; at the same time evaluate the existing user's response to the model. It allows us to spot problems early on before there are maybe overly large consequences to the application with no downtime.</p>
</li>
<li><p><strong><em>Example</em>:</strong> In Machine Learning applications that serve as recommendation systems like content or product. We can compare the interactions of different users with different models applied &amp; then determine which was effective in providing recommendations.</p>
</li>
</ol>
<h3 id="heading-ab-testing-deployment"><strong><em>A/B Testing Deployment</em></strong></h3>
<ol>
<li><p>As the name suggests in A/B Testing Deployment, we have many different versions of the model. We divide the users into different groups based on the number of models we have &amp; then decide the best model based on the performance &amp; the user's interaction. With A/B testing we can discard the low-performing models fast with no downtime.</p>
</li>
<li><p>We can use A/B testing deployment when we have a couple of models which provide almost similar results. With this technique, we can determine the best model using production data &amp; response.</p>
</li>
<li><p><strong><em>Example</em>:</strong> Similar to Canary Deployment, A/B Testing can also be used for recommendation systems like content or product recommendation.</p>
</li>
</ol>
<hr />
<h3 id="heading-blue-green-deployment"><strong><em>Blue-Green Deployment</em></strong></h3>
<ol>
<li><p>The blue-green deployment is accomplished by utilizing an existing prediction service. Then, as the staging environment, we build a new prediction service, the green version. Once the performance and functionality testing in the green environment is completed, we have the router switch traffic from the old to the new. It incurs additional costs due to the upkeep of various settings. The benefit of a blue-green deployment is that it enables simple rollback. If something goes wrong, we may simply reset the router or switch to the blue version to divert traffic.</p>
</li>
<li><p>We can use Blue-Green deployment when the application can afford no downtime and backward compatibility is required.</p>
</li>
<li><p><strong><em>Example</em>:</strong> Real-time prediction system like fraud/anomaly detection.</p>
</li>
</ol>
<hr />
<p>Below is a brief table of differences based on the explanation of each method and the four main considerations we mentioned above for picking a deployment strategy. I hope this article helps you select the right deployment strategy for your Machine Learning applications.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td></td><td>Recreate</td><td>Shadow</td><td>A/B Testing</td><td>Canary</td><td>Blue/Green</td></tr>
</thead>
<tbody>
<tr>
<td><em>Leads to Downtime</em></td><td>Yes</td><td>No</td><td>No</td><td>No</td><td>No</td></tr>
<tr>
<td><em>Possibility of Rollback</em></td><td>Yes but with downtime</td><td>No need for a rollback</td><td>Yes, fast</td><td>Yes, fast</td><td>Yes, very fast</td></tr>
<tr>
<td><em>Testing with production traffic</em></td><td>No</td><td>Yes</td><td>Yes</td><td>Yes</td><td>No</td></tr>
<tr>
<td><em>Extra costs of deployment</em></td><td>No</td><td>Yes, for testing the new model with production data.</td><td>No</td><td>No</td><td>Yes, need to maintain two separate environments.</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Flip Side]]></title><description><![CDATA[Recently I had the chance to go as a mentor and judge for a couple of Hackathons. During my time in college, I participated in a lot of hackathons, but this was my first time serving as a mentor or judge.
As a contestant, I believed it was simple for...]]></description><link>https://blog.shlokashah.com/flip-side</link><guid isPermaLink="true">https://blog.shlokashah.com/flip-side</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[technology]]></category><category><![CDATA[hackathon]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Tue, 28 Feb 2023 12:09:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/UgA3Xvi3SkA/upload/2dcbb0cd48971283d92f0b3f25267f4a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently I had the chance to go as a mentor and judge for a couple of Hackathons. During my time in college, I participated in a lot of hackathons, but this was my first time serving as a mentor or judge.</p>
<p>As a contestant, I believed it was simple for the judges to determine the outcomes or how simple it was for them to give the teams advice. Being on the other side of the table helped me to realize that both sides require the same amount of preparation.</p>
<p>There is a similar sense of anxiety or nervousness on both sides. Developing and pitching your solution properly is the biggest challenge for a contestant while judging your solution based on a fair evaluation is the biggest challenge for a judge.</p>
<p>My primary learnings from the experiences were the following.</p>
<ul>
<li><p>The contestants must design a distinctive solution to the problem, while the judges must understand the problem statement, think of all possible solutions, and evaluate using the right technology.</p>
</li>
<li><p>Similarly to how participants need to be prepared to deal with any questions that might come their way during the pitch, mentors need to have answers/suggestions to questions participants might ask.</p>
</li>
<li><p>I realized during the mentoring session that you need to control the developer inside of you. When teams came up and mention bugs/errors they are experiencing, it's tempting to grab the laptop and fix them. However, you need to control yourself and provide them with the right information.</p>
</li>
<li><p>Just as teamwork is required in participation, it is also needed between the judging panel members. An agreement needs to be reached on the evaluation criteria and the scoring system.</p>
</li>
</ul>
<p>Thus there's no need to be intimidated by the evaluator if you're just starting to take part in hackathons. Keep in mind that both parties are under equal pressure, for the participant it is to produce the finest idea and pitch, while the judge is under pressure to render a fair judgment.</p>
]]></content:encoded></item><item><title><![CDATA[My First Tech Talk]]></title><description><![CDATA[It was an afternoon in September & I was having a discussion with Hari. While discussing, he gave me a new task Talking. This is a screenshot of what we wrote in a document. In the next 6 months, I had to first attend a conference & then give one ext...]]></description><link>https://blog.shlokashah.com/my-first-tech-talk</link><guid isPermaLink="true">https://blog.shlokashah.com/my-first-tech-talk</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[technology]]></category><category><![CDATA[#techtalks]]></category><category><![CDATA[Ruby]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Wed, 25 Jan 2023 18:34:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/c4lXkCHuaXY/upload/d136523cf75e4c4bccd94d85165fac1c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It was an afternoon in September &amp; I was having a discussion with <a target="_blank" href="https://in.linkedin.com/in/sp2hari">Hari</a>. While discussing, he gave me a new task <strong><em>Talking</em></strong>. This is a screenshot of what we wrote in a document. In the next 6 months, I had to first attend a conference &amp; then give one external tech talk.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1674654227346/7735182f-c0f0-4dd4-8b88-5892f10281e5.png" alt class="image--center mx-auto" /></p>
<p>Being my first time doing one, the prospect of presenting a Tech Talk was both exciting and scary.</p>
<p>Now that I had to give a talk, the most important thing was to find a conference. Since I had been working on Ruby on Rails, the idea was to find a Ruby-related conference and submit the CFP there.</p>
<p>In November, I came across the <a target="_blank" href="https://events.geekle.us/ruby/">Ruby on Rails Global Summit by Geekle</a>. I intended to attend this summit, observe the speakers' presentations, and then submit a CFP for any upcoming Ruby conferences I could find. The CFPs were still open though.</p>
<p>I told my idea to Hari, he convinced me that since the CFPs are open, I should submit one &amp; if I don't get selected I can always come back to attend the summit. This way my plan of attending the summit was now changed to speaking at the summit.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1674655289495/0807da72-17aa-4246-a4d5-c57ede531521.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-submitting-the-cfp">Submitting the CFP</h2>
<p>Since the CFPs had been open for some time, many of the topics I was thinking to speak on were already taken. I finally decided to speak on Rubocop, since I had been working on it for some time. The plan was to show a live demo on modifying cops &amp; showing the before &amp; after results. After various iterations on the abstract &amp; title I finally submitted my first ever CFP - <strong><em>Enhancing Code Quality with Rubocop</em></strong>.</p>
<p>During mid-December, <a target="_blank" href="https://www.linkedin.com/in/liliya-kravchak-975a09206/">Liliya</a> from the <a target="_blank" href="https://www.linkedin.com/company/geekle-us/">Geekle</a> team reached out &amp; yes the CFP was accepted, I was now giving my very first Tech Talk.</p>
<h2 id="heading-preparing-for-the-talk">Preparing for the Talk</h2>
<p>Since the talk was in January, I was pretty chilled out when I received the acceptance. I had already written a <a target="_blank" href="https://blog.shlokashah.com/configuring-rubocop-in-code-base">blog</a> on Rubocop so I felt that I could manage the talk.</p>
<p>When I got another email with information on the platform we would be utilizing and promotional banners for my talk, that's when I started to freak out as I realized the scale of the conference. To make sure everything was set up, I was requested to schedule a test call with the technical team.</p>
<p>During the technical call, they walked me through the Streamyard platform, how screen sharing works, and all other minor details.</p>
<p>When the call was over, that's when I first felt tense. I started overthinking even simple things like screen sharing because I was so new to the platform. What if I share the wrong screen or my internet goes out? Furthermore, I had to code live in front of my audience. What happens if my code malfunctions? I began to wonder if I ought to have recorded the presentation beforehand and submitted it. But it was time to push past your comfort level.</p>
<p>To avoid any problems that might arise during the discussion, the idea was to prepare the slides and run through the full flow as many times as I could. Also to get an idea of how people usually do it, I went to youtube &amp; watched various talks given by developers I had heard of.</p>
<h2 id="heading-practicing-the-talk">Practicing the talk</h2>
<p>Once I had the talk ready, I practiced them &amp; that is when I realized, I need to restructure the slides. Since I had a combination of theory &amp; code, I had to make sure there was proper spacing between the two, so that the content was easy to consume. I reordered and practiced again. I realized the speed at which I was talking was too fast &amp; need to slow down.</p>
<p>I showed Hari a demo of my talk two days before the event, and he offered me revisions as feedback. This was quite helpful. The most significant piece of advice I received was to interact with the audience &amp; make the talk more engaging.</p>
<p>I began to consider ways to include audience participation in the presentation. The options for participation were restricted because it was an online conference and nobody's video would be turned on. As a result, I incorporated surveys in the form of QR codes and invited the audience to participate in the coding.</p>
<p>Once I had the final slides, I did a final demo talk with <a target="_blank" href="https://linkedin.com/in/ishandeveloper">Ishan</a> &amp; again with Hari. Giving demo's helped in boosting my confidence.</p>
<p>On the day of the talk, I played around with the commands &amp; the code two or three times to make sure that everything was running as expected.</p>
<h2 id="heading-going-live">Going Live</h2>
<p>All the nervousness vanished as soon as I began to speak because I became absorbed. During the talk, I wasn't able to see whether people were answering my questions or the poll but when I completed the talk &amp; checked, I was happy to see that the audience engaged with me &amp; answered the polls. Some people even reached out on LinkedIn with positive comments.</p>
<p>Overall, it was a fantastic experience &amp; I am glad I went live instead of pre-recording.</p>
<p><strong><em>PS: You can find my talk here :)</em></strong> <a target="_blank" href="https://youtu.be/H7ggpT_ZFIQ">https://youtu.be/H7ggpT_ZFIQ</a></p>
]]></content:encoded></item><item><title><![CDATA[Retrospective - A developer's POV]]></title><description><![CDATA[As the year comes to a close, this blog post will discuss the importance of Retrospectives from the perspective of a developer.
What is a retrospective, to begin with? Wikipedia's description

A retrospective (from Latin retrospectare, "look back"), ...]]></description><link>https://blog.shlokashah.com/retrospective-a-developers-pov</link><guid isPermaLink="true">https://blog.shlokashah.com/retrospective-a-developers-pov</guid><category><![CDATA[retrosepctive]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[engineering]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 17 Dec 2022 17:19:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671344515976/Oib-w9Ioq.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As the year comes to a close, this blog post will discuss the importance of Retrospectives from the perspective of a developer.</p>
<p>What is a retrospective, to begin with? Wikipedia's description</p>
<blockquote>
<p>A retrospective (from Latin retrospectare, "look back"), generally, is a look back at events that took place, or works that were produced, in the past.</p>
</blockquote>
<h3 id="heading-first-why-is-it-important-to-write-a-personal-retrospective"><strong><em>First, why is it important to write a personal retrospective</em></strong></h3>
<ul>
<li><p><strong><em>Avoid Recency Bias:</em></strong> It is a typical fact that we tend to remember recent events better than events that occurred in the past, giving the recent event more significance. It's wise to pause, take a step back, and reflect on our past actions in order to avoid this bias.</p>
</li>
<li><p><strong><em>To comprehend what you have learned:</em></strong> To identify the important areas where you need to improve, make a list of all the lessons you've learned.</p>
</li>
<li><p><strong><em>To consider what went wrong:</em></strong> Reflecting on situations when your work fell short of expectations or where you encountered difficulties will help you identify potential mistakes you shouldn't make.</p>
</li>
<li><p><strong><em>Understanding your preferences:</em></strong> There will be many different jobs that you have worked on. While some may be of interest to you, others won't. You can request more tasks if you have a detailed list of your preferences.</p>
</li>
</ul>
<h3 id="heading-what-can-be-the-format-of-the-retrospective"><strong><em>What can be the format of the retrospective?</em></strong></h3>
<ul>
<li><p>If you worked on several projects over the quarter or year, you can break up the retrospective into each project's learnings and successes part.</p>
</li>
<li><p>The alternative strategy involves combining ideas like learning, successes, failures, preferences, and dislikes.</p>
</li>
</ul>
<h3 id="heading-how-can-you-start-with-writing-your-retrospective"><strong><em>How can you start with writing your retrospective?</em></strong></h3>
<ul>
<li><p><strong><em>Gather all the data points:</em></strong> This, in my opinion, is the most crucial action. You can review the data from the SCM you use to understand all languages, code bases, and even the kind of issues you worked on. To learn the theme and the list of languages, look at the commit messages and file types. Moreover, you can look at project management systems like JIRA to determine whether you focused more on Debugging or Features throughout your time. Review all the different architecture-related guilds that you have been a part of.</p>
</li>
<li><p><strong><em>Random notes from the past:</em></strong> Due to recency bias, which we discussed above, there are likely to be some little but significant events from the year that you will soon forget. These may be difficult problems to fix, a team discussion about the architecture, a few support tickets, or anything else. The notes don't have to be flawlessly formatted; a few bullet points can do the trick and serve as a recall of the entire scenario when you go back to it. I personally record everything that comes to me using the self-messaging function in Slack.</p>
</li>
<li><p><strong><em>Initial Thoughts:</em></strong> Wait a while before beginning to write a well-organized reflection. Make a list of all the things in the form of bullet points that come to mind when you think of retrospect as you stop. I usually prepare a list of every point I want to make in my retrospective before going into more detail on each one.</p>
<p>Even while we may believe that writing a retrospective is simple, it actually requires a lot of thought and perseverance.</p>
<p>A personal retrospective is written similarly to a Root Cause Analysis of any technical incident, with the exception that in this case, the RCA is based on the individual.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[The Art of Debugging]]></title><description><![CDATA[As software engineers, debugging is an integral part of our jobs. You may have times as a Software Engineer when you are more concerned about fixing bugs than developing novel features.
A debugging process can be divided into two categories:

Active:...]]></description><link>https://blog.shlokashah.com/the-art-of-debugging</link><guid isPermaLink="true">https://blog.shlokashah.com/the-art-of-debugging</guid><category><![CDATA[debugging]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software development]]></category><category><![CDATA[Bugs and Errors]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sat, 19 Nov 2022 07:45:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671345327358/-rUj7lHoW.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As software engineers, debugging is an integral part of our jobs. You may have times as a Software Engineer when you are more concerned about fixing bugs than developing novel features.</p>
<p>A debugging process can be divided into two categories:</p>
<ul>
<li><p><strong><em>Active:</em></strong> In this step, you investigate all methods of fixing the bug by altering the code. The next steps are developing a hypothesis as to whether the solution will work and implementing it.</p>
</li>
<li><p><strong><em>Passive:</em></strong> For passive debugging, we use logging when the bug cannot be reproduced, so we cannot run through the execution steps.</p>
</li>
</ul>
<p>Throughout this blog post, I'll share some of the debugging practices I adopted and have now become part of my debugging process.</p>
<p>It is essential to remember that if a bug exists, even if you are not experiencing it, it implies that something is definitely off with the code. This could be logic, a dependency issue, or a missed edge case.</p>
<h1 id="heading-go-back-in-the-history">Go Back in the History</h1>
<p>Gathering all available historical information about the issue is the first step in debugging. This typically allows you to identify whether the problem is persistent or whether it has never been fixed. There may be a log, error note, screenshot, and perhaps some old message exchanges.</p>
<p>SCM also allows you to view all of the file's previous modifications. Different Git extensions in the IDE can help with this process. Going back in time and discovering even the smallest indication might occasionally inspire an idea when you are absolutely baffled as to how the bug is happening.</p>
<h1 id="heading-read-read-read">Read Read Read</h1>
<p>Sometimes, half of the issues may be solved by just reading the code and tracing back all the functions.</p>
<p>In my experience, after locating the API Endpoint where the problem occurred, I look for the method connected to it and then attempt to visualize the flow by creating a mental model of the code.</p>
<p>Once you comprehend the code, you may add breakpoints (eg: <em>binding.pry in Rails</em>) to the code to verify your comprehension.</p>
<h1 id="heading-talk-to-yourself">Talk to Yourself</h1>
<p>When working on a complicated problem, speaking aloud to yourself might occasionally disclose blind spots.</p>
<p>I try putting it down in the manner of what I would advise someone to do if they were in a similar circumstance if thinking aloud doesn't help.</p>
<p>Simply write down everything you know about the bug so that when you see it all written out in front of you, your mind will start to fill in the blanks.</p>
<h1 id="heading-add-logs-everywhere">Add Logs Everywhere</h1>
<p>One of the most popular debugging techniques is this one. It entails inserting logs into the code at various locations—basically, before and after every function call.</p>
<p>Adding logs can help you understand the state of a variable whose value is changing across many functions.</p>
<h1 id="heading-play-around-to-reproduce-the-bug">Play Around to Reproduce the Bug</h1>
<p>As a result of the discovery of the defect, we can conclude that the code is flawed. In huge code bases, it is essential to reproduce problems that only appear under a certain set of circumstances.</p>
<p>In order to understand the set of conditions, all the data points can be gathered as you analyze the database values. Try finding a pattern across all the users for whom the error has been occurring. You can then experiment with a different set of conditions to correct the issue.</p>
<p>To further aid in the debugging of edge cases, the code may be significantly modified to include early returns, conditional returns, etc.</p>
<p>Forgetting what you know about the product is a crucial step in trying to recreate something. Typically, when we have been working on something for a very long time, we are familiar with all the tricks and know what will work and what won't. Due to this, the bug's reproduction is biassed. Consider your product from the user's perspective and create the most absurd scenario possible.</p>
<h1 id="heading-its-not-always-some-big-change">It's not always some Big Change</h1>
<p>When you encounter a bug, don't always think of the issue to be some big code change or rewrite. Start small.</p>
<p>Check for null values, any before action validations, if else conditions.</p>
<p>When I originally started, I believed that significant modifications would be necessary, but over time, I've learned that it's better to focus on the little aspects first.</p>
<h1 id="heading-read-the-unit-tests">Read the Unit Tests</h1>
<p>You can start by reviewing the unit tests for that specific piece of code if you are entirely perplexed by the various edge situations the function handles.</p>
<h1 id="heading-talk-to-the-code-owner">Talk to the Code Owner</h1>
<p>There is a possibility that you will not always have to debug something that you have worked on. When this happens, it can be helpful to speak to someone with a broader understanding.</p>
<p>You can bounce your ideas for solving when working on a critical flow, if modifying something, with the working team to ensure you haven't missed any edge cases.</p>
<h1 id="heading-have-a-proper-alert-andamp-monitoring-system">Have a Proper Alert &amp; Monitoring System</h1>
<p>Using tools like HoneyBadger, and Sentry can help you keep a log of the errors. You can add them to all your APIs &amp; critical workflows.</p>
<p>Other than alerting, you can have a logging system, where you can monitor the routes that are being called in actual production.</p>
<h1 id="heading-document-it">Document it</h1>
<p>The most crucial step is the last: once you've identified the cause of the problem, remember to record it for the future you.</p>
<p>Lastly, if none of the above steps work, take a break, come back and start again.</p>
<p><strong><em>PS:</em></strong> Keep in mind that debugging is not magic; rather, it is a sequential process that you get better at as you do it more frequently.</p>
]]></content:encoded></item><item><title><![CDATA[7 Things I've Learned as a Software Developer]]></title><description><![CDATA[In this Blog Post, I share some of the things I have learned so far while working as a Software Developer. 
Document Everything
Documenting can be classified into four types:

The tasks you need to complete: Teams use product management tools to trac...]]></description><link>https://blog.shlokashah.com/7-things-ive-learned-as-a-software-developer</link><guid isPermaLink="true">https://blog.shlokashah.com/7-things-ive-learned-as-a-software-developer</guid><category><![CDATA[software development]]></category><category><![CDATA[engineering]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[Shloka Shah]]></dc:creator><pubDate>Sun, 16 Oct 2022 11:16:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1665940975451/okbfU_vdb.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this Blog Post, I share some of the things I have learned so far while working as a Software Developer. </p>
<h2 id="heading-document-everything">Document Everything</h2>
<p>Documenting can be classified into four types:</p>
<ul>
<li><p><em>The tasks you need to complete:</em> Teams use product management tools to track tasks, but maintaining a personal TODO list is extremely helpful. On a regular basis, the list can be created. In retrospect, you can mark off the tasks that you were able to complete. I usually like to maintain a daily TODO list. </p>
</li>
<li><p><em>Maintaining your blog:</em> Recently, I also began this &amp; it has helped me organize my thoughts and easily document the things I have learned. It helps you think about your problems and communicate them more effectively when you write.</p>
</li>
<li><p><em>The work you have done:</em> Consider keeping a journal of your work so that you can reflect on your performance. As a result, you'll have a clearer idea of what you've learned.</p>
</li>
<li><p><em>Things that pop up randomly:</em> While working, you may get some questions or find something interesting related to your work, or the approach to solving a problem may be complicated. Be sure to document it. The complicated approach becomes easier to convey when you write it for yourself.</p>
</li>
</ul>
<h2 id="heading-if-something-doesnt-work-leave-it-for-sometime">If something doesn't work, leave it for sometime</h2>
<p>In development, we often end up coding all the time while trying to solve a problem/bug. The brain reaches a saturation point at which it is no longer productive.</p>
<p>When I would get some issues in the past, I had a policy of not sleeping or taking a break until the bug was resolved. It only took me some time to realize that having some breaks reduced the time it needed to fix the bug. </p>
<p>Now when I get stuck on code, I take a break for 10/15 minutes, and when I returned, the code ran fine with minor adjustments.</p>
<p>Sleeping over an issue has also been beneficial. As soon as I awoke after sleeping, the solution that I had been unable to find after hours of research came to me in minutes. Sometimes the solution felt like a Deja Vu dream. </p>
<h2 id="heading-not-always-about-coding">Not always about coding</h2>
<p>Being a Software Developer doesn't mean you need to code daily. </p>
<p>It is sometimes necessary to spend hours reading the code to figure out the root cause of the bug, gain a better understanding of the issue, or find different approaches to the problem.</p>
<p>There have been some bugs where the actual code change was only 1-2 lines, but it took me hours to research and go through the code.</p>
<h2 id="heading-consistency">Consistency</h2>
<p>You don't have to be an expert at everything all the time. You will become proficient at it only if you practice it repeatedly. </p>
<p>The first time you do something similar, you will probably make mistakes. However, the next time you do it, you will already know what to do and what not to do. Your brain will follow along automatically.</p>
<h2 id="heading-you-never-stop-learning">You Never Stop Learning</h2>
<p>Technology is a vast field that is advancing every day. The work you do on a daily basis will teach you things, but it usually happens in a chaotic way. </p>
<p>A book, course, or blog can be very helpful for learning stuff in a structured manner. </p>
<p>Furthermore, you can gain knowledge from other developers with different experiences &amp; journeys. Learning is a continuous process.</p>
<h2 id="heading-every-piece-of-code-should-be-run-once">Every piece of code should be run once</h2>
<p>Whenever I make a change to code, I test it after someone reviews it and asks for a change, and before merging it to master after getting the approval. </p>
<p>You never know what might fail if you don't test every change. You're better off delaying a feature than pushing one that has flaws.</p>
<p>Whenever you write code, you should test it before you put it into production. </p>
<h2 id="heading-the-process-of-breaking-down-into-smaller-pieces">The process of breaking down into smaller pieces</h2>
<p>Take each part of a problem and divide it into small achievable goals, whenever you encounter them.</p>
<p>My usual approach is to think about the dependencies involved in solving the problem. Then search for solutions to each of the dependencies. Your brain automatically gets motivated to tackle the larger problems as soon as you begin solving the smaller ones.</p>
<p>By creating a flowchart or list of smaller tasks to be completed, you have the requirements clearly in front of you. All you need to do now is think of the solution.</p>
<p>These are some of the things I have learned so far as a Software Developer. I hope you find these tips useful in your journey as a software developer at whatever level you find yourself.</p>
]]></content:encoded></item></channel></rss>