Argument Duality

One of the most fascinating things I’ve realized is that for every argument, the same set of facts or assumptions can be used for a counterargument. By examining the argument and going down deep enough or generalizing the meaning of the words through their ambiguity, there’s a high possibility that you can extract out a counter argument.

Here are a couple of examples:

Warning: I may not agree with everything stated below.

Life is short. So you should make the best of it.

Life is short. So short that whatever you do doesn’t matter. At all.

All life is precious. So we should not support abortion.

All life is precious.We should not force babies to be born in a world where their parents didn’t want them, if life is precious.

It’s a once in a lifetime opportunity. You need to come to this event.

it’s a once in a lifetime opportunity. Staying at home is a once in a lifetime opportunity(technically the truth).

Always Have Backups

Always have backups. Whether that be things in real life or in the cyberspace.

So the ultimate irony is that while I was writing this post I my original writing went away. So.. I’m putting my drafts on Google docs now =/. BUT - the advice is always back up your things, there are things that you must do for backups to be effective. First, make sure you check that the backups are working, and subsequently do simple maintenance on backups.

In cyberspace, I use backup services like DropBox, or use version control like git. But what you have to realize that you can have backups in real life too!

Back in college, one of my good buddies Chris gave me an amazing piece of advice. He was a non-traditional college student who had a stint at the Army, so he definitely knew a few life hacks. He told me that there could be cases where he would get excessively drunk. Of course, bad things can happen if one is ever that drunk…. There’s a possibility that it would be 5 am and he could have lost all his stuff an hour ago. So he always carried a 20 dollar bill beneath the sole of his shoe.

This is really smart. So this is what I started doing, and I do have some sense of safety with the backup. Often times back in college, if I didn’t bring my wallet, I’d use that bill to go grab a drink. Nowadays, I also carry around a 20 dollar bill on the back of my phone too - it’s useful, mainly on the principle that you forget about it. It’s nice to know that if you get robbed or just forget all your stuff, you still have some cash to fall back on. Or to buy metro card in New York City =D.

In general, if you can afford it, it’s nice to have duplicate copies of all your necessities. It could be a hassle or be costly now, but it will save dividends on that off chance that your first item goes missing, or if you cannot acquire it anymore. An instance of this is when manufacturers discontinue your favorite products. This unfortunately happened with my favorite mouse - G303 Apex. Logitech stopped making it, and the price of the mouse went from $30 to around $200. I still regret not buying extra ones… If money isn’t a concern, it’s good to stock up on your favorite items goods.

Other things I back up in life:

Computer charger? I keep one in my backpack but also one in my workplace and office. I also carry around a portable battery pack inside my jacket, because one time I got stranded in the middle of Manhattan with a dead phone. Nope, not doing that again.

Earphones? I have a backup earphone in my main carry gym bag as well as my backpack. Also one in my keychain pouch.

Glasses? I’m effectively blind if I don’t have them. There’s a spare pair in my backpack as well as my car.

Recently, I’ve been going to the gym, and what always irks me is that I always forget something. I forget my workout shirt one day. I’ve also forgotten my underwear as well. Then the deodorant. Then the towel. All of these are non-critical. There are workarounds… but the workarounds are not fun either.

At a certain point, I thought… damn this is stupid. Enough is enough. I allocated a separate compartment in my bag so I have a spare set of everything. Now I carry two pairs of underwear, two pairs of socks, two bars of soap, etc. So far the problems have went away, and I think it’ll be fine as long as I do some maintenance on my gym bag.

But with respect to the backups, what’s fascinating is that if you’re relying on having at least one object to be functional, it only takes a one critical path for failure. All other paths will turn out to be a good outcome. This can be modeled as a tree!

Consider this toy problem: we want at least one computer to be functional at one time. It would look something like this if we had three computers:

For catastrophic failure where nothing is available, there’s only one branch that you have to take that will cause a catastrophic failure. For each computer/(or any kind of object), you are adding another layer of the 2^n tree. Thus, your probability of failure would be 1 - p^n, where p is the probability of failure of that one thing(Of course, we’re making a lot of assumptions here).

Furthermore, if we assume p = 0.05. The graph of it would look like this:

This, depending on your use case, you should decide on how many copies or n backups to have. The failure rate will determine the reliability. In general, What’s fascinating is the drop from adding one additional backup - 0.95 vs. 0.9975.But at a certain point backups aren’t worth it. It’s up to you the designer to choose that cutoff point. For me and my life, usually 2 backups seem to be a good rule of thumb.

My First Onsite Interviews in Seattle

