Sunday, November 19, 2017

November 2017 Updates

Right now I'm waiting for software to download and feeling slightly annoyed / angsty / frustrated because of a *IS&T doesn't understand Docker* issue[1] that I'm currently waiting to get resolved before getting back access to the server our research is on, how annoying debugging in Android studio is, and how terrible the cheap tablet we bought is (we purchased it a week ago for testing purposes, I left it plugged in on my computer overnight, and now it won't turn on).

Because I haven't written anything in so long, and I'm sitting around waiting, I decided to write a blog post and vent so that I can stop feeling sad.

A lot has happened since the last time I've written anything. My friends and I got into Sandbox and have been spending most of our time working on our project, I went to Scaling Bitcoin recently (which you can read about here), and last week we went to HackPrinceton. At HackPrinceton this time, we tried to work on something semi-related to our research, but the project was just way too difficult to finish in two days, so we punted and had a great time exploring[2] and meeting up with a friend from high school instead.

In addition to these trips, I've continued to work on the computer vision project with Jingwei and am feeling a little blue because the project is facing some challenges that I'll need a lot of time to figure out, and I feel like I never have enough time. I feel some stress about the project since Jingwei and I are planning on submitting a paper in March and we need results from our research. 

This semester, I have two very exciting, more long-term, projects that I've been working on with my friends, and I feel frustrated about how much time my classes take up since I get more out of my projects and learn a lot more, yet I never feel like I have enough time in the day to work on them. Finding the balance between doing ok in my classes and working on the projects that I care about is extremely difficult. I just want more free time and space in my head.

I feel like taking classes is good for people that don't know what they want to do because it lets them discover their interests, hence why I took so many AP classes in high school. But the projects that I'm working on right now have much greater consequences if they work out, and as a result my classes have become something excruciatingly annoying I have to deal with that I don't care very much about at all. 

