<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhanu Agarwal on Medium]]></title>
        <description><![CDATA[Stories by Bhanu Agarwal on Medium]]></description>
        <link>https://medium.com/@bhanuagarwal?source=rss-836443e5430e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mjJMVBmli202oVprFVgD1A.jpeg</url>
            <title>Stories by Bhanu Agarwal on Medium</title>
            <link>https://medium.com/@bhanuagarwal?source=rss-836443e5430e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:55:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhanuagarwal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A reminder of our mortality: COVID]]></title>
            <link>https://bhanuagarwal.medium.com/a-reminder-of-our-mortality-covid-e8e89b9483ef?source=rss-836443e5430e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8e89b9483ef</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[covid-diaries]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Bhanu Agarwal]]></dc:creator>
            <pubDate>Thu, 27 Apr 2023 18:56:25 GMT</pubDate>
            <atom:updated>2023-04-27T19:09:28.163Z</atom:updated>
            <content:encoded><![CDATA[<p>25.04.21<br>New Delhi, India</p><p>“Cylinders are over. We have to import. Beg, borrow, steal — get the damn oxygen!” shouted a news reporter on TV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9ituMJfYs4tJ-uJ-CJHJQ.jpeg" /></figure><p>I look at my phone, and I see 5 unread messages and 2 missed calls. As I am trying to read my messages, I get another call from a friend. He needs help with getting a Remdesivir prescription for his uncle in Gujarat. It seems all the missed messages and calls are for a similar ask, a plea for help to find oxygen cylinders, Remdesivir injections or some critical medication.</p><p>Struck by COVID, my grandma is still bedridden. Her patience is starting to run out. She’s been isolated for over 10 days now. Isolation during sickness must be extremely painful. The only companion she’s had lately is her TV. And it’s time for her daily injections to thin out the blood since the dreaded D Dimer report indicating blood clotting has come out high.</p><p>At this point, I don’t feel anything. A feeling of deep grief because of this never-ending disease across the city has now normalized within me. We’re grateful that we’ve got multiple hands to manage the essential items. My parents, grandma and I are at least all together. Thankfully, we were able to coordinate the medicines. We acted early enough to get the RT-PCR tests for all of us. I am just grateful to the almighty.</p><p>It’s confusing though. We all had the symptoms, but only my grandma tested positive. I had a runny nose and nosebleed for over a week. My father had fever for 2 days and continues to have body ache. My mother was feeling nauseous and had severe headaches for multiple days. Whether it was the news around or the actual disease that got us sick is unknown, but we’re not alone in this state. It’s just that the times are such.</p><p>My father’s cousin, a physician, has been a great support, prescribing tests and medication for my grandma, but even he doesn’t have access to RT-PCR or other blood tests.</p><p>Funnily enough, the water pump in our house decided to give up today, and we don’t have water. Well, yet another thing going wrong? No big deal. That’s not an issue.</p><p>Anyway, it’s time to get back to the war zone. Enough of thinking, it’s time for action, yet again.</p><p>I don’t express my deep inner thoughts usually, but I wanted to share this after 2 years as a reminder of the fragility of the world we live in. There’s a lot of work we need to collectively do. I’m confident that we’ve got this though…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8e89b9483ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 things new software grads can learn at Big Tech]]></title>
            <link>https://bhanuagarwal.medium.com/10-things-new-grads-can-learn-at-big-tech-f4e5dc06d015?source=rss-836443e5430e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4e5dc06d015</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Bhanu Agarwal]]></dc:creator>
            <pubDate>Wed, 06 Jun 2018 06:59:14 GMT</pubDate>
            <atom:updated>2020-12-25T03:32:24.813Z</atom:updated>
            <content:encoded><![CDATA[<p>As I was graduating in December 2016, my friends, seniors, and professors repeatedly emphasized the importance of gaining experiences that maximized learning after graduation. They recommended me to find a role where I could quickly develop tangible skills that would remain valuable for years to come. In a world where startups are typically considered some of the best places for super-fast skill development and big corporations are traditionally considered as laid back places, I seemingly ignored this advice when I joined one of the world’s largest companies — Microsoft — as a Software Engineer. It turned out that I learned some very important things about building large-scale products that I didn’t plan for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*LRl2_giFJXTHmkAvgIrAzA.jpeg" /></figure><p>I thought I’d share my <strong>10 biggest learnings</strong> as a recently graduated engineer working at a big tech company.</p><h3>1. Whatever can break will break in prod.</h3><p>This is the fundamental truth about real-world software. Downstream services will timeout and be too busy, 3rd party APIs will have downtime, and factors beyond your control, such as infrastructure problems, framework bugs, upgrades, etc., will lead to errors. The feature is doomed to failure without active alerting and monitoring, and one can’t practically test for all of these things in test environments. To safeguard against such unforeseen failures, appropriate retry and exception handling logic needs to be put in place at the time of feature design. The design architecture has to account for failure, and incident mitigation plans need to be worked out before hand. The art of <a href="https://en.wikipedia.org/wiki/Defensive_programming">defensive programming</a> comes handy when building production-ready software with a large user base.</p><h3>2. Edge cases become base cases at scale.</h3><p>You could say that 0.1% failures is a small number, but <em>0.1% of 1 million users is still a 1000 users</em>. Even rare, edge case type failures have great significance in production. While designing a feature, if a decision is made by claiming that an edge case can be ignored because no one would be ridiculous enough to do something so obscure, then think again. Customers always come up with a use case. Page size limits, header size limits, throttling limits, etc. are often hit because there will always be some users who’ll come up with a legitimate scenario that will push things beyond the limits of the designed system.</p><h3>3. Without a migration story, a feature is incomplete.</h3><p>Let’s say there is a product with feature X that needs to be replaced with a new feature Y, then there has to be a well thought out migration plan for this. Going from State X to State Y requires a <em>state transition path</em>. It needs to be part of the original design. An absence of the migration story often leads to downtime and breaking changes during a new release.</p><h3>4. Distributed, asynchronous systems can lead to dangerous race conditions.</h3><p>Features involving distributed asynchronous execution with overlapping state changes, usually in a message bus, background task, etc. type of paradigm, are tricky to get right. Creating <em>timing diagrams</em> and <em>enumerating</em> through all the possible orders of execution is useful to discover and weed out any Heisenbugs before hand.</p><h3>5. Customers know your feature better than you.</h3><p>A team of engineers, PMs, designers, etc. vs. all the millions of customers using your feature, just think about it, who would know better? This means that when your customers report something, they are likely pointing out a real problem that needs to be proactively investigated and fixed.</p><h3>6. Last-minute feature changes are the biggest source of hacky code.</h3><p>An important part of engineering involves successfully balancing the trade-off between velocity and quality. Products need to meet rigorous standards of quality and be delivered quickly. Therefore, unsurprisingly, the biggest reason for most hacks in design and implementation is an impractical timeline. When feature behavior is changed last-minute but the release timeline is not extended, code quality gets often compromised. Engineers are forced to fit the existing solution to the new behavior rather than redesigning it with a future-proof architecture for new functionality. This leads to short-term success, but adds on to the pile of long-term tech debt. It is important to spend time describing and agreeing upon the feature behavior early on in detail, in order to avoid last-minute overhauls.</p><h3>7. You won’t remember your own code after a few weeks.</h3><p>Software engineers work on numerous projects one after another. It is impractical, if not impossible, to remember every line of code one writes. It is only a matter of time before you’ll find yourself scratching your head about what a weird looking method does, cursing the author, only to later realize that it was your own doing. This is perfectly normal, so don’t be surprised when this happens.</p><h3>8. Simple versioning can get complex very quickly.</h3><p>Data model versioning, although sounds simple, can get very complex quickly, especially in the world of microservices. A small oversight can lead to unexpected behavior or deserialization errors due to a missing version on an innocuous parameter. Appropriate versioning is what makes backward compatibility work, and it requires one to be very meticulous and patient to get right. It becomes important to build a <em>test matrix</em> to verify the many combinations of UI and service version mismatch behaviors before the code makes it to production.</p><h3>9. Parallel processing is great but often impractical.</h3><p>In principle, parallelization is a great concept — one can typically get incredible latency gains by breaking down a large task into smaller subtasks executed in parallel. However, with finite resources, the pattern can sometimes be <a href="https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism">dangerous</a>. On a single machine, consuming more threads for processing one request means the <em>availability of fewer threads to process another</em>. And when the goal is to make things faster, this can be counterproductive since only a finite amount of resources are available. Further, over-parallelization can sometimes lead to thread pool exhaustion and starvation, which can be a pain to debug.</p><h3>10. Keep it simple stupid.</h3><p>Simplicity is the ultimate sophistication. Software development really comes down to writing clean interfaces that build the many layers of abstraction, and frequent refactoring to clean up code does pay off in the long run. The maintainability aspect of software becomes much easier if things are kept simple to begin with.</p><p>I hope you can relate to some of these learnings as a recent tech graduate. Please share your own opinions and experiences as you get that first tech job out of college.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4e5dc06d015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gasp: The Hunt for the Dirtiest Air in India]]></title>
            <link>https://bhanuagarwal.medium.com/gasp-the-hunt-for-the-dirtiest-air-in-india-7a82ac93680d?source=rss-836443e5430e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a82ac93680d</guid>
            <category><![CDATA[india]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[air-quality]]></category>
            <dc:creator><![CDATA[Bhanu Agarwal]]></dc:creator>
            <pubDate>Fri, 08 Sep 2017 07:30:43 GMT</pubDate>
            <atom:updated>2019-01-02T01:31:25.592Z</atom:updated>
            <content:encoded><![CDATA[<h4>Delhi isn’t the most polluted Indian city. There is <strong>worse.</strong></h4><p>It was a laid back weekday while I was on vacation in New Delhi. I was casually surfing the web when I came across a video from the Wall Street Journal that claimed that <strong>Delhi’s air was 20 times worse</strong> than the safe limit.</p><p><a href="https://www.wsj.com/video/this-is-how-bad-new-delhi-air-pollution-is/290523ED-B714-4BA6-BD1F-9DE41AEAB6B0.html">This Is How Bad New Delhi&#39;s Air Pollution Is</a></p><p>This video really upset me. Delhi is where I grew up. My entire family lives in the city. I was aware of the city’s air pollution problem, but I wasn’t expecting it to be <em>this</em> horrific. I thought…</p><blockquote>How bad really is the air quality in India?</blockquote><blockquote>And how bad is the air that I am breathing right now?</blockquote><p>I needed a quantitative answer, so I began researching. First, I did a quick Google search. I found several news articles with air quality values for specific days of the year, but the values were highly volatile, changing each day. Next, I came across some websites giving live air quality values for specific locations in India, but I couldn’t derive much long-term meaning from those. After that, I came across experiments that people had conducted in different locations using handheld air quality monitors, much like the one in WSJ’s video, which were interesting, but couldn’t be generalized. I realized that any such experiment wasn’t a good representation of the true situation for 2 main reasons:</p><ul><li>There was no way to verify the quality of the sensor used, and as a result, the reliability of the readings was undermined.</li><li>The experiment was only applicable to the day, time and place where it was conducted, and was too microscopic.</li></ul><p>I immediately knew that I had to find a data source that was <strong>both reliable and long-running</strong>. And I finally landed on the <a href="http://cpcb.nic.in/">Central Pollution Control Board, India’s</a> website. CPCB had published data online that was gathered using monitors that adhered to internationally recognized measurement standards and were scattered in various cities across India. This, however, was a raw data source that returned time series readings of a single sensor at a time after filling out a <a href="http://www.cpcb.gov.in/CAAQM/frmUserAvgReportCriteria.aspx">website form</a>.</p><p>If I could just perform a simple aggregation on the data for all sensors in Delhi for a year, I would have a better understanding of <strong>the air quality that I was breathing.</strong></p><blockquote>I decided to scrape CPCB’s website.</blockquote><p>I created a short iPython notebook that automated the form filling process to <strong>collect PM2.5 (small particulate matter) data for all sensors nationwide</strong>. The notebook and the derived data set for all sensors across India can be found <a href="https://github.com/bhanu13/cpcb_air_quality">here</a>. You can use it to make your own observations.</p><p>Having gathered the data, I was able to gain some meaningful insights about the situation through some visualizations using Google Maps’ API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGpWkCKcizAp7zewQDjJnQ.png" /><figcaption>PM2.5 Annual Average in India for 2016</figcaption></figure><p>It was easy to make out from this air quality heat map that there are multiple regions of bad air quality in and around cities such as New Delhi, Patna, Lucknow, etc. The full heat map for annual average values for all cities with CPCB sensors that I created is here.</p><p><a href="https://bhanu13.github.io/cpcb_air_quality/national-aq">Air Quality India Plot 2016</a></p><p>Looking at some quick numbers, it turned out that <strong>Delhi wasn’t</strong> the most polluted Indian city in 2016.</p><blockquote><strong>Gaya </strong>and <strong>Ahmedabad </strong>had worse PM2.5 annual averages than Delhi in 2016.</blockquote><pre><strong>The 5 Most Polluted Cities in India:</strong></pre><pre>Gaya: 196.22 ug/m3<br>Ahmedabad: 183.35 ug/m3<br>Delhi: 182.68 ug/m3<br>Kanpur: 166.36 ug/m3<br>Lucknow: 164.43 ug/m3</pre><pre><strong>The 5 Least Polluted Cities in India:</strong></pre><pre>Tirupati: 32.37 ug/m3<br>Solapur: 38.83 ug/m3<br>Mumbai: 40.38 ug/m3<br>Visakhapatnam: 45.88 ug/m3<br>Panchkula: 53.98 ug/m3</pre><blockquote>It was evident from the heat map that the least polluted cities were in the <strong>Southern </strong>region and were close to the <strong>coast</strong>. This would be useful for future studies.</blockquote><p>Next, I wanted to inspect Delhi more granularly. So, I created this plot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vW_oBSKGrgssh5cjRvc9Dw.png" /><figcaption>PM2.5 Annual Average in parts of Delhi for 2016</figcaption></figure><p><a href="https://bhanu13.github.io/cpcb_air_quality/delhi-aq-pm25">Air Quality Delhi Plot 2016</a></p><p>One thing I found very interesting about this one was that, although PM2.5 values were quite high in general, sensors specifically in DTU, ITO and Sirifort had exceptionally high values. By looking at just those 3 sensors more closely, one geographic commonality that came out was their proximity to the NH44.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2V5Ijz8QLImJX7GdjUcFg.png" /><figcaption>Highest PM2.5 in areas along the NH 44</figcaption></figure><blockquote>NH44 is <strong>India’s longest-running national highway</strong> that cuts through the heart of New Delhi. The continuous flow of <strong>heavy-vehicle traffic</strong> through it could be a potential source of poor air quality in the nearby areas.</blockquote><p>At this point I knew, with some accuracy, the quality of air that I was breathing while living in New Delhi. The <strong>closest sensor to me</strong> was the one in <strong>Sirifort</strong> that had a dreadful <strong>PM2.5</strong> average of<strong> 278.77</strong>.</p><blockquote>What about the air quality in other major Indian cities?</blockquote><p>There was no answer to this one because India just doesn’t have air quality sensors in all major cities, but I could come up with estimates on the basis of data from nearby cities with sensors.</p><p>I took the top 100 biggest cities in India and decided to predict the PM2.5 in 2016 for those. I interpolated PM2.5 values for the 100 most populated Indian cities using the data from the surrounding sensors and created another plot.</p><p><a href="https://bhanu13.github.io/cpcb_air_quality/national-aq-interp">Air Quality India Plot 2016</a></p><p>These numbers are highly speculative though, because by simply interpolating values from nearby sensors, I didn’t account for several other factors that could influence air quality, eg. coastal proximity, traffic patterns, terrain, elevation, wind patterns, population density, etc. I think a lot of these factors will have a high correlation with air quality. I will leave this detailed analysis for another time.</p><p><strong>Closing Remarks:</strong><br>Yes, the air quality in New Delhi and most of north India in general is really bad. We are way past the Indian PM2.5 (small particulate matter) safety limit of <strong>60 ug/m3</strong>. I am personally breathing a PM2.5 value of <strong>278.77 ug/m3 </strong>every day — more than 4 times worse than the safe limit.</p><p>What are the authorities doing about this? Well, they are trying to implement policies like the odd-even traffic schemes, with very limited real benefit.</p><p>I think there is a genuine need for each of us to address this problem more proactively. We need to be a lot more considerate of the environment as we perform our day-to-day actions. Whenever we are making a simple decision of using the car over the public transportation or throwing trash out on the street instead of waiting until later to find a dustbin, we need to think hard about how, through these small things, we are <strong>destroying our beloved Sone Ki Chidiya (The Golden Bird)</strong>.</p><blockquote>My only hope is that these findings will help us make better informed daily-choices.</blockquote><p>All the scripts that I created in this process are <a href="https://github.com/bhanu13/cpcb_air_quality">available here</a> for you to play around with.</p><p><strong>Further Readings:<br></strong>1. Hindustan Times’ Five Pollution Charts for 2016 <a href="http://www.hindustantimes.com/static/pollution-india-five-charts/">http://www.hindustantimes.com/static/pollution-india-five-charts/</a><br>2. Times of India’s Blog Post — Air Pollution Study for a part of 2016<br><a href="http://urbanemissions.blogspot.com/2016/02/cpcb-report-air-pollution-in-indian.html">http://urbanemissions.blogspot.com/2016/02/cpcb-report-air-pollution-in-indian.html</a></p><p><strong>Credits:<br></strong><a href="https://github.com/goldcase">Johnny Chang</a>, for helping me edit this post and for coming up with an apt title.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a82ac93680d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>