I had my onsite interviews for two companies that I’d like to work for this past week in Seattle. I don’t think I got those jobs, because there’s so many things that I could have done better. But given what I knew then, I’m not sure if I can do significantly better. But if I knew what I know now, I would:

  1. Focus on writing code a lot faster. I think one of the problems is I take too much time writing code.
  2. When someone is watching you and you’re being graded while you’re on a whiteboard, you tend to choke. So my advice to myself next time is.. do as many mock interviews as possible. Sure, you need to do a ton of problems to be able to identify what the problems types are, but there’s no point in doing this if you are not comfortable explaining your thought process to the interviewer. There’s a chance that you will completely bomb the interview because you didn’t practice explaining your thoughts and communicating effectively.
  3. Expand and detail all the answers. Be as explicit as possible. It’s better to throw out all the things on your mind, even if it’s wrong, rather than leave the interviewer in the dark. They might also help you if you throw out a good idea, even if you think it is bad. It might actually be good.
  4. Focus on really understanding the principles behind solving each problem. Personally, I think it’s important that you understand a few set of problems very well to explain the reasoning and approaches, rather than shotgun the total number of problems. Simply put, if you can’t explain how to solve the problem and your approach, i.e. explain why the asymptotic run time is the way it is, then you’ve memorized the problem. You never understood it. What I find that is helpful is that when I’m seeing other people’s implementations, it’s so much helpful to always go through the solution code on a concrete example. If I could do the interview prep all over, I’d summarize the big principle takeaways for all the problems I do and drill it down. Maybe even make a YouTube video for them.
  5. Screw the job part. Go in there to learn and have fun. I think this mindset is powerful and effective.
  6. When the interviewer give you a hint, or tries to lead you to the right direction. Drop the approach you’ve taken and seriously consider what he’s trying to tell you. Seriously. Stop. DO NOT GET STUCK IN A LOCAL MINIMUM. And look deeply and wide about what you’re doing. Ugh. I think this is the most important part I need to work on. But it’s so hard to get out of tunnel vision mode.

Anyhoo, I did definitely learn a lot, and for my next set of jobs I am looking forward to improving my skills with these newfound lessons.

