<?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 Ananth Rao on Medium]]></title>
        <description><![CDATA[Stories by Ananth Rao on Medium]]></description>
        <link>https://medium.com/@ananthamapod?source=rss-50f68271a8b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CCEByHI8Dj9nI2NFycYnFg.jpeg</url>
            <title>Stories by Ananth Rao on Medium</title>
            <link>https://medium.com/@ananthamapod?source=rss-50f68271a8b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:47:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ananthamapod/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[The BirthdayBot Adventure]]></title>
            <link>https://medium.com/@ananthamapod/the-birthdaybot-adventure-d0270916e09?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0270916e09</guid>
            <category><![CDATA[friendship]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[life-hacking]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Sun, 14 Jan 2018 13:01:01 GMT</pubDate>
            <atom:updated>2018-05-21T05:25:58.360Z</atom:updated>
            <content:encoded><![CDATA[<h4>An experiment with automated friendship</h4><p>About a year ago, I built a system for a friend that automated part of his business. The project involved several cool features including scraping information off a website and doing tasks at scheduled intervals (a la cronjobs, for the more technologically astute).</p><p>Well, while building this system, I began to examine what aspects of my own life and my hitherto nonexistent “businesses” I could automate. Off the bat, I ended up with two things, 1) StackOverflow automation, and 2) Facebook automation.</p><p>Okay, I’ll have to digress for a second to give some background. This was about the time that I decided to start cultivating a reputation on <a href="https://stackoverflow.com/">StackOverflow</a>, which — for those who haven’t had the pleasure of encountering it — is the wondrous question answer site and compendium of collective developer experience that is responsible for the continued employment of myself and countless others. StackOverflow has a reputation system with points and badges to reward good questions and good answers and other positive activity in the StackOverflow community, and a good StackOverflow reputation sometimes stands out to hiring managers in job interviews, so I had recently started answering questions in my areas of knowledge for those StackOverflow brownie points. And of course, those shiny StackOverflow badges.</p><p>One such badge was given at different levels just for logging into the site everyday (which of course I jumped at, for evidence of my addiction to cheap vanity metrics you don’t need to look any further back than my <a href="https://medium.com/@ananthamapod/new-years-resolutions-and-the-dangers-of-vanity-metrics-52f7afbfc751">previous blog post</a>). A silver badge for visiting for 30 consecutive days, and a gold badge for 100 consecutive days.</p><p>So that became my first personal automation project, building a small script that woke up every day and logged in to StackOverflow with my account. Simple enough.</p><blockquote>The next part of my life I tried to automate is where things got interesting.</blockquote><h3>My Issue with Facebook Birthdays</h3><p>I’d often thought the notion of wishing people happy birthday on Facebook or any other publicly displayed social media was kind of impersonal. Why?</p><p>Well, for one thing, <strong>Facebook et. al. will <em>notify</em> you of people’s birthdays</strong>. You’re not remembering someone’s birthday because of any sentimental bond and shared experiences, you just get an alert on your phone or laptop or whatever device you check most often. We often have this problem as a society with other things too, like not remembering phone numbers any more because they’re saved as named contacts, or forgetting people’s last names because … well you get the idea.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymSvbeRQmT_Wa3T1t9q2Lw.jpeg" /><figcaption>Curse you Facebook</figcaption></figure><p>It always kind of bugged me, and I’d usually try to assert to myself that I remembered a birthday on my own even when I was blindsided by my notifications. So basically screaming into my phone like “I knew that. I own this memory! Not you!” Happened more times than you’d think.</p><p>And the other thing is <strong>what you’re posting publicly is often more for public perception of your friendship than your own personal feeling of friendship</strong>. If I’m on close enough terms with somebody, I usually message them privately on their birthday instead of posting publicly. I used to hate posting on people’s walls because if I knew them well enough, I would just message them, and if I didn’t know them well enough, my birthday wish would mean nothing to them anyway. I’ve recently changed this outlook a little because well:</p><ol><li>It really is useful to reach out with a public post if it’s someone with whom you’re not that close or have lost touch. If this is someone with whom you’d like to be closer or you just want to notify them you exist, they might be less likely to respond to a message than a public post. So a rote “Happy birthday” is a starting point for reconnecting.</li><li>Hey maybe I’ve admitted that I kind of do care about public perception a little 😉</li></ol><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEDErWuTRluI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEDErWuTRluI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEDErWuTRluI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f926be26dcafe856ca7dfe3564f5ddf/href">https://medium.com/media/6f926be26dcafe856ca7dfe3564f5ddf/href</a></iframe><p>So that was a really forced reference.</p><p>Moving on.</p><p>Either way, bottom line is, I felt that happy birthday wishes on Facebook or anything else were perfunctory enough to be automated.</p><p>And so was born my second automation project, daily wishes for birthdays on Facebook. Before my friends get all huffy, no, chances are, if I wished you happy birthday, it was genuinely me and not some cold unfeeling hunk of metal.</p><p>That said, the hunk of metal did try, and here’s how.</p><h4>OAuth Adventures</h4><p>Heads up, here’s a bit of fancy tech jargon. If you’re not interested in that right now, feel free to skip 3 paragraphs down. But I’ll keep it simple.</p><p>Most services, once they are established enough, build support for external parties to use certain features, which they expose in the form of something called an API, or Accessible Programming Interface. Web-based services like Facebook often have things called a REST API which, without getting too much into detail, is a specific type of API that allows a third party to use the service’s functionality simply by making network requests (like going to a URL in the browser) and passing some information. Facebook has that. Great, so looks like Facebook is our friend here, keeping things simple.</p><p>Next thing to consider, the most common way to authenticate a third party application to use Facebook on a user’s behalf (to see your posts, make posts, etc) is to use this authentication scheme called OAuth. The idea is that the third party doesn’t have access to the username, email, password, etc that the user uses to log into Facebook. Instead, the app directs the user to a Facebook managed screen to put in their credentials, after which Facebook redirects back to the app with a temporary token representing the user for future use in interactions with Facebook. Kind of a simplification, the diagram below covers the idea in slightly more detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*fyfmxv1QjNyo9uan1YZroQ.png" /><figcaption>Generic OAuth flow, taken from Digital Ocean’s blog</figcaption></figure><p>As an example, Twitter allows you to cross post tweets to Facebook. Under the scenes, this is most likely handled via OAuth tokens, and Twitter is among thousands of apps and third party services that use Facebook OAuth to extend their functionality.</p><p>So at first, I was like, alright, nice, let’s use Facebook OAuth. I registered my app on Facebook’s developer portal, imported the Facebook client for Python into my codebase, started putting it together … and then I remembered that when apps like Twitter and Medium (meta much?) post on Facebook, Facebook includes a little tagline underneath saying “Twitter” or “Medium.”</p><p>Now I was in trouble. If I posted with my app using Facebook OAuth, each of my birthday wishes would be accompanied by the outrageously subtle name<em> </em>of “<strong>BirthdayBot</strong>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*i-A96PBAsy4BtgmmE36pXQ.gif" /><figcaption>Bweep! Happy birthday INSERT NAME HERE, love BirthdayBot. Bwoop!</figcaption></figure><p>Whoops.</p><p>Well, no matter what I called it, Facebook OAuth was now out. I needed to be able to post while giving the impression that the post was organic, my own post through Facebook. So that was a teeny tiny little hitch in the plan.</p><p>But wait! Being a resourceful little software engineer, I found a hacky workaround. What a surprise, hacky workarounds are like 90% of my life and my job (we’re called duct-tape programmers, folks).</p><p>Anyway, what I ended up doing is kind of interesting. Put on your helmets for more tech jargon people, it’s coming up.</p><h4>BirthdayBot, Meet RoboBrowser</h4><p>Rather than using the API, I ended up doing webscraping, which is just a fancy word for programmatically extracting information/performing operations on a website. It’s literally like loading a website in a browser and then interacting with it human style, except instead of opening a website visually and looking at it to find something, in webscraping, the website is requested the same way a browser would request it, and then the jumble of code that comes back is parsed to obtain the needed information. Bit more involved than using an API, but oh well, it’s the price I needed to pay for impersonating myself with code.</p><p>So cool, at this stage I was basically straight opening <a href="http://www.facebook.com/">www.facebook.com</a> and figuring out what it says. Problem was that second part. If you’re doing webscraping the smart way, you want HTML, or better yet, JSON. These are simple easily understandable formats, and more important, static markup languages that describe an object (a webpage, for instance), as opposed to a dynamic full-featured programming language that can be used to describe a possibly very complex set of instructions.</p><p>Well, for starters, Facebook is a very complicated web application that does a lot of fancy stuff with JavaScript — which for the uninitiated is what allows web applications to be interactive and animated and store data locally. JavaScript is one of those dynamic programming language things we were just talking about. And even worse, Facebook is built with a JavaScript framework called React that does a lot of convoluted stuff that makes it very difficult for a program looking at the code to figure out where individual information is stored and where it comes from.</p><p>So what could we do to get from React JavaScript madness to simple HTML/JSON? One of the things good websites have is different layouts/functionality based on screen size and the type of device being used (User-Agent Header for the devs in the room).</p><p>So I pretended to be a mobile device without JavaScript enabled. And boom, praise Zuckerberg, everything that I needed was served up as good old HTML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*sd9ZPq4vKxU_fuThicW9Zg.png" /><figcaption>Facebook, non-JavaScript mobile version.</figcaption></figure><p>Nice. Doesn’t look as good as the full site, but it gets the job done. So now all I needed to do was things like logging in programmatically and then finding the birthdays among my friends today etc. Easy peasy.</p><p>I ended up using this Python package called RoboBrowser, which parses HTML using a popular package called BeautifulSoup and can access the forms on any given page as well as store history and navigate forward and backwards through form submissions. Sort of like what the forward and backward buttons of your browser do. It even saves cookies in a “cookie jar.” If you don’t know what that means, don’t worry, just know that it’s useful and awesome.</p><p>Now I had a full game plan. I used RoboBrowser to fill in my username and password in the login page, submit the form to log in, and navigate to the events page and subsequently the birthdays page, and all of these pages were served up in static HTML because I was “a mobile device without JavaScript.” Fantastic. And I had to finagle a bit with the way I was selecting HTML elements to find the fields where you filled out a birthday post, but once I did, the whole system came together.</p><p>The next day, I ran this script on my laptop, and it worked right off the bat. I was elated. I let it run as a service for a few days on my laptop, and it worked each day without a hitch. I even had it set such that it checked if I had already wished a given person on their birthday so there were no suspicious duplicate wishes. Sweet.</p><p>I was ecstatic. So ecstatic that I put it on a server somewhere in the cloud so I would never have to worry about whether my laptop was on that day or anything like that. And that’s where I ran into the biggest problem.</p><h4>Intruder Alert</h4><p>I put my project up on Heroku, which is a PaaS (Platform-as-a-Service) cloud service with a free tier. Heroku is a platform that runs on Amazon’s AWS infrastructure, so I figured I had nothing to worry about.I just went about my day like normal.</p><p>Until at about 12:30 in the afternoon at work when I got an alert on my phone about an attempted Facebook login from a strange computer in northern Virginia.</p><p>I didn’t put two and two together at the time. I panicked. I followed the alert and told Facebook this wasn’t me, was prompted to change my password, which I did, and logged out and back in on all of my devices.</p><p>And of course I had to change the password my BirthdayBot was logging in with, so I did that and republished it on Heroku.</p><p>And then, the next day the same thing happened again, this time from Atlanta, Georgia. What was happening?! This was around the time when the Equifax hack was all over the news, so given that I knew so little about that, I started unreasonably worrying about all sorts of crazy account breaches and personal information leaks. So I changed my Facebook password again and for good measure, changed my bank account password. I was frantic.</p><p>And as before, I had to change the password I had stored on my BirthdayBot and republish to Heroku. It took a third time for me to figure out what was going on. Heroku deploys projects to application containers on AWS infrastructure, and whenever Heroku rebuilds a project after an update, it deploys a new container that could potentially end up on a different server in Heroku’s cluster, which is why the locations were different each time. Basically, those suspicious login attempts, those were BirthdayBot!</p><p>I could have kicked myself. I might have, actually, I don’t remember. I felt like an idiot. Anyway, once I was armed with this new knowledge, I knew exactly what to do. When I got the suspicious login attempt notification from Facebook the next day, I confirmed at the prompt that this login attempt was indeed me. Fingers crossed.</p><p>That should have been the end of it, but apparently Facebook’s confirmations screens don’t mean a damn thing. It still forced me to change my Facebook password, and I was never able to validate BirthdayBot’s existence because it was never able to log in from the cloud. Alas, after all that work, a dead end. Might seem like a disappointing conclusion, at least for the time being. Nevertheless, it does still have the capability to run on my local computer. So who knows, one day BirthdayBot might live again.</p><h3><strong>Reflections</strong></h3><p>Still, with all the sweat and tears that went into this expedition, it does beg the question, would it really be bad to automate little friendship points like birthday wishes? Can friendship be amortized or aggregated? At what point do the numerous minute amounts of effort needed to wish people happy birthday on a social media platform break even with the much more significant one-time effort needed to automate it? Can such a comparison even be made?</p><p>I’ve seen articles and videos and all sorts of media snippets of people automating social interaction, including making messenger bots that handle the introduction portion of new contacts, bots that send love notes to a significant other, etc. There is a stigma attached to these types of automation, and at the risk of sounding like a sociopath who can only approximate human behavior, I have to ask, why are any of these things inherently wrong to automate? Obviously, in some cases there is legitimate deception involved (eg. fooling your better half into thinking you have spontaneous bursts of love poetry might not have the best repercussions), but most seem like honest attempts to foster human interaction and remain connected with someone. Does that make it acceptable? Does that make it wrong?</p><p>Personally, I’m inclined to believe it isn’t a problem to do any of it, it isn’t wrong at all, but I’m an unashamed technoverse advocate who accepts robot overlords wholeheartedly. I accept that not everyone is like that, and I’m definitely interested in the opinions of others.</p><p>What do you think, dear reader? Can friendship be automated? Can the periodic effort of maintaining a friendship through myriad minute interactions be aggregated into a single prodigious effort and automated minute interactions?</p><p>Should it?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0270916e09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New Years Resolutions and the Dangers of “Vanity Metrics”]]></title>
            <link>https://medium.com/@ananthamapod/new-years-resolutions-and-the-dangers-of-vanity-metrics-52f7afbfc751?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/52f7afbfc751</guid>
            <category><![CDATA[personal]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[new-years-resolutions]]></category>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Fri, 17 Nov 2017 23:31:00 GMT</pubDate>
            <atom:updated>2017-11-18T22:51:00.008Z</atom:updated>
            <content:encoded><![CDATA[<h4>Or, how I learned to stop worrying and love incremental progress</h4><p>During my zany adventures in the cubicle jungle of software engineering, I came across a book called <a href="http://theleanstartup.com/">The Lean Startup by Eric Reis</a>. It was a really fascinating book in many respects, and there’s so much that may need a second, or third, or fifth reading for me to fully understand. But one of the big takeaways I got from the book was that for just about anything in life, and I don’t mean just for startups — to progress in anything in life, you need metrics. Big metrics. Small metrics. Metrics out the wazoo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*2rI9QOU0jScyKl80FtIauw.jpeg" /><figcaption>From <a href="https://onextrapixel.com/minimum-viable-products-defined-by-the-experts/">https://onextrapixel.com/minimum-viable-products-defined-by-the-experts/</a></figcaption></figure><p>But not just any metrics. After reading Lean Startup, the concept of actionable metrics as opposed to vanity metrics really stuck with me. Vanity metrics. So what is that, a quantification of how great your hair looked that day? How much your wardrobe killed at your night on the town? How many minutes Narcissus stood staring at his reflection in the river?</p><p>Welll, maybe. Vanity metrics were measures that had a lot to do with morale and <em>perception</em> of positive progress, but possibly little to no actual progress. So for instance, something like the raw number of how many people visit a bakery. Suppose fifty people walk into a bakery, and everyone walks out without buying a thing. If the bakery were focused just on the amount of foot traffic coming into the venue and never noticed no one was buying anything, they would be out of business pretty fast.</p><p>A pretty common possible vanity metric people use in everyday life is the number of tasks crossed off a list. Whether that’s a tasklist, a bucket list, a checklist, a Franz Lizst, or any other sort of list. If you make the tasks, buckets (?), or check items small enough, you can accomplish so <em>many </em>things. Many. In number. But maybe not in value. I’ve done this for ages, and often created a false sense of productivity only to find out that I’ve done almost nothing new.</p><p>A big focus in The Lean Startup was that vanity metrics should not be used as a primary measure of progress because they can be really misleading. A fine warning.</p><blockquote>Well, I’m here to tell you that I didn’t heed that warning very well in my own life. Like not at all. And figuring that out helped me immensely.</blockquote><p>Like any good story, this tale begins with a little scamp with lofty dreams. For a very long time, I’ve had this goal of making reasonable goals. Now if that sounds a little recursive, that’s because it is. Every year, I’ve made increasingly realistic new year’s resolutions with an increasingly reasonable chance of actually accomplishing said resolutions. I’ve also gotten to the point where I announce these goals to anyone who will listen — I call it public accountability for my goals. Or maybe I should call it public embarrassment. Because<em> clearly</em> if there’s one thing that’ll motivate me, it’s public failing at something.</p><p>I’ve always liked the idea of it, and actually had something of the kind on my personal website for years. It hadn’t worked in the past … probably because people lead their own lives and have better things to do than monitor some prima donna on social media who expects people to pay attention and keep track when he announces these things.</p><p><strong>But then,</strong> this year I found a set of goals that I thought I could genuinely stay true to, a set of goals that simultaneously catered to my inner selfishness and allowed me to fulfill some of the tasks I intended to complete. Here’s the list of resolutions I made in January this year:</p><ol><li>Become more active on social media</li><li>Reconnect with old friends</li><li>Get involved in music again</li><li>Stop procrastinating</li><li>Have a 100 day GitHub streak</li></ol><p>(Heh heh, there’s that public accountability thing again.) Well, you might be able to see right away, most of these objectives were just vague enough for me to be able to eventually justify to myself that I achieved some watered down form of them. And that was to my benefit, at least partially. I so desperately wanted goals I could achieve.</p><h4>An Illusion of Good Progress</h4><p>Well, first the elephant in the room. Why even have that first one? Many of my friends came up to me at the time and told me that was a weird goal to have, which I understood from their perspectives, but here’s why I needed it. I made that goal for myself because I used to “jack out,” to borrow a phrase from Stephen Fry. Before making this goal, I hadn’t been on Facebook or any other kind of social media in more than a year. I liked to think it was because I had gotten so disheartened by the banal social posturing and political outrage and bigotry. But truthfully, it was mostly because I’m somewhere on the introvert side of social.</p><p>If left to my own devices, I would probably stay in some high-tech cave all hours of the day like some sort of modern technology hermit, slowly but surely stockpiling oodles of social awkwardness and focusing on just music and hacking together cool things. Literally just “left to my own devices.” So I don’t always need social interaction to feel fulfilled. But it also means I don’t often reach out to anyone for help.</p><p>This was made painfully clear to me when, upon graduating from college and before finding a job, I ended up unintentionally depressed, unhealthy, and isolated. I spent many whole days tinkering with code or with something that was totally pointless — without break — and I felt tired all the time.</p><p>That was a mentality that held over from my college days, where I took three majors, got involved in several boring college organizations all at the grunt level, and commuted to and from school late at night. I didn’t know how to approach college, how to enjoy it while still making the most of it, so everything I did stemmed from the need to always find something “productive” to do, make sure my “breaks” were filled with “work.” Every moment that I spent having fun, I would be thinking, I <em>have</em> to be doing <em>something useful.</em></p><blockquote>And so it was that I became trapped in vanity metrics.</blockquote><p>And of course, after college was over and I was a free agent in the sea of possibilities, I needed to find a way to make that illusion continue. I needed vanity metrics. I needed tasks I could cross off a list. So I found random ideas to devote my life to. Random freelance contract-type ideas, but for myself. Often that just meant “exploring such and such technology or idea”, or “designing such and such product,” or whatever. With no deadlines or even clear ideas, and scope creep — out the wazoo. And for a while, I <em>felt</em> productive because I had a laptop in front of me. Or a piece of blinking hardware. Or a checklist. And armed with this delusion, I quietly tore my life and health apart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*X7hssKoTFLzymg97FAul6w.png" /><figcaption>From <a href="https://danieltrump.wordpress.com/2014/01/31/the-hedonic-treadmill/">https://danieltrump.wordpress.com/2014/01/31/the-hedonic-treadmill/</a></figcaption></figure><p>Here’s something that used to happen to me a lot when I got focused on one of these things. I would get so driven to finish that one thing that I wouldn’t take breaks, and I wouldn’t notice this growing emptiness inside. I forgot to eat, I forgot to drink anything. Stopped exercising at all. Became a raging insomniac. But mentally I was still justifying all of this, I believed that I was making “progress” on my “projects,” and that it was worth all these problems.</p><p>When friends invited me to do things with them, I came begrudgingly or turned them down. And I didn’t reach out for help, or to anyone for anything at all. I lost fifteen pounds during that month and a half or so. And when you’re my size, that’s not something you can afford to lose.</p><p>It all came to a head when I had to drop my mother off in Boston for a dance rehearsal. My mother, being a flutist, was part of the musical ensemble, and I, being not a flutist, was the chauffeur. So we embarked on a four hour car ride, and for the first time in more than a month, I was unable to be “productive” and was forced to examine my life and my own thoughts in solitude.</p><p>Long story short, at some point along the highway, I had a bit of a mental breakdown without any warning at all, and what ensued was a pretty embarrassing exchange at the end of which I, half-serious, half asking for help I suppose, told her in tears that I kind of wanted to just turn the car sideways into the highway divider and end it all, at 80 miles an hour.</p><p>To this day, I have no idea where that came from, why I said what I said, and what the heck happened that day to make me feel that way, but I remember my mom’s face. And she was completely and utterly freaked out. Not the kind of face I’d forget easily.</p><p>We didn’t attend the dance rehearsal that day. My mom made her excuses and the dance teacher seemed to accept them, though I may have cost her some of her reputation. I honestly don’t know. We turned back and went home, talked a bit, I went to bed, then later we talked a bit more. I hardly remember anything that we said, but I do remember this. I never wanted to see my mom’s face like that again.</p><p>I had to sit down and have a real self examination of everything I had been doing. That’s when I started my public accountability shtick again, started using my love of pointless vanity metrics in as positive a way as I could manage. I made a promise publicly about my intent to change my habits, and made a resolution to start eating well again, start sleeping, start taking care of myself. Started keeping track of it every day. I made a resolution to get more active on social media, because though that wasn’t in any way a substitute for real social interaction, it was at least way better than what I had been doing for ages.</p><p>I knew I needed to build a support network, both for myself, and to act as a support for others. I had friends all over the country, legitimately close friends who I saw at least once a year, who could have helped me talk through any problems I had <em>if they had just known about them</em>. And of course I could have done the same for them. If only I had interacted with anyone at all.</p><p>So that was why, when I realized I had been slowly winding down my activity on social media again by the end of December, I felt it was important to renew that vow in the new year. Well, a long story for a simple outcome. I started posting on Facebook and other media outlets again in January. I tried to do it every day, but I’m a bit too nervous about online social interaction to commit to that. I preferred to carefully curate and post stories about my life, and man was that taking a long time. So I settled upon a happy medium of about once a week. Well and good. And I kept it up for quite a while. More on that later.</p><h4>Of Music and Kinship</h4><p>Goal number two was very closely linked to the first one. All part of wanting to build that support network of friends and family, something most people know to do naturally but I never used to even consider. I always used to lament that I was losing touch with people, but I never did anything about it before because I wasn’t convinced it was enough of a problem. Well not any more. I wanted to reach out and reconnect with people with whom I’d lost touch, and I decided to formalize that into a resolution for myself.</p><p>I’ve been doing that here and there all throughout the year, and through a variety of ways, including social media, but also through getting back into shared activities and interests such as goal three, music.</p><p>I used to give concerts and compete in Carnatic (South Indian Classical) music competitions every year from when I was about 5 years old to just before I joined college. And I knew just about everyone in the music community, in not just my local state of New Jersey but across the country. But because of a whole slew of factors (the majors and extraneous clubs didn’t help), I lost touch in college.</p><p>Now to me, the best thing about music is everything about it. I can’t imagine a world without being involved in music, so I had to have a nice long introspective discussion with myself on just <em>how</em> involved I wanted to be.</p><p>And the truth was, I wanted to be involved all the way I could. I don’t know if I can be any other way. So I decided to make a goal to get back in musical shape, and back in touch. And <strong>I’ve stuck to it</strong>. I’ve been going to concerts on the weekends again, with the exception of a brief hiatus when I was preoccupied with family bereavement. Soon, I’ll be going to India for a couple of months to focus on music exclusively. So far, that’s three for three. Sort of.</p><p>Which brings us to the most troublesome metric of the bunch:</p><h4>My 100 Day GitHub Challenge and Where my Other Resolutions Fell Apart</h4><p>Put succinctly, GitHub is a platform where people can track the progress of projects and other things by using git version control. People can save previous versions of things and track changes. Now, because GitHub accounts are free, almost every developer or dabbling in programming has one where they store code (mostly, sometimes other things too), and these accounts are often put on resumes, job applications, personal websites, and all manner of other professional interfaces to hiring managers and recruiters. One thing that really stands out in a GitHub account immediately is a commit streak, that is, the number of consecutive days where pieces of history are pushed to these version controlled repositories.</p><p>Well, I decided that I would try and cultivate a really impressive looking GitHub account by pursuing a 100 day commit streak on GitHub as one of my resolutions. That’s 100 days of writing code for open source projects. Ok, daunting, but not impossible.</p><p>So I tried getting started a few times, but the streaks always fell apart really fast. I often went on Facebook instead, or just “felt too tired” after a long day of work. I realized that I needed to change my approach or change my metric. I really examined how this metric actually measured any progress I made on open source projects.</p><blockquote>And I realized it had been a vanity metric right from the start.</blockquote><p>Committing on GitHub gave no indication of whether a piece of code did anything at all that was meaningful. It would have been easy to change a word here or there in some existing project every day and just add to the history that way. So using simply whether or not I made a commit each day as a metric actually caused me to treat my goal less seriously. I realized I needed to really focus on improving one project each day, rather than the goal of a commit each day, and the commits would come themselves.</p><p>So I did, I changed the goal and eventually the commits came rolling in. I started tracking my open projects in Trello and deciding on tasks that needed to be done, and every day, I’d take one task at least and go to work.</p><p>And well, obviously it took a lot of time and energy. <strong>In fact, I dropped all of my other resolutions just to work on this</strong>, because completing a task for a project requires hours of time a day, and I didn’t want to be distracted by the temptation of things like just going on Facebook for two hours instead (which I used to do in the beginning). So I dropped off of social media again, stopped going out of my way to reach out to people I had lost touch with — for the time being. It almost would seem like I was repeating the situation I was in when I graduated college.</p><p>Oddly enough though, I didn’t feel that way this time. I still went out with friends or went to concerts. I took care of my health (well comparatively, I’m starting to put on a little spare tire, but because of healthy eating, not too little 🐼).</p><p>I was measuring the right things this time though. I had clearly defined tasks, and they all measured real improvements on existing projects, not vague ideas of projects that I could “explore.” I pushed at it, because unlike my previous encounter with focusing on code alone, this time there was an end in my mind and a clear-cut path to progress each time. It gave me a sense of purpose, and I knew once my 100 days was over, I’d have no problem continuing the same steady flow of improvements whether or not a streak or some other flashy metric was involved. And for some reason, jacking out for that limited time frame and focusing on this goal made me feel really happy. I was happy, not just content, and it’s been the best feeling in the world.</p><h4>Back on Track</h4><p>And how’d I do? Sure enough, when I started finishing tasks every day, the commits followed right along. I managed to finish up several open projects I’d had in limbo for a very long time. All of which I can now list in my background. What’s more, I was then able to update my personal website to showcase them. I started six new projects which I can once again showcase. And check this out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*IacEe6T5riY7kXXuLitOOA.png" /></figure><p>Check out the power of green! Well, maybe I’m cheating a little bit, because this includes commits I made for projects at work. But here’s the one that doesn’t include private contributions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*RLZYpxCeVX6eqJ66Xdg61A.png" /></figure><p>Still green enough for my goals, and progress enough for me. I managed to break 100 days this past Monday. Doing that gave me such a sense of release. A release that I’m fully able to enjoy as I return my focus to music and fly off to India. As I finish my last week of work before leaving, I’m finally able to say, I’m still happy. I can finally be proud of how much I’ve done in a year. Moreover, I can quantify it. Progress. Real, measured progress.</p><p>I was finally able to say I stuck true to genuine new year’s resolutions. And now? I’m back on social media telling the world about it. I’m back reaching out to old friends. I’m back in my music zone, I’m practicing every day, I’m listening analytically, I’m learning, it’s all coming together again.</p><p>I’m still working on projects, one issue at a time. But at least now, by having one measured task, <em>one at the most</em>,<em> </em>to complete per day, I’m no longer getting sucked into a hole. And guess what? Yesterday, at 104 days, I broke my streak. I didn’t do a damn thing all day. And I don’t care. I kept my resolution, the pressure’s off, and as long as I don’t go off the deep end — in either direction — eventually, my projects will get done, one clearly-defined legitimately useful task at a time.</p><blockquote>More than anything else, my resolutions taught me balance.</blockquote><p>And as far as vanity metrics go? I certainly learned my lesson there. The vanity metrics will see boosts naturally if you focus on the real actionable metrics. But to focus on the vanity metrics alone, to keep pushing to increase something that doesn’t really mean anything at all, that sense of false productivity will eventually crash and burn. And boy do you feel awful for having believed it the whole time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52f7afbfc751" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Always the Fighter]]></title>
            <link>https://medium.com/@ananthamapod/always-the-fighter-7c812432be0d?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c812432be0d</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[family]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Wed, 08 Nov 2017 05:56:29 GMT</pubDate>
            <atom:updated>2017-11-08T13:18:16.837Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A tribute to Indira S. Rao</em></h4><p>Strong women have shaped my life and identity in many ways, but few more so than my grandmother, Indira Seshagiri Rao. Indramma, as I fondly knew her, had been an ever present force in my life ever since I was sent off to Hyderbad in India to live with her back when I was 6 months old. Though the ocean that was often between us made more difficult to maintain as close a relationship later on, her presence was always with me, and when she came to live with us a few years ago, that intimate bond was rekindled instantly.</p><p>And strong she certainly was, strong, stubborn, confident, driven, even aggressive occasionally, but all the while, kind, affectionate, illustrious, noble, and boundlessly generous with everyone she encountered. People in my neighborhood still ask me when the nice aunty who talked and joked around with them so freely is coming back to America to stay with us again. Indramma was a fiery force of nature with the power to bring whole communities together.</p><p>In many ways, I have her to thank for where I am in my life today. If she had one passion in her life beyond all else, it was a passion for learning and education. It was she who passed that same drive and reverence for knowledge down to my father, and he and my mother down to me, and lo and behold, I became a driven well-educated software engineer with far reaching interests and passions. No surprise there, considering from whom I get my character.</p><p>For years, even up to three or four years ago, Indramma and I would sit down for frequent games of chess, which would sometimes go on to 2 or 3 in the morning. She was an impish and conniving chess player, one who wouldn’t hesitate to distract me with commands to go do more of my homework before I came back, or to go to sleep because I had school in the morning, while she quietly swapped two pieces on the chessboard. One time she simply removed my queen from the board when I went to get a drink, and when I asked her about it, she gave me a grin with absolutely no shame and told me I had lost it right in the beginning. When I started winning the games, around the time I started going to college, her response would always be the same. A good-natured smile and a shake of her fist. “But I put up a tough fight!”</p><p>She was truly a remarkable woman. Through her life, she had been an educator, the founder and headmistress of a prestigious school, a sought-after speaker at international conferences, an entrepreneur, a landowner, a farmowner, a scout leader, and an organizer and backer of multiple nonprofits. All of this largely at a time when women weren’t expected to be professionals, weren’t encouraged to be leaders. But as she always said, she put up a tough fight.</p><p>Despite being married extremely young, she pursued a bachelors and masters in education. All of this during the time when my father and his older sister were born and growing up on a farm that her family owned and operated. After her masters, she founded her own school in 1973, Sri Vidya Secondary School, a school which would go on to gain national renown for her innovative teaching methods and progressivism that were years ahead of their time. Indramma often used to sing me Christian psalms, Muslim prayers, Hindu devotional songs, and all manner of expression from every religion, all of which were taught in equal parts at her school, something that still doesn’t happen in many schools anywhere today.</p><p>Singing and the arts were yet another passion of hers, something she championed through her school as well. This mantle has been taken up by her children, my father, who she convinced to learn mridangam, a south Indian classical drum, from some of the greatest virtuosos of the instrument, and my two aunts, who she pushed to learn Bharatanatyam, south Indian classical dance, also from imminently revered artists.</p><p>By the time she was pursuing her doctorate in education in the 1980’s, Indramma had been invited to several international conferences on education to speak about her novel ideas and her teaching methods. She used to regale me with stories of her conferences in Germany, and how their culture differed so much from what she was used to, everything from how people spoke to each other to having beer with every meal. I always enjoyed attempting to converse with her in my halting middle school German, just for the heck of it, and laughing as she struggled to figure out what on earth I could be trying to say with my horrendous accent and ridiculous amount of effort.</p><p>Before Indramma had even gotten her doctorate, she had been awarded the First Prize in the Educational Contest by The Commonwealth, an international competition awarded in the UK, for her project on novel ways to teach math &amp; science. She had already been doing charity work as a member of the Aga Khan Foundation, and continued doing so and leading her school for several years after getting her doctorate. Years later, she has former students all over the world who have meetups with her where she’s affectionately known as “Big Aunty.”</p><p>During her later years at Sri Vidya, she started a company for computer literacy that served children in areas all over south India. She also served as a scout leader for the Guides, India’s version of the Boy Scouts program, while my father was a scout in it, and she never let her career get in the way of caring for her children, helping my father get into a prestigious engineering college when he was having trouble with his studies. All the while, Indramma continued her commitment to education by writing textbooks in math and science, and grammar guides for English. She was still making book deals with publishers four years ago when she was staying with us. Nothing ever stops when you devote a lifetime to service.</p><p>She was a remarkable woman with quite a lot of history, a lot of experience, a lot of baggage. But to her great credit, none of it ever doused her spirit or stopped her drive. Ever present was her enthusiasm, her joviality, and her unquenchable drive to accomplish more, her thirst for knowledge. Even in the past few years when she was staying with my family and me, she constantly had her nose buried in a copy of Richard Feynman’s Six Easy Pieces, a curated collection of the legendary Feynman lectures on physics, or The Amazing World of Mr. Tompkins, a dense set of story-driven examples demonstrating pretty complex concepts in physics like relativistic and near light speed effects and quantum mechanics.</p><p>The same drive that drove her in her career in education and service drove her to push her body to the impressive limits of a superwoman. She would never allow age to change her or slow her down. Even in these past few years, when she had wheezing problems and a heart condition, she still insisted on doing her prayer regimen while also cooking and doing the cleaning. When she was in anyone’s house, SHE was the master of the kitchen, no one else. She would charge into the kitchen and stir up a flurry of activity, come and plop down on the sofa and rest herself for ten minutes or so, and then she’d get right up, despite my parents’ protests, and plant herself in the kitchen again to take over where she left off.</p><p>Lunch and dinner were always on her terms, no argument about it, and sure enough, every night at precisely 9 pm, she would come to the foot of the stairs to the second floor and call, “Dinner time!” We had 5 minutes, my brother and I, and if we weren’t down by then, she’d come heaving up the stairs, heart condition and all, to drag us down, berating us all the while for being so undisciplined. That was the steel in her, that was the fighter.</p><p>And yet, to me most of the while, and to so many children in all the neighborhoods she frequented, visited, and lived in, she was simply that charming, articulate, fun-loving old co-conspirator and enabler who plied us with snacks sweet and savory, unsolicited gifts and toys, and constantly found entertaining activities for us to enjoy together. Hanging in my room to this day, I have a clay landscape we made together when I was only four years old and on another wall, a thousand piece puzzle we made together only three or four years ago.</p><p>I remember sneaking into her room in the dead of night after coming home from college, the only chance I would get to fill in a few pieces here and there before she finished the whole thing all by herself. I still have fleeting tastes of her mouth watering indian sweets, her gulab jamun, her kozhakattai, her jalebi, her appam, her omam podi, her bizarre and yet delectable Indian-ethnic hybrids like calzones and pizza which she loved to mix with her own Indian spices. I still have a long standing invitation to dinner at a house across the street from me if I promise to also bring along my grandmother’s recipe for her tamarind rice, or puliogare.</p><p>It’s the small things I really remember, like the way she used to come without a word to my brother and me and plop wads of dough in our mouths whenever she was making rotis, a kind of Indian bread. Or how she hit herself on the top of her head whenever she coughed, something my brother and I mimicked and teased her about for years. We would always come over and pat her on the head every time she was around and not expecting it, and now I’ve unconsciously started doing it to my mother too.</p><p>I write this on November 7th, 2017, knowing Indramma would have been celebrating her 80th birthday today. She was so close, so very close, to reaching this day. On October 1st, just over a month ago today, she passed away in the presence of her loving family. She had managed to wait until all of her children managed to get back to India to be by her side, and until an auspicious day in the Hindu calendar. As ever, on her own terms. Unfortunately, she had had too many complications from a bout of pneumonia, and in the end, she just couldn’t make it.</p><blockquote><em>But as always, she put up a tough fight.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*jNSBUu2op3LYz-el1pDY-g.jpeg" /><figcaption>Happy Birthday Indramma, With Love Always, Ananth</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c812432be0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Oasis in the Chaos and Aggressive Happiness]]></title>
            <link>https://medium.com/@ananthamapod/an-oasis-in-the-chaos-and-aggressive-happiness-4e4b62392f43?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e4b62392f43</guid>
            <category><![CDATA[random-thoughts]]></category>
            <category><![CDATA[moments]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[serendipity]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Fri, 02 Jun 2017 20:43:24 GMT</pubDate>
            <atom:updated>2017-06-02T20:43:24.862Z</atom:updated>
            <content:encoded><![CDATA[<p>A couple of months ago, I met up with an old friend in downtown New Brunswick, an old college haunt. A storm had raged earlier that week, and that night exemplified the essence of April. The edges of the roads and pavements shimmered in multicolored hues, the last vestiges of the recent rain, and the air was filled with the intoxicating scent of flowers in blossom and wet grass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*RKxS6VgtPfkqTqy6HETaWA.jpeg" /><figcaption>Like this: <a href="https://s-media-cache-ak0.pinimg.com/736x/e3/2b/e3/e32be33484bb732cedcf5328d4c6c20e.jpg">https://s-media-cache-ak0.pinimg.com/736x/e3/2b/e3/e32be33484bb732cedcf5328d4c6c20e.jpg</a></figcaption></figure><p>Inspired by the delectable atmosphere, I suddenly had the urge to skip down the streets in which we were walking, hanging of the lampposts and getting my shoes wet like a scene out of <em>Singing in the Rain</em>. I suggested this to my friend, and she looked at me like I was crazy. I completely understood the reason for her reservations, but later this got me thinking — when and why did it become so difficult for adults to enjoy simple moments with carefree abandon?</p><p>As I sit here writing this in a crowded Panera’s on my lunch break, there’s a cherry-faced little boy in front of me tugging halfheartedly at the arm of his frazzled mother. He’s singing a song he generated right there on the spot about waiting for his food. There’s something almost sublime about the entire scene, it’s almost like a Rockwell painting. It occurs to me that while I had sat waiting for <em>my</em> food, I had already pulled out my laptop and started checking my emails. Incidentally, I didn’t manage to answer any of those emails, but I did get to spend 5 minutes feeling a false sense of productivity.</p><p>Why didn’t I just bask in the leisure of waiting for my food to be ready? I certainly can’t do anything productive in that time, so why do I try every time? I’m reminded of that old serenity prayer, “Grant me the serenity to accept the things I cannot change; courage to change the things I can; and wisdom to know the difference.” I certainly couldn’t change the amount time it took to prepare my food. What could I have changed about the time I wasted on false productivity?</p><p>As adults we tend to become too preoccupied with the pressures of the present and the deadlines of the future. But if each un-worked moment is a wasted moment, when does that pressure diminish? If we are <em>always</em> working, toward what end are we working? What’s the eventual goal? If there isn’t a clear path to happiness through that course, the goal of happiness can’t be realized. And there’s more to life than productivity, more to life than labor, more to life than doing, and definitely more to life than financial stability.</p><blockquote>There are moments of beauty that we never get back if we don’t take the time to appreciate them, little oases in the chaos of responsibilities, little reaffirmations of our sanity and our humanity that we must stop and observe if we are to survive under the constant pressures we have in our lives.</blockquote><p>Most of our lives consist predominantly of a series of tasks that are tedious and yet somehow frightfully urgent, and the temptation to try and complete as many tasks as we can in a day can leave us oblivious to our growing stress until the pressure becomes unbearable. Too much of the time, our feeble attempts at unwinding at the end of the day consist of mind numbing activities that allow us to feel nothing for a time instead of urgency. We’ll spend 2 hours browsing the web, or watching TV, or maybe both! And do they really make us feel anything at all? Do we feel happy?</p><p>There is such an inherent beauty to everyday things, and we need to take the time to look at them before we grow too weary to reclaim our happiness. We HAVE to take breaks, and not simply breaks where we can trade one stress for another or trade stress for stagnation, but true breaks, where we can legitimately revitalize our spirits, recharge our joy and fascination, before diving back into the frenzy.</p><p>I’ve found that the only way to stay happy, rather than purely somewhat satisfied — or more often than not, thoroughly unfulfilled, is to push back aggressively against unhappiness. To be aggressively happy, to find the smallest positive moment and turn into into a lifetime of enjoyment. To periodically find an oasis in the chaos and turn it into a lasting memory of beauty. To intentionally and aggressively approach everyday life with the wonder and self-abandon we all had as children.</p><p>Or, paraphrasing the immortal words of Spongebob Squarepants:</p><blockquote><strong>Plankton:</strong><br>Haven’t you figured it out, SpongeBob? Nice guys finish last. Only aggressive people conquer the world. Ha ha ha ha!</blockquote><blockquote><strong>SpongeBob SquarePants:</strong><br>Well… what about aggressively [happy] people?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*c1cJjfd5-sLRgKtT5ik-oQ.png" /></figure><p>Okay, I know, I keep trying to make these corny jokes and references work, and they just … don’t. Look, here’s the takeaway. The world is so open and chock full of beautiful moments, and so conducive to free-spiritedness, yet through this bizarre pressure from societal norms, we find ourselves pushing that natural fascination and freedom into a tiny little corner of our minds. All I can say is, we can take take all the breaks we need, but somehow we must find joy in the small, the commonplace, the beautiful. Because the world is an extraordinary place made up of wonderful ordinary things, and our world is what we make of it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e4b62392f43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s make sure the March for Science stays true to what we want it to be]]></title>
            <link>https://medium.com/@ananthamapod/lets-make-sure-the-march-for-science-stays-true-to-what-we-want-it-to-be-a3fa50a92069?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3fa50a92069</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[science-policy]]></category>
            <category><![CDATA[march-for-science]]></category>
            <category><![CDATA[activism]]></category>
            <category><![CDATA[climate-change-deniers]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Fri, 21 Apr 2017 06:47:21 GMT</pubDate>
            <atom:updated>2017-04-21T06:47:21.624Z</atom:updated>
            <content:encoded><![CDATA[<p>I don’t usually express political opinions publicly like this, but I needed to give voice to the growing uneasiness I’ve had recently about this March for Science. The purpose of the March for Science on its face is simply an affirmation of the truth and usefulness behind science, a way to spread awareness of how science makes so many things possible in our modern society. As a firm proponent of curiosity, healthy skepticism, and the validity behind the scientific method, I have misgivings about whether the March for Science being organized here in the United States can stay true to its cause.</p><p>Science is not inherently political. Science is concerned only with finding truth, this purity of purpose is what makes science and the pursuit of scientific knowledge so admirable. This is the reason we find it so egregious when a so-called “scientific expert” distorts fact and truth to act as a mouthpiece for the outlandish claims of some big tobacco or big oil corporation.</p><p>The very same interest in purity is why I’m not convinced a march is the way to go. Despite what the organizers of both the overall march and the smaller local marches have said, there is a political motivation behind this march. Why do this march now? Why here? Well, it doesn’t take Einstein to make the connections between President Trump’s new administration and this March for Science. If I, as a progressive independent (both admittedly self-given labels) could see this connection, what would stop a staunchly anti-science Trump supporter from seeing it too? And that is precisely the problem.</p><p>There is a strain of blatant anti-intellectualism in this country, and this segment is growing dangerously rapidly. Is organizing a march really the way to combat this? Under an administration that caters to this segment, would politicizing science further — when treating science as a political weapon is already the strongest reason to deny science, at least according to the current anti-intellectual movement — would this really be the way to bring science to a position of trust again? Would this be the way to bring science to the fore?</p><p>I think a march like this could very easily go awry, and rather than altering the perspectives of science naysayers, such a march would instead further entrench them in their anti-science beliefs. Skepticism of science could continue to rise, and scientific consensus on various issues could continue to be seen as political ploys instead of well-reasoned and evidence-backed fact. We need to tread very carefully. There’s precedent here.</p><p>In the wake of the Women’s March in January, there were several accounts written by women who spoke out against the march and did not participate. Then, there was a retaliatory backlash against these accounts claiming these women came from privilege or lacked empathy or were patriarchy apologists — and whether or not these accusations were justified, the moment the back and forth ad hominem started, the very real issue of gender equality devolved into identity politics which ultimately isn’t constructive to examining the viewpoints of either side. Women who believed women’s equality was not an issue (or at least, not any more) were no more convinced of the urgency of women’s rights after the march than before, and anyone who was already against the expansion of women’s rights found more fire for their arguments. As expected, Fox news and other blatantly right wing pundits attempted to zero in on the hatred and the vitriol against the women who didn’t march, clearly trying to invalidate an entire movement with a few fringe cases of unjust behavior.</p><p>And the Women’s March is by no means the only relevant incident. The Black Lives Matter movement was largely deescalated the same way (deescalated from the points of view of many conservatives at least). The Black Lives Matter movement has become a sort of punchline for right-wing pundits to laugh off any new protest movement. Horrible I know, but yes, it has essentially achieved that status with many right wing news outlets. How? Well, because the voices on the right were able to once again largely invalidate an entire movement, and a largely peaceful one at that — at least to their listener base, by using fringe cases of violence/rioting and less than admirable behavior as representations of the whole movement.</p><p>Womens’ rights and equality is a legitimately political issue. It is an issue about social reform. Womens’ equality flies in direct opposition to many current policies at the state or even federal level. The division about this issue along current political lines is obvious if unfortunate. A rampant denial of inequality and an opposition to expanding women’s rights comes from a largely male portion of the conservative right, and a largely female portion of the liberal left rallies in support. The division of support for and against black lives matter was no different, easily split among party lines.</p><p>But science is a more nuanced topic. Science and scientific evidence are under attack from the ignorant and misinformed on both sides of the liberal-conservative divide, and even occasionally from the center. Is the anti-vaxxer movement, which is largely led by the sort of “new-age” liberal segment of the far left, any different than the anti-evolution group based mostly among the far right? Perhaps in magnitude of support, but both are cherry picking science to affirm beliefs rather than accepting the verifiable evidence found by using the scientific method. Could scientists marching in opposition to one attack on science unwittingly strengthen another?</p><p>Don’t misunderstand my point here. I understand the purpose of this march, I really do. Yes, scientists aren’t marching in opposition to conservatism but rather in opposition to the devastating policies being enacted by <em>specific</em> conservatives with zero understanding of science and a mulish refusal to learn and understand. I get that sentiment entirely. To add legitimacy — and rightly so, since the scientific evidence supports overwhelmingly — to truths that have been dismissed repeatedly as liberal nonsense or the establishment killing businesses. Issues like climate change, and renewable technologies, and even unbelievably in the 21st century, evolution. At its core, this is not a march against conservatism, it’s a march against willful ignorance.</p><p>Combating ignorance is definitely a noble endeavor, though I’m not convinced that a march is the best way to do this. I believe more in the power of opening dialogues with vehemently anti-science voices and discussing their distrust of science and examining the underlying causes. Do I always practice what I preach here? Perhaps not. But I do reach out across the aisle more often than most I think, and it has allowed me to see some of the reasons people distrust science, and they don’t always have to do with classically conservative or liberal values. People have been genuinely hurt by misunderstandings and false promises. These are more worth examining and deconstructing than simply crying “science is the answer!” and expecting former science-deniers to suddenly fall in line. Convincing a science-skeptic that science works as a whole is going to be a lot more difficult than simply a single march. It is possible a march will at least <em>help</em>. It has to be done the right way though.</p><p>I’m not saying the march shouldn’t proceed. But we need to be careful in what we say, and who we allow on our side. Otherwise I fear this march will pollute science with an undeserved stamp of political illegitimacy at a time when facts are already under attack. The danger to science isn’t conservatism. It’s ignorance. We need to remember that when picking our friends. Because ignorance isn’t partisan.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3fa50a92069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[So I heard you like hash tables …]]></title>
            <link>https://medium.com/@ananthamapod/yo-dawg-i-heard-you-like-hash-tables-418bcecf0ac6?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/418bcecf0ac6</guid>
            <category><![CDATA[radix-tree]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Wed, 27 Jan 2016 06:55:27 GMT</pubDate>
            <atom:updated>2017-04-21T06:55:24.439Z</atom:updated>
            <content:encoded><![CDATA[<h4>— a simple implementation of a trie, a sloppy segue into the Banach-Tarsky paradox, and other shenanigans</h4><p>I love hash tables. Get any kind of object, find a key for it, and boom, you can store a collection of them and grab one or drop a new one in there in a flash. But what happens when the key doesn’t work as well as you want it to? What happens when you get collisions? What do you do when those collisions happen because you’re trying to hash strings — for which it’s almost impossible to develop a reliable unique hash?</p><p>I give you hash table-ception! Also known as a trie or prefix tree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*xG_ockdQzp-xlc6RxY64oQ.png" /><figcaption>Picture taken shamelessly from topcoder.com</figcaption></figure><p>Look kinda nifty? Great, let’s get into how this actually works. The code in this article will be written in Java, but this can be implemented easily in any language that supports polymorphism.</p><p>Cool, so let’s get started. To start with a basis step, let’s consider the case when we’re only hashing characters. And to make it even easier, let’s look at only lowercase alphabet characters in ASCII encoding. How many different possibilities do we have?</p><p>We have 26 different lowercase characters. So that’s <em>26 distinct cases</em> we have to account for. So, we could account for those possible cases by using a hash table of size 26. We can even represent this as an array.</p><pre>// Each bucket represents a single ASCII lowercase character<br>String[] buckets = new String[26];</pre><p>Ok, so far, that makes perfect sense. Well, let’s go one step outwards in our quest to hash strings and consider the possible two character combinations. What happens then?</p><p>Well, each of those 26 possible first characters can now be followed by any of the 26 second characters. So the number of possibilities is 26², or 676. Ok, so there are 26 possible first characters: that’s something already covered by the base case. That makes sense.</p><p>The next step is also covered by the base case. You just need 26 different hash tables, one for each key in the hash table for the first character. Well, now, we’re stuck with 27 different hash tables. Woah, that grew fast, didn’t it?</p><p>The first thing you probably notice is that the number of hash tables you will need grows exponentially with the number of characters if you do it like this. What we’re doing right now is automatically assigning 26 hash tables for each character to hold the different possible characters for the next position in the string.</p><p>This is terribly inefficient. Consider what happens if we only need to hash 5 5-letter words: “hello”, “howdy”, “holla”, “yallo”, and “hullo”. Well, the way this structure is currently envisioned, we will have:</p><blockquote>1+26+26²+26³+26⁴ = 475,255 hash tables</blockquote><p>That’s right, 475,255 hash tables, all to hash only 5 words! So is this kind of a structure viable at all, especially for a sparse list of words like in this example?</p><p>Well, one optimization we can make immediately is to make sure a new hash table is only spawned on a would-be hash key collision. Sort of like a lazy allocation. So what does that mean for us in the example above?</p><p>Well, we’ll have the first hash table of 26 for starting characters. We first hash “hello”, which just results in storing “hello” in the ‘h’ bucket of the hash table. Then, when we try to hash “howdy”, there is a collision, and we allocate a second hash table in the ‘h’ bucket to differentiate between the second characters ‘e’ and ‘o’ of “hello” and “howdy”. Then, we store the “hello” in the ‘e’ bucket of that hash table and “howdy” in the ‘o’ bucket. So at this point, we’re at just 2 hash tables.</p><p>Next, we try to hash “holla’ and end up with another collision, this time in the ‘o’ bucket for the second character. So at this point, we allocate another hash table for the third character following ‘o’ to differentiate between the ‘w’ in “howdy” and the ‘l’ in “holla”. Then, we store “howdy” and “holla” in the ‘w’ and ‘l’ buckets respectively. So now we have 3 hash tables.</p><p>Ok, 3 hash tables for 3 words so far. That’s certainly better than what we would have had before, but allocating a new hash table for every new word still isn’t all that great. Well, let’s hash the others in the same pattern and see what happens.</p><p>That’s 3 hash tables for 5 words now. The difference between the number of words and number of tables has certainly gotten better. Clearly, this optimization from the previous structure is worth keeping. Now the question is, how do you code this? How do you create a hash table that can store either strings or other hash tables? Well, the answer is polymorphism.</p><pre>// Because these can be either Strings or other hash tables,<br>// we can store either with impunity<br>private Object[] buckets = new Object[26];</pre><p>When storing a new word (or when retrieving), we now need to check if a given bucket of a hash table is a node or another hash table and then proceed accordingly. This can be done in Java with the instanceof keyword. So considering that, how would we implement a put function?</p><p>Before delving into the full blown implementation, there’s 1 more thing to be discussed. We have so far discussed cases where all words in our hypothetical dictionaries are the same length. What happens if they aren’t?</p><p>Well, the easy fix for that is to have a hash table of 27 instead of 26. 26 of the 27 buckets represent following characters, and the last bucket represents having no following character. Nice and simple.</p><p>Cool, so let’s do some implementation. So how would a put function work? Well, suppose we store a constant called OFFSET, which defines the starting ASCII value for lowercase letters, 96 for ‘a’. Let’s also assume we have a stored index representing the depth at which the current hash table exists within the structure. Call it pos_index. The four conditions we would need to consider are 1) no word has been hashed to this location yet, 2) there is a hash table there, we need to differentiate on a later index, 3) this word is already in this location, we are seeing a duplicate, or 4) there is a collision, we need to create a hash table differentiated on the next index.</p><p>A put function might then look as follows:</p><pre>public boolean put(String key) {<br><br>		int hash_key = 0;<br>		if(key.length() &gt; pos_index) {<br>			hash_key = (int)(key.charAt(pos_index)) - OFFSET;<br>		}<br>		Object temp = buckets[hash_key];<br>		<br>		// Nothing in the bucket, create a node and store it there<br>		if (temp == null) {<br>			DataNode new_word_node = new DataNode(key);<br>			buckets[hash_key] = new_word_node;<br>		}<br>		// Contains a table, put into that table to telescope and avoid collisions<br>		else if (temp instanceof WordHashTable) {<br>			WordHashTable table = (WordHashTable)(temp);<br>			table.put(key);<br>		}<br>		// Contains a node, either a match or a collision<br>		else if (temp instanceof DataNode) {<br>			DataNode word_node = (DataNode)temp;<br>			String word = word_node.getWord();<br>			<br>			// If the same word is already there<br>			if (key.equals(word)) {<br>				word_node.newOccurrence();<br>			}<br>			// If word there is a collision, <br>			// telescope by making another hash table for the differing letter<br>			else {<br>				WordHashTable table = new WordHashTable(pos_index+1);<br>				table.set(word, temp);<br>				DataNode new_word_node = new DataNode(key);<br>				table.set(key, new_word_node);<br>				<br>				buckets[hash_key] = table;<br>			}<br>		}<br>		<br>		return true;<br>	}</pre><p>I used a DataNode data structure which I didn’t mention, but the structure is quite trivial. For this implementation, I chose to use a structure with 3 fields: the word string, a counter for number of occurrences, and a counter for number of accesses. With incrementers, getters, and setters for the numbers accordingly. So as you can probably imagine, the put function deals with the occurrences counter, while a get function would deal with the accesses counter. Let’s look at a possible implementation of a get function as well.</p><pre>public DataNode get(String key) {<br>		<br>		if (key == null) {<br>			return null;<br>		}<br>		<br>		int hash_key = 0;<br>		if(key.length() &gt; pos_index) {<br>			hash_key = (int)(key.charAt(pos_index)) - OFFSET;<br>		}<br>		Object temp = buckets[hash_key];<br>		<br>		DataNode ret_val = null;<br>		<br>		// Nothing in the bucket, return null<br>		if (temp == null) {<br>		}<br>		// Contains a table, return what you get from table<br>		else if (temp instanceof WordHashTable) {<br>			WordHashTable table = (WordHashTable)(temp);<br>			ret_val = table.get(key);<br>		}<br>		// Contains a node, either a match or a collision<br>		else if (temp instanceof DataNode) {<br>			DataNode word_node = (DataNode)temp;<br>			String word = word_node.getWord();<br>			<br>			// If the same word is already there<br>			if (key.equals(word)) {<br>				ret_val = word_node;<br>				word_node.newRequest();<br>			}<br>			// If word isn&#39;t there, return null<br>			else {<br>				ret_val = null;<br>			}<br>		}<br>		<br>		return ret_val;<br>	}</pre><p>Now that I laid out the idea for you, I’m just going to drop the rest of the code on you right here. The put and the get functions are the main trick to this, so the rest is pretty straightforward.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/abdf9808acfb21aec8a231298af8de6d/href">https://medium.com/media/abdf9808acfb21aec8a231298af8de6d/href</a></iframe><p>The DataNode implementation is quite trivial, and is shown as source code below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d837c77c9f94afe1fcefefef34dd1e02/href">https://medium.com/media/d837c77c9f94afe1fcefefef34dd1e02/href</a></iframe><p>So now that we have a functioning trie data structure, let’s look at some cool consequences. Right now, even with this implementation, with the average corpus of words, there are still some unnecessarily allocated empty buckets.</p><p>Ok, now suppose this structure were built to store a perfect dictionary, which is a hypothetical powerset of all strings possible with the Latin alphabet. So for instance, that includes “a”, “aa”, “aaa”, “aaa…”, and so on, ad infinitum, as well as the same from b-z. And combinations of such, so “abaa…”, “acbdasdf…”, etc. In such a case, this data structure would be extremely efficient, because every bucket in every hash table will ultimately be filled.</p><p>Sigh, anyway, one cool thing to think about is:</p><blockquote>At this point, this trie might as well just be modeled as a finite state machine, where the reading of each additional letter, regardless of which letter it is, is a possible end state.</blockquote><p>So basically, to paraphrase Asimov’s comment about the unmoved mover paradox, it’s “hash tables all the way down,” or perhaps more apropos the parlance of our generation, “hash tables for days.”</p><p>Ok, that was my terrible joke for the article. I’m sorry folks, if you leave now, I understand. If you’re still reading, I applaud you for sticking with me! Let’s hope I can give you something worthwhile.</p><p>Now, such a dictionary reminds me of this thing called the Banach Tarsky paradox, a mathematical paradox which says, briefly, that a subset of an object can be used to construct an exact replica of the object. In the case of a perfect dictionary, taking the subset of the dictionary starting at the second character rather than the first character would also yield the full perfect dictionary.</p><p>There’s actually a Youtube video by Michael from Vsauce which discusses this very paradox. It’s very informative and really worth checking out. A link to the video is included in the links section. Well, that about concludes my ramblings this time. Remember, simple hash tables can make for awesome tries!</p><h4>Links</h4><ol><li><a href="https://en.wikipedia.org/wiki/Trie">What is a trie?</a></li><li><a href="http://www.tutorialspoint.com/java/java_polymorphism.htm">Polymorphism in Java</a></li><li><a href="https://www.youtube.com/watch?v=s86-Z-CbaHA">Vsauce video on Banach Tarsky</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=418bcecf0ac6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intelligent Laziness: Plagiarism in Computer Science?]]></title>
            <link>https://medium.com/@ananthamapod/intelligent-laziness-plagiarism-in-computer-science-e58ca0849b4c?source=rss-50f68271a8b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e58ca0849b4c</guid>
            <category><![CDATA[plagiarism]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Ananth Rao]]></dc:creator>
            <pubDate>Wed, 21 Oct 2015 01:29:36 GMT</pubDate>
            <atom:updated>2015-10-21T01:29:36.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*wQt2qegou8TiFQc1WVoD-A.png" /><figcaption><a href="http://qualitycustomessays.com/blog/plagiarism/">qualitycustomessays.com</a></figcaption></figure><p>Recently, I came across a survey on plagiarism in college-level computer science. This got me thinking about the amount of focus universities give to plagiarism in other disciplines versus plagiarism in computer science, and about the concept of code sharing forums and open source programming in general. With the enormous wealth of clever solutions, algorithms, and tutorials online and off, is plagiarism really an issue worth considering in computer science?</p><p>Merriam-Webster defines plagiarism as:</p><ol><li>the act of using another person’s words or ideas without giving credit to that person</li><li>the act of plagiarizing something</li></ol><p>Now, M-W’s penchant for recursive definitions aside, what does this mean? The act of using another person’s words or ideas — well, we are all familiar with that concept, on one side or the other. But what about the second half of that definition? <em>Without giving credit to that person. </em>Aha, perhaps this is where the issue is.</p><p>In computer science curricula at colleges, there doesn’t seem to be a standard in teaching documentation early on. As a computer science student at Rutgers University, I haven’t yet been taught officially by the computer science department to give credit to online sources of code. If I do give credit where due, it is only because I learned to do so on my own.</p><p>So the question becomes, if students give credit wherever they use online sources, is it then acceptable for them to copy online code?</p><p>Well, if the goal in college was to get better grades, the answer might be no. Since students who find relevant code online might have an unfair advantage over students who did not, plagiarism by one student affects other students as well; it skews averages for grades on projects, assignments and exams, and it can give students who elect to do everything on their own an unwarranted feeling of inadequacy.</p><p>However …</p><p>Especially in computer science, not just as a discipline of study but as a field as a whole, there is (as there should be) more emphasis on skill-set and understanding than grades. Ultimately, the student’s success in the industry comes down to their set of tools and skills in different areas of technology. As such, cheating for getting better grades is a non-issue, and any computer science students who fixate on grades above understanding and acquiring knowledge needs to reevaluate either their perception of reality or their major. Perhaps they would be more comfortable with B.A.s in HR?</p><p>Nevertheless, the major is about learning. While it’s perfectly fine if students choose to find solutions online, they should probably use the code as a last resort or a check rather than jumping to such resources as a first impulse. Students who consistently copy code from the internet without understanding any of it will become the worst software developers, and with the job market for computer scientists so congested as it is, the last thing the world needs is more sub-par programmers who have made copypasta the foundation of their programming technique.</p><p>These students are also the ones who will quit the major because they feel it’s “too difficult”, when the truth is they opted for the easy way out when learning the prerequisites needed to learn more advanced material. This is obviously not a winning situation for either a student or an instructor. So what then is the balance? When is using code from other sources allowed and when is it not?</p><p>At the end of it all, what it comes down to is intelligent laziness. Intelligent laziness is what spurs programmers to automate a task so that they don’t have to do it anymore. Intelligent laziness is what allows a software engineer to black-box the operating system while still optimizing software to take advantage of it. Intelligent laziness is why, almost 200 years ago, the mathematicians and scientists of old began using the Babbage mechanical “computer” instead of scratch paper.</p><p><em>Intelligent laziness, in a word, is the cornerstone of the computer industry.</em></p><p>Intelligent laziness, which admittedly is a self-coined term, is choosing not to formulate a mechanism from base principles despite knowing the theory and background required to do so. If I’m implementing a mergesort as part of an application in Ruby, and I know how to implement a mergesort algorithm but don’t want to deal with the nitty-gritty of Ruby syntax, I might pull a Ruby mergesort implementation off the internet. And that would be completely fine.</p><p>Moreover, given that research is also an essential skill in software engineering, researching an algorithm or behavior is still a useful experience. The only time an issue arises is if the researcher doesn’t understand the algorithm or behavior and chooses instead to use someone else’s implementation anyway.</p><p>If a computer science student decided to research an algorithm and take code off the internet after analyzing and understanding the principles involved — and also credited the online source, I don’t think anyone could have a problem with that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e58ca0849b4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>