Despite all of this, I'm happy that I have things that I care about to work on, and I'm looking forward to the future and IAP (when I'll have more free time).

Signing off.

11/19, 11:18 PM Update: I'm feeling a lot better about the computer vision project ♥

[1] To be fair, IS&T has good intentions because the clusters in csail with GPUs apparently have been taken over by bitcoin miners in the past, and they are taking precautions to make sure that there aren't any security holes. I understand their concern. I just feel frustrated about how the situation impacts me.

[2] Princeton is very different from MIT. I feel like there is a greater emphasis on appearances there and some classicism. For example, there were students working in the dinning hall to help pay for their tuition. I can't imagine how they must feel, serving and cleaning after their friends...

Scaling Bitcoin Trip 2017

I was fortunate enough to be able to attend the Scaling Bitcoin 2017 conference at Stanford, and thought I would share what I've seen there with friends to enjoy also. I took notes throughout the conference to help me pay more attention to what was being talked about, and have a reference for future purposes. I tried to be impartial and only write down what people were saying. You can check out these notes here.

The conference was interesting to me because I was able to get a closer look at the crypto community, the drama that happens within in, and get acquainted with technical concepts. There was a big focus on how to scale Bitcoin, with many talks on payment channels - which allow multiple payments to happen off-chain without committing every payment to blockchain - as a way of enabling more transactions.

Outside of technicalities (which are all in the Google doc, if you are curious), my thoughts about the crypto space haven't changed too much after the conference. The space is still very immature, with many of the talks heavily idea based without tangible results. The space still feels very scammy, with many people involved for the wrong reasons (i.e. greed). I am also more convinced than ever to be distrustful of anyone that tries to do an ICO.

A really interesting anecdote I heard at the conference was about how one of the co-founders of the lightning network decided to sell out and use his reputation to make money off of an ICO. It's common knowledge that the ICO space right now is saturated with people involved for the wrong intentions, and it is incredibly dissapointing to me that someone who was in a position of power and influence used it to pull off a get-rich-quick scheme.

Overall, I really enjoyed this trip and am extremely thankful that I had the opportunity to go.

Saturday, September 23, 2017

September 2017 Updates

This year, I've developed a "throw shit at a wall and seeing what sticks" kind of mentality, which means that I've decided to try a number of things and hope that a couple will really work out. It has been much easier for me to work on more interesting things this year (versus freshman year) because I am more understanding of the resources that the environment at MIT offers and what I want out of my college experience.

One of my good friends, Jingwei, and I have been working on a research project under a computer vision professor at MIT. We have been meeting every week with the professor, who has been tremendously kind and supportive, and working on the project between ourselves a couple times a week. Although I don't want to talk about the project too much since it is still a work in progress, the project has given me something to look forward to and pool my energy into. It makes me feel as if my time at MIT has been well spent, and hopeful that something really great will come out of it. If the project works out, it should be a big deal, which is really exciting.

Something I also want to do more this year is travel. It's so much cheaper to travel as a college student, and Boston is in a central New England location with many interesting cities nearby. For example, last year Robert and I were able to go to New York City for around $40 for bus tickets, which is just insane considering it would cost at least a grand for my family to visit the city from Florida. Not to mention there are so many opportunities for students, such as hackathons, that allow us to go to cool places while paying very little.

As a result, Robert and I applied to a shit-ton of hackathons, went to Cape Cod to visit a friend in early September, and Johns Hopkins for Medhacks which you can read more about here. I also received a travel stipend and will be going to Scaling Bitcoin at Stanford on November 4th & 5th, so hmu if you are in the area then to hang out. One negative side of traveling every weekend is that I've been incredibly hosed and behind in every class I'm taking. This has been the first weekend since school started where I've had free time.

In other news, Jingwei, Robert, Jacob, and I entered HackMIT together with a quirky idea to build a Harry Potter sorting hat that classifies people into MIT dorms based on a series of questions. We figured this would be really fun to pull off, and there is so much dorm data out there that we could really use them to make accurate assessments. We got very little sleep that night, but the MIT Sorting Hat actually worked out pretty well; we had a working demo, placed in the Top 10, and won the Best Internet of Things Hack prize.

Placing in the Top 10 at HackMIT again this year was reminiscent of last year, and I sometimes think about how HackMIT last year set the tone for my time at MIT in general. It led me to prioritize personal projects and think about doing my own thing, which means reflecting on what is important to me and not doing things that seem important just because everyone else around me thinks they're important. It also means simplifying my life through removing all the noise and time-consuming activities that are meaningless to me, and adopting the growth mindset: the idea that knowledge & experience reap compounding benefits, and having the motivation to learn as much as possible.

A tidbit is that I dyed my hair last month! It was originally purple and green, but now the dye has mostly faded and my hair is mostly just bleached (blonde). It's interesting because I almost feel like I'm treated differently because of my hair, as if the more countercultural demographic of east side people are more comfortable talking to me, and I'm excused from judgement when I act in weird ways in class. I have to admit that I like the dyed hair aesthetic because it really lets you stand out amidst everyone with virtually uniform hair styles and fashion senses. I definitely would like to re-dye it in the future.

Another tidbit is that this year, my trio and I were assigned to take lessons under John Harbison, who is a well known composer and also an institute professor. I feel like Prof. Harbison's expectations are higher with regards to individual instances of bringing out more color. For example, we spent the entire first lesson on the first four pages of our Beethoven trio. I also feel like my fingers aren't as dexterous as they used to be because I hadn't been able to practice piano this entire summer, which is really unfortunate. 

To conclude this blog post, I'll share some pictures from Cape Cod, which was very beautiful:





MedHacks 2017

Robert and I applied to a bunch of hackathons, and recently went to MedHacks which is located in Baltimore at Johns Hopkins. I've had a negative impression of Baltimore because of its bad coverage due to riots, therefore I was pleasantly surprised to find that Baltimore is sort-of a historical location, and many places resembling remarkably like Boston. Nonetheless, when we took a quick stroll through Baltimore's streets in the daytime, we saw a sizable homeless population, which is really unfortunate.

At MedHacks, Robert and I worked really hard to pull off an Android app that lets you take pictures of pill prescriptions and reads its directions to insert them into Google Calendar. It was the first time we ever pulled off a mobile app for a hackathon and we were incredibly proud that it worked, since we had to do some complex shit like using tesseract to grab text from the picture, using nlp to autocorrect the text, and building a websocket to transfer information from the Android client to the server (which included using base64 encoding to transfer pictures as text), not to mention building the Android app itself.

It turns out that MedHacks is a pitching competition without any expectations for a working demo; the winning projects were very disappointing, and we were very disappointed with the way the hackathon was run. For example, MedHacks literally used Google Sheets for their judging system (lol!), and they conveniently forgot to list our project in the spreadsheet for judges. As a result, we only got 1 judge (out of the 3 required). We kept nagging them about this, so in a direct attempt to appease us rather than solve the problem, two MedHacks organizers became our 2nd and 3rd judge.

One corporate sponsor from Elsevier who was a second round judge (didn't qualify for our category) really loved our project. He said our project was his favorite and to quote him, "live blogged the shit" out of it, which you can find here here. A highlight from the conversation was when he asked us if we knew what ScienceDirect was. We said, "no." He then asked us if we knew what Sci-Hub is. We enthusiastically said, "YEAH." Then he was like, "Yeah we sue the shit out of them!" The Elsevier guy was really nice and offered us a job, which Robert and I found incredibly amusing.

Another funny moment was because MedHacks didn't host "hackers", we had to bring sleeping bags or make do with sleeping on the ground. Robert and I found a nice lounge on the 8th story of the building that the hackathon was hosted in, and Robert got the brilliant idea to take the single person couches, and turn them over so that with 6 of them, we could make a bed. The first night we made the bed, we didn't disassemble it. When we came back to sleep in our bed again the next night, we found that another guy had taken refuge in it.

As a result, we went to the 10th story and replicated the bed. Later that night, when we are just able to fall asleep, we heard a bunch of people walk through, complaining that the sleeping room was full, see our bed and exclaim, "Why didn't we think of that?". Robert and I got a kick out of this, commenting that it takes a sprinkle of East Campus irreverence for us to come up with our idea and have such disregard for social norms to actually implement it. Because of our nice makeshift beds, we actually slept pretty well at MedHacks.

To end this post, I guess I'll share some of the nice pictures that I took of Baltimore and Johns Hopkins:







Friday, August 11, 2017

A Tribute to my Piano Teacher: Ms. Ruo Balko

Today I was listening to the Grieg Holberg Suite during my internship, played by Dr. Hastings, who passed away last year. Dr. Hastings was my piano professor when I went to the FSU piano institute four years ago. Listening to the Holberg Suite made me feel very sentimental, and I suddenly started crying. Dr. Hastings had a reputation for being hard on his students because he pushed them to be the best that they could be. I loved Dr. Hastings; he was the best, and being reminded of Dr. Hastings reminded me of my piano teacher who had pushed me to meet him in the first place, who has by far made the biggest impact on my life yet: Ms. Ruo Balko.

Ms. Balko is the reason I went to the magnet arts schools (BAK & Dreyfoos) for middle and high school, and music festivals like FSU, Eastern Music Festival, and Southeastern Piano Festival. Ms. Balko has not only been my piano teacher, but also my mentor in life. I remember when she used to live in Village Walk, the community across from Olympia where I lived. Our "45 min." piano lessons would start at 8:30 PM and often extend until 11:30 PM, sometimes even midnight while she shared her insights on life and music.

Ms. Balko cared about her students to the point of obsession. She was constantly trying to come up with creative ways of inspiring them to practice more, researching music opportunities, and modifying her teaching technique. She was both a teacher and an avid student, and loved her profession, music, and her students beyond anyone I've ever met. Her students consistently won piano competitions, but more importantly, loved music as an extension of Ms. Balko's dedication to music and her love for her students.

Ms. Balko was the first person in my life who truly pushed me to become the best that I could be, who gave me confidence to pursue impossible things by encouraging me to tackle pieces like Chopin Sonata no.2 and Prokofiev's 3rd Piano Sonata when I wasn't yet ready for them. I remember when I wanted to play the Prokofiev's 2nd piano concerto, a piece that other professors at piano festivals thought I was crazy for undertaking. Ms. Balko, in contrast, embraced the challenge and supported me. She's the reason that I was able to perform the concerto at Eastern Music Festival with the Eastern Philharmonic, an experience that I remember fondly to this day as the highlight of my high school piano adventures.

Ms. Balko influenced my mentality in life forever. She taught me how to love deeply through the example she set herself; to never give up, to be uncompromising when pursing what I want and love; to never fear difficult problems, to instead search for them and tackle them with conviction; to remember that anything, anything in the world, can be learned through time and hard work. I respect the teaching profession immensely, which exists solely for the betterment of the next generation: a very noble goal. I respect Ms. Balko even more for sizing up her role in society, and for being a teacher who cared. Ms. Balko inspired students like me to be the best that they could be, and I would not be where I am today if not for her. For that, I am immensely grateful.

Monday, August 7, 2017

Finding your Utility Function, a Discussion on Existentialism

As a preface, this essay reflects my beliefs and opinions at the moment, which I felt would be interesting to capture for future references. I want to emphasize that my beliefs change over time and that I don't want to impose anything on you; feel free to form your own opinions.

I found this paragraph from Vitalik Buterin's personal website especially interesting:
In late 2011, I participated in a high school programming competition where players program the code for a team of simulated robots that then fight each other. I won third place. Someone asked me: what was my strategy? Others gave command-and-control strategies such as "I went for the center". I simply replied "I gave each agent a utility function and let them independently act to maximize their own objectives". That moment would inform my political beliefs for years to come.
Although thinking about life in terms of maximizing utility is just another mask for expressing existentialism, a topic already discussed in abundance, Vitalik's paragraph resonated with me because it helped me think about the meaning of life in an impersonal way.

It's very tempting to compare ourselves against each other, and for society to measure individual success on a standardized ruler. Last semester, there was a period when my friends were getting higher grades on tests while studying less than I was, and simultaneously having enough time to work on cool personal projects. I felt really stupid and my self esteem took a hit.

A couple things helped me escape my unhealthy thoughts. I finally accepted that it was not possible, nor worthwhile, to aim for straight As at MIT, which allowed me to put in less effort into my classes and instead focus on more meaningful pursuits. Another breakthrough, which ironically helped me do much better on tests, was learning how to freakin' stop worrying about things.

Unexpectedly, I discovered how to stop worrying while working on a solution in Google foobar using Dijkstra's algorithm. Dijkstra's algorithm allows you to find the shortest path from a starting node to a target node through evaluating weights to decide on the next node to visit. The idea that Dijkstra's algorithm guarantees that you find the shortest path to a goal helped me internalize the mindset that everything will be alright. Sure, this confidence is unfounded, but it helped me learn how to stop worrying about my goals, and instead focus on the most productive thing to do in the present.

We learn best when we are able to receive feedback for our actions. In the absence of a more abstract goal, feedback can be social validation or money, or anything that fulfills a person's basic needs (see Maslow's hierarchy of needs). I admit that I am incredibly privileged because I was born into a circumstance that has allowed me to focus on more abstract goals. Nonetheless, in order for the analogy of Dijkstra's algorithm to life to work correctly, we need to have a pre-prescribed goal and a clear way of evaluating our path to it.

Given that you are like me, which is privileged as fuck, this is where values come into play. I interpret values as guidelines that people live by. Because "values" sounds too passive to me, I really benefited from interpreting life as a utility function instead. I want to emphasize that seeing life as a utility function is different from adopting values because a utility function means that you are actively trying to maximize your utility, and constantly gauging whether or not your actions are productive in this context.

For example, the utilities that I'm trying to maximize at the moment are to work on interesting problems and make a positive impact on the world, whereas Richard Feynman's probably were to learn as much about the world as possible and to be happy. These are very different motivations and it makes sense that we would approach life differently.

Understanding that everyone's utility functions are different has not only helped me understand people I care about in a deeper way, but also learn how to stop judging people based on my own metrics. Everyone has different motivations in life, and as long as they're not hurting anyone else, that's okay. Nonetheless, I enjoy interacting with people who have evaluated their utility functions at all because it means they've created meaning in their lives, they're more likely to be independent thinkers, and they're more likely to be active in their lives.

In summary, I've recently started to think of life as a utility function while using Dijkstra's algorithm to justify that I will reach my goals in the end, given I am focused on using my time as productively as possible in the present. I really enjoy thinking about these more abstract ideas in the context of computer science concepts. It shows that the humanities and sciences are really more similar than popular perception likes to think.

Saturday, July 29, 2017

July 2017 Updates

This month was exciting in a couple of ways.

hackernews-newsfeed made the front of page of Hacker News and the Github repository has over 300 stars. It was my first project that went viral on the internet and I find the stars to lines of code ratio absolutely hilarious, since my script for the chrome extension barely contains 60 lines of code. I guess creating something that people actually want is important, and it helps that I wrote hackernews-newsfeed because I wanted it for myself above all else.

My friends and I also started working on a project that has prompted me to learn server-side, full-stack web dev, which includes Node.js, MongoDB, and Express. This has been interesting because I'm used to writing static websites with HTML and CSS exclusively. And at HackBrown this past February, the webapp that we made in node was pure trash with APIs just stapled together, so it's nice to learn good practices from the ground up.

Work-wise, I learned a lot from having lunch with some of Dell's older employees in the the group concerned with learning about new technologies. Some of the more interesting ideas I've learned is how because the Von Neumann memory bottleneck is preventing further increases in CPU processing speed, it's likely that the conventional CPU architecture will be challenged in my lifetime. For my project, I discovered that the deep learning load wasn't being allocated evenly between the GPUs in my server box, so now I'm learning parallel programming, specifically how to use a Message Passing Interface (MPI) library for C++.

I've been very interested in cryptocurrencies recently, and find the concept of smart contracts for Ethereum absolutely fascinating. I enjoy listening to Vitalik Buterin explain concepts on YouTube and reading his Medium blogs, and I messed around with writing contracts in Solidity. I am optimistic that digital currencies will be more widespread in our lifetime, but they face setbacks such as eliminating overhead for non-technical users, and more importantly, security. This month has been particular interesting with the $32M Parity wallet Ethereum heist since the vulnerability was a pretty low-level coding mistake. Now I understand why formal verification has become such a buzzword in the crypto community and I am excited to dabble in it when MIT starts.

I also experimented with mining digital currencies for the kicks and giggles, since MIT has free electricity and Robert and I have tons of Raspberry Pis and at least four computers lying idle, one of which has an i5 Intel processor. I joined a mining pool using my ThinkPad with an i7 Intel processor since my hash rate is way too low. My computer was mining Monero on 4 CPUs and it was getting pretty hot so I stopped mining after a while, but based on my calculations, I would make at most 50 cents a day. SO NOT WORTH IT.

I am very interested in the idea of passive income, especially after making some profit off of a bot I wrote in May, but which I discontinued because it wasn't ethical and I was mostly experimenting as a proof of concept. I've been dabbling with traditional investments in index funds such as Vanguard S&P 500 (VOO), but I wonder if there are other, cooler ways. I hope that if I keep an open mind, when an opportunity comes up, I will be able to see it.

In other news, I've been pretty unhappy this summer. I don't have a car here so my movements are pretty limited. Although I've been fortunate enough to make many friends here, whom I love dearly, I feel lonely in spirit. Every night, I look forward to video chatting with Robert to share thoughts and discuss ideas with him that no one else around me cares about. I underestimated the importance of being in a stimulating environment; Texas is not one of them, and I'm looking forward to going back to MIT in the fall.

Based on my recent observations, I've realized that my absolute BIGGEST pet peeve is bullshit. I enjoy interacting with people that come clean with what they're thinking and feeling, and who ask questions if they don't understand something. I don't like it when people feel a need to play up an image. Also, I can't stand busy work because my time is much too valuable. Realizing that minimizing bullshit and irrelevance in general is very important to me has shaped my values and my dreams. I can't imagine working for a place like Dell for the rest of my life, and the contempt for selling your soul to the corporate world is really resonating with me.

I should end this post on a positive note so I'm sharing one of James Franco's paintings, which by the way, are absolutely HILARIOUS.

Saturday, July 22, 2017

A Sentimental Reflection on How I Love My Computer

I remember coming to MIT with an HP computer that was falling apart at the hinge and restarted every couple hours for Windows 10 updates. I bought my HP computer for a little over $600 in 2014. Back then, I didn't know anything about computers so I picked my computer based on its beats speakers and the light up keyboard (lol!). For a $600 computer, the HP computer was a rip off.

One of my first decisions made at MIT was to buy a new laptop and switch to Linux. There were three computers I was seriously considering: a Dell XPS 13, a MacBook Pro, and a Lenovo ThinkPad. I was hard-set on using Linux and wanted a computer that lets you make changes to it, so the MacBook Pro was out. But it was only after a friend showed me his ThinkPad T460 that I made the decision to buy it. My friend helped me order his identical computer online, and other parts like SSD and RAM so that I could upgrade my ThinkPad's hardware by myself.

I've since fallen in love with my computer. I can't imagine life without it. I love the sound of the keyboard clicking when I type, the clicking after touch that reminds me of the after touch on grand pianos. I love the layout of the keyboard and how I can mouse click with my left hand thumb, so that I can click without moving my hand away from the standard keyboard position.

Most importantly, I love my computer because it does what I want it to do. Since switching to Ubuntu (a Linux distro), I've been able to understand the abstract architecture of my computer's file systems, and learn commands that let me do things I could never imagine possible on my old Windows HP. More importantly, when things broke, I could figure out why logically, instead of following instructions mindlessly like I used to for the Windows black-box. Although I am pretty familiar with Shell and Linux file systems by now, I am looking forward to learning even more about my computer, so that I can make more changes. Something tells me that I want to learn more C.

I find it really interesting that on my laptop keyboard for keys I've used a lot, the key's original surface has been rubbed off so that a glossy surface shows. This is interesting because I've been able to analyze how I like to use my keyboard. It looks like keys "a e d r t h n i" are used the most often, as well as the backspace, enter, space bar, ctrl, and shift. It also looks like I like to press the space bar with the thumb of my right hand, and the shift and ctrl key with my left hand pinky. Seeing the glossy surfaces makes me proud because it makes me feel that I'm getting value out of my computer.

I don't think I would be able to live without my computer anymore. Anytime I have free time, I whip out my ThinkPad, whether to read or to code. It feels as if my computer has become a part of me, to the point that when I use my work laptop: a Dell computer that runs Windows 10 Enterprise and has so many restrictions that the only thing I can really do is surf the web and answer emails, that lacks the clicking after touch on its keyboard and my added short cuts that I've grown used to using, I feel as if I've been placed into a cage too small to stretch in, and stripped of my identity.

It also makes me appreciate my ThinkPad so much more, the computer that I understand and understands me, who listens to me, who helps me work and learn, the computer that supports me as I further improve my knowledge about computers.

Tuesday, July 4, 2017

June 2017 Updates

I've recently started working at Dell. My official title is "Systems Engineering Intern", but I am basically doing benchmarking on server setups with machine learning algorithms. The pace of working at a large company is much slower than it is at MIT, and the work is easier. Therefore, I've been spending a lot of my free time reading about anything remotely cs related, and as a result I've improved my knowledge of the field.

So what have I been reading? I discovered the morning paper, a blog that summarizes cs papers. I also follow hacker news when I'm sick of reading about technical things. Also I forked the coding-interview-university github repo and have been following links of whatever interests me. While doing all this, I look up concepts I don't understand and spiral from there.

One thing I've realized from work is that I'm not as interested in machine learning as I thought I was. It's such a black box and it takes so long to train. I don't feel like I have any control over what's going on. Not to mention in its current state machine learning is not artificial intelligence; it's data science. On the other hand, readings about the stalling development of Intel processors, container ecosystems, and cloud computing have inspired an interest in distributed computing. With hardware speed advancements slowing down, it's likely there will be a lot of progress in this domain in the next five years.

For the last couple of days, I've been working on a Google chrome extension that replaces my Facebook newsfeed with Hacker News. I'm sick and tired of Facebook. I've tried removing the app on my phone multiple times, but I'm so addicted to the site that blocking it is counterproductive. Therefore, I decided to replace it with an equally addicting, but less stupid site: Hacker News. I just published the extension on the chrome store, which you can download here.

Something interesting about workflow is how fast time would fly by when I am stuck while working on the extension. Instead, I realized that if I walk away and go do something else, somehow I would magically know the solution when I come back. It's like my subconscious works in the background to figure things out, and I will try this *spacing time out around thinking* technique more during the school year when I work on hard problems.

In other business, I've began working out because I'm frail and I'm starting to see cellulite on my legs. I began with running a mile a day for around a week, and gradually added more exercises. Yesterday, I spent an hour at the gym and ran one mile, did 80 squats, 200 hip thrusts, and 60 10 second leg raises, not to mention various other stretches that I was too lazy to quantity. Exercising has given me a lot more energy and my legs are getting stronger.

Also, I've been partaking in various events around Austin with a group of friends. Last week, I went to a poetry slam at a bar, which was interesting because I heard issues including rape, racism, and abortion spoken through real people. The experience really legitimized these issues for me. Among other things I've done, which includes kayaking, dinner on a lake, blues on the green, and seeing the Texas capitol, I went camping with my roommate and another friend at the Enchanted Rock State Natural Area. We spent the day hiking and gazed at stars at night. It was a very surreal experience.

I guess I will end this post with some pictures that I took. Enjoy!


Dell main headquarters in Round Rock, TX

view from our campground

view from hiking

kayaking on the Colorado River in downtown Austin

view of Colorado River from shore

dinner at the Oasis overlooking this view

view at the Oasis at sunset


Saturday, May 6, 2017

Google's Secret Recruitment Portal, SIPB, Hyades: A Network Load Balancer, and more...

I haven't written a blog post in a while so I figured I would take a moment to document my life during this period.

A couple days ago, I stumbled upon a mysterious popup when I was googling terms related Google's computing infrastructure. "You're speaking our language. Up for a challenge?" it said. I was both spooked and excited. It turns out I had entered the world of Foobar, Google's secret hiring portal.


Foobar posts a series of coding challenges. Apparently when you get past level 3 or 4, it asks for your contact information and recruiter reaches out to you to offer an interview. After listening around, I found out that someone I knew got past level 5, was contacted by a recruited, and reached the project matching phase of Google recruitment process. I decided to give Foobar a shot... and it turned out to be a lot of fun.

I'm currently on level 3 and I have one challenge left to pass before advancing to level 4. Most of the challenges were fairly straightforward but I really struggled on one that asked for an implementation of Dijkstra's algorithm with a twist... something I had never seen before. Although I passed it eventually, I had to learn a lot along the way.

Foobar really highlights the art of writing good, clean code. Through doing some of the earlier challenges, I learned about Generators, and more python syntax such as "yield", "continue" (in a for loop), and "enumerate" (which can replace the ugly "for i in range(len(x)):"). I also had to consider complexity when one of my initial solutions for a challenge didn't pass because Foobar put a time limit on runtime.

Here are some screenshots of Foobar:


Outside of Foobar, I received SIPB membership a month ago for organizing SIPB CPW. SIPB is the MIT Student Information Processing Board that a friend on hall introduced me to at the beginning of the year. It was MIT's first computing club established in 1969 and is the home base for many computing enthusiasts. The SIPB office has since become a hackerspace where people come together to work together on projects.

As part of SIPB, I am currently working on Hyades, a network load balancer, with a group of other SIPBians. Hyades is our attempt at creating an open-source version of Google's Maglev [1] to use for MIT's services and beyond. Our team has been meeting every Saturday to work on it and I've learned about what it means to organize and work on a large scale technical project in a group dynamic.

The most difficult part of Hyades is understanding design choices based almost solely on information gathered from the paper Google released in 2016 describing Maglev. Equally hard is breaking these design choices down into modules that our team members can each work on to piece together the project as a whole in the end. I've learned a lot, not only about the nitty gritty about how networking works, such as how to design and implement a load balancer health checker, but also how to design and break down large technical projects into pieces that a team can work on collaboratively.

Overall, I'm having a really great time at MIT and I'm looking forward to working on machine learning at Dell this summer. Since it's getting close to the end of the year, I will probably write an article sometime later detailing my reflections on my first year at MIT.

When bogged down by psets and grades, sometimes I forget how lucky I am to be at the greatest technical institute in the world, how lucky I am to able experience on a daily basis an institute famous enough to attract regular tourists. Life is good.

[1] https://research.google.com/pubs/pub44824.html

Friday, March 24, 2017

My First Google Chrome Extension! And Asynchronous Functions in Javascript

A while ago I published my first Google chrome extension, which you can find here. Basically the extension is an assignment tracker that turns your new tab page into a notepad. It also allows you to highlight text in the browser and right-click to add it to the assignment tracker clipboard.

Although the new tab notepad idea has already been implemented before, I wanted a notepad that would allow me to add text I see in my browser to the notepad without copying and pasting and without opening the new tabs window. My extension Assignment Tracker solves this problem.

The Assignment Tracker was easy to implement because I was able to study code of other google extensions I found on Github, but the add assignment part of my extension was performing unreliably. Fortunately, I discovered the problem later during Incube*.

At Incube, my friends and I are working on an extension that creates a dislike button for Facebook, and I discovered Assignment Tracker's problem while trying to fix something similar. It turns out that there exists something called an Asynchronous method invocation.

In my extension, I was using the chrome.storage API to store text users added to their assignment tracker clipboard, but chrome.storage is designed to be asynchronous; other processes can happen while the chrome.storage function completes. This messed up the chronology of how text was stored and updated on the new tabs page. As a result, selected text didn't always show up on the new tabs clipboard.

I used the get and set functions of chrome.storage to retrieve and edit stored text. These functions take two parameters: the first is the variable we want to retrieve or modify, and the second is the function that will be called after the get or set function has completed.

By nesting the set function inside the second function parameter of the get, I was reliably able to modify the clipboard text to include the new highlighted text information. I have included my solution in the following excerpt:

function add(event) {
  if (event.selectionText) {
    alert("Added to Assignment Tracker: \n\n" + event.selectionText);

    chrome.storage.sync.get("data", function(object) {
      text = object.data;

      if (text === "undefined") newtext = event.selectionText;
      else newtext = event.selectionText + "\n\n" + text;

      chrome.storage.sync.set({ "data" : newtext }, function() {
      if (chrome.runtime.error) console.log("Runtime error.");
      });
    });
  };
};

I am still trying to learn JavaScript so this stack overflow answer may be able to explain the situation more clearly. Because of this annoying experience, I also learned about the bad programming practice of callback hell.


A quote really stood out to me from the callback hell article that I linked above:
"Write small modules that each do one thing, and assemble them into other modules that do a bigger thing. You can't get into callback hell if you don't go there." 
- Isaac Schlueter (creator of npm)

In the future, I will be more careful to avoid writing modules that are too big and hard to debug.

Cheers!

* Incube is an organization where a bunch of people work on projects and eat Indian food together.

Friday, March 17, 2017

The End of Midterms and UROPing

This week was a stressful week because I had two midterms that each counted for around 16% of my grade. Although my classes this semester are definitely more interesting, I miss PNR and not having to care about my grades. I read online that it is relatively easier to get Bs at MIT, but much harder to get As. Because I want to qualify for MEng, I will need to get at least one-third As.

Outside of my classes, I spent around 6 hours working on a program called audio-pass, which I am developing as part of my UROP. Audio-pass takes live sound inputs and slows it down a given percentage. It is the first program that I've worked on in C, and C is very different than Python. For example, parsing arrays is much more difficult, libraries are harder to import, and one has to consider memory allocation. Nonetheless, I am am enjoying this learning experience.

Today, I wrote tests for and improved a function that reads an array from a given index to the last modified index and writes it to another array. I also implemented a plot function that behaves like matplotlib in python, but directly calls a command-line program called gnuplot to plot data.

Here's the cute little graph that took way too long to figure out!

I am grateful for not only learning a new language C, but also for developing good software development habits such as writing tests for every function and checking for differences in code before sending pull requests on git. My UROP adviser also taught me many other useful git commands like how to deal with merge conflicts.

Life is good.

Thursday, February 2, 2017

SICP: Lisp and the Y Combinator

Today was the last lecture of 6.037: Structures and Interpretations of Computer Programs (SICP) which is the condensed version of the legendary 6.001 previously taught at MIT by famous professors Hal Abelson and Gerry Sussman, and more recently, Eric Grimson. SICP is taught in scheme (a dialect of Lisp). However, the course is more about teaching you how to think about designing computer programs than the language in itself.

SICP was an amazing class. It inspired the perfect mix of confusion and fascination that makes me want to continue understanding more, as if SICP had inducted me into a secret society of hackers who are able to appreciate computer science in a way unbeknownst to even CS majors. Ironically, I was presented with a button today that officially inducted me into the Knights of the Lambda Calculus.




I actually first learned about Lisp through reading Paul Graham's essays around a year ago before starting school at MIT. I'm a huge fan of Paul Graham and Paul Graham loves Lisp, so I developed a curiosity for Lisp, which prompted me to take 6.037. I never understood that Paul Graham's firm's name Y Combinator meant anything more until today's lecture, when the instructor talked about lambda calculus, which was introduced by Alonzo Church as a way of expressing computation (equivalent to the Turing machine).  Church's idea means that any program can be expressed solely through a series of lambda expressions. I learned today that the y-combinator is a way of supporting recursion through only implementing lambda expressions.

It was so uncanny getting the Knights of the Lambda Calculus button, seeing the y-combinator on it, and finally understanding what the name of Paul Graham's firm means. It feels almost cosmic, as if Paul Graham had inspired me to take 6.037 through his essays, and on the last day of class, I received a button that said the y-combinator on it, reinforcing the origin of my desire to learn Lisp.

Perhaps this is the cosmic way of congratulating me on my time at MIT so far: a pat on the back for everything I've learned here, and validation for my actions thus far towards getting where I would like to be in the future.