My Inventions (2019 Book #1)

I read an Autobiography of Tesla called My Inventions.

I thought this book was pivotal and enlightening. It was a rather short read of ~80 pages. I highlighted and took notes of the important points of the book. There was one gem there that I found that was fascinating, which I will bold below. Here are my thoughts on the book:

  1. Early impulses shape our destinies. Tesla talks a lot about his early childhood and how that shaped who he ultimately became. I think this is true - if you are struggling to find a calling in life, one valid strategy is to dig deeper as to what you spent a lot of your time during your childhood - it may shed some light onto your natural tendencies and talents.
  2. Tesla went through a lot of training with his father on memory games, reasoning skills, repeating long sentences, doing mental calculations, etc. Theyhey were pivotal to setting the master inventor on the right track and gave him an advantage.
  3. There are things the man was born with. He had an extremely good visual memory. Even when he was little, he had this problem where random images would show up, he’d see it, and they’d be on his eyes for a while. He said he saw a lot of images show up in front of him as a kid followed by random flashes of light. He didn’t need pens or imagery - he could always visualize things on his mind.
  4. If you focus too much on the detail, you lose track of the main, overarching idea. He emphasizes this that he would continuously refine his inventions and crank out every detail, but sometimes he would lose the big principles on how the invention works because he was in the weeds.
  5. The man seemed super concerned about his diet and well-being. Seemed like he didn’t even drink coffee or alcohol, thinking that it would do damage to the artery of his brain.
  6. His parents wanted him to be a religious man. He dreaded going into the clergy. At a certain point, he got infected with cholera and almost died. He said to his father, “Perhaps I may get well if you let me study engineering.” His father replied saying, “You will go to the finest technical institution in the world.” He got better, and afterwards he took a gap year roaming the mountains with a bundle of books on his back to strengthen his body.
  7. What surprised me was that the man was already a genius himself, but he had a ridiculous work ethic. In his first year in college, he studied from 3 AM to 11 PM and did not skip weekends or holidays. He also thought that he squandered his youth in the library because he thought he spent his best years in the library. When he met Edison, he thought Edison knew so little compared to his reputation and says that at that point he was glad that he spent all that time learning. Anyhow, I was inspired by his work ethic. Even when he worked for Edison, he worked from 10:30 AM to 5 AM the next morning. Edison apparently remarked, “I have had many hardworking assistants, but you take the cake.” This was the most interesting part. When we think of geniuses, we tend to think that they have the world handed to them and they tend to work less. But it’s amazing that someone with Tesla’s intellect would work these crazy hours and have that level of passion. It was inspiring, and it made me a little bit ashamed that I wasn’t working hard to learn as much as Tesla. Someone with such innate talent.
  8. Tesla talks about how he theorizes that the longer he focuses on one object, the more toxic agents build up. He says that with enough of this toxic accumulation, his brain slows down to a crawl for almost exactly 30 minutes. Afterwards, when he turns to other work unrelated to the work that caused his brain to crawl, he finds that he would have breakthroughs on what he was previously working on. It’s interesting how the brain DOES do work in the background. My thought is that by not focusing on something, your brains takes itself out of a local minimum.
  9. A small story he mentions is that as a kid, he throw snowballs down a mountain and see how they would become huge. He states how subtle influences can drastically change our destiny. It really made me think about life in general. Small changes today could lead to big changes by the virtue of this principle 10 years from now.

Graphs and Chipotle

Today I did these things:

  1. I worked on homework for my part time grad school class(Computer Networks). It involved a graphs and I probably spent too much time on it because my understanding wasn’t super clear.
  2. I went to Chipotle.
  3. Slept a ton. Probably the most relaxing Sunday I had in weeks. It’s nice that my sleep problems have gone away. Didn’t planning on going to RC until I got this Computer Networks assignment off my back. By the time it was off my back it was too late. However, I found out about the 24 hour convenience store nearby though =D.

(1) For the grad school class, I struggled a hell of a lot on implementing the Bellman-Ford Algorithm in a distributed manner. What threw me off was that it was so different because the question asked you to take the algorithm, but implement only a subcomponent of it which applied to distributed systems. As in instead of calculating everything from scratch, the nodes passed a partially completed computation to you so you had to complete the algorithm from the partial result. Of course, there were a couple of details and edge cases that needed to be ironed out. I thought that was tough, mainly because I went down a rabbit hole of trying to implement the entire thing instead of using the partial computation. This video was super helpful: https://www.youtube.com/watch?v=dmS1t2twFrI

It was a baffling experience. The example they gave for the assignment didn’t match with my understanding of Bellman-Ford at all because it only focused on a specific subprocess.

When I approached this problem, I tried to read up on all the assignment material, to cover my bases. But some parts of it didn’t make sense, because I didn’t really attempt the problem. This leads me to wonder what the most effective way to tackle any kind of challenge. Is it to read up on the material before tackling the assignment? But if you do that too much, you lose touch with the assignment. On the other hand, you might be reading up irrelevant things without attempting the assignment. However, if you attempt the assignment without reading, how do you even know what you don’t know?!! After 10+ years of learning, I don’t know what the optimal strategy is… maybe it’s a mix of both?!

So this week, I want to dig deeper into graph algorithms and really understand how they work. I think I just had a shallow understanding which caused all this confuddling. I need to dig deeper into it - the math jazz, the whole 100 yards, and all. And try to solve as many graph problems as possible. Last week I was studying Dijkstra’s and for the longest time it didn’t click why we took the shortest path to the current vertex as the next node to be evaluated. Then it clicked: We’re effectively eliminating the shortest link at each iteration when we’re picking the smallest path. The best way to describe it is to evaluate all possibilities(expand), update the paths to that possibilities, and pick the smallest distance node so we can effectively rule that node out(shrink). I think there needs to be a blog post about this, but at one point, that procedure clicked.

(2) There was a Chipotle nearby. There’s so many Chipotles in New York city. I saw one on Google Maps, but I walked past it after taking a look at it with my phone - I subconsciously filtered it out. Anyhoo, I go, and get my usual order. The server gave me a TON of food because she was distracted by her colleagues. Besides that, I got to sit facing the window, and people watched as I ate. What was fascinating was that when I first walked in, the right side door was closed so people had to walk in using the left side door. When I first walked in, I tried opening the right door and realized that it didn’t work. So I came in through the left.

I was sitting next to the door facing the street, this kept happening:

  1. Person tried to open right door.
  2. Right door doesn’t work.
  3. Person tries left door.
  4. Comes in through left door.

It happened at least 30 times while I ate. It was **ing crazy. All that was needed was a sign saying that the left door was closed. But collectively everybody kept making the same mistakes.

It led to think: Christ, I wonder how much time we’ve wasted as a human collective over the ages making the same mistake over and over and over and over and over and over and over…

The only way we can warn people to NOT make the same mistakes is to tell them.

For major mistakes, people usually write about it. Through a book. But to be warned, you have to read the SIGN. Similarly, you have to READ the book. So now I’m sitting here wondering if there’s a better way to really drill it down to the future generation to not make the same mistakes that never worked…

Site built with http://lanyon.getpoole.com/ template. Thanks to @mdo for the original template!