Wednesday, December 10, 2014

The Value of a Pure Math Degree

Sometimes, I joke that this post should be intentionally left blank.

But it's not really true. At the very least, studying pure math helped me understand the first chapter of Lange's Applied Probability, and get far enough into the book to understand a much more concise solution to Buffon's Needle Problem than the one on wikipedia.


In day to day life though, knowing what measurability mean or what Borel sets are could hardly be called useful. The value of a pure math degree, for non-tenure-track mathematicians, comes ~80% from satisfying a curiosity (or what some would call intellectual masturbation).

The real value comes from learning how to think. This isn't unique to pure math though: students of a number of disciplines will likely say that it is what they learned from the course of study. Each field, however, would choose a different focus and a different kind of thought process. A philosophy student would think differently from an engineering student, who would think differently from a biology or a law student.

So what makes pure math thinking unique? I think it is several things, some of which are:

  1. Decoding complex notations
  2. Going back and forth between the "abstract" and the tangible example
  3. A focus on details, especially the "edge cases"

...which all come from understanding and analyzing proofs of all types.

So let's break it down.

Decoding Complex Notations

This was actually a goal of mine while studying pure math. I wanted to become comfortable with reading mathematical notations, and not be afraid of them in books and papers. Like reading other people's code, reading other people's proofs were the most dreaded task for me. Grading second year "advanced level" linear algebra was the worst.

But reading math is more difficult than just understanding and being comfortable with notations. There was a blog post from the beginning of the year about how reading code is not like reading literature. Here's a choice quote from that blog post:

We don’t read code, we decode it. We examine it. A piece of code is not literature; it is a specimen. 
It's really the same thing with proofs. We don't read proofs. We decode proofs. We don't really understand a proof unless we make it ours.

While reading code is still difficult for me, I think my education has helped lessen that barrier.

Abstract vs Tangible

In one of his books, Feynman talked about how during every discussion about something abstract, he would follow along with something tangible in mind. In another story that a professor had told, a grad students had proved interesting things about functions that satisfy some criteria, only to find during a presentation that the only functions that satisfied those criteria were the constant functions.

This ability to keep both the abstract and the tangible in mind is crucial for understanding mathematics, and a way of thinking pretty unique to the field (and maybe perhaps computer science as well: I sometimes joke that the math in computer science is like applied pure math).

Related to this is looking at various tangible examples, and extract the abstract features that are common to all examples. It is often easy to recognize that there is some kind of common structure, but the structure can be difficult to describe without the right set of language in your toolbox. (Again, this may apply more so to computer scientists and good programmers).

Edge Cases

Proofs are hard because of all the edge cases that one has to consider. I haven't encountered these questions in Waterloo, but in some institutions "PODASIP" problems are typical. PODASIP stands for: "prove or disprove and salvage if possible", which basically means that for a given claim, the task is to see if the claim is true or not, and if it isn't, modify the claim so that it is (non-trivially) true.

I find that the best way to tackle those problems is to look first for counter-examples to the claim. A claim usually falls apart in extreme cases, so those were good starting points. An understanding of the extreme cases would lead either to a counter-example, or to an understanding of why the claim works, and thus a proof.

So, a pure math student learns to think like a lawyer, except not with legal language but with formal claims.


So, in summary, like some other degrees, a pure math degree is one that teaches you how to think. But all degrees that teach you how to think focuses on different types of thinking.

In hindsight, I may have preferred a degree that teaches similar thinking principles while teaching something more useful. Still, no regrets though because a lot of those "more useful" ideas are much more easily learned with the toolkits I now have available, like an understanding of abstract algebra and measure theory.

Monday, December 1, 2014

Dream Donut Test

I don't know what it is about life and donuts that lend themselves to comparison. A while back this comic circled around. It uses a donut analogy to explain why life is worth living despite that we would all eventually die. It's a pretty interesting comic, so go see it --

http://www.stanleycolors.com/2013/12/life-donuts/

The comic and the analogy really hit a spot because like many others, I've dealt with some form of existential depression -- I'm not not intelligent enough to have the full-blown version, but reading about it for the first time was an emotional experience. I, too, thought that life was a donut, but for a different reason. Donuts were addictive yet void of nutritional value, and I thought life was like that. We chose to live not because of a conscious decision, but because we are shameless addicts who take our addictions for granted.

That's why the comic failed to comfort me. Its argument is based on leaving our donut-loving-addict-ness unquestioned. Yes, I'm asking you the question:
"Why should we even like donuts?"
to which a reasonable answer might be:
"Because they taste good."
...but of course I knew that as well as you, so I explain,
"Yes, but why should we like things because they taste good?"
which doesn't sound like a question that makes sense. After an afternoon of discussion, we might get to the question: why should pleasure be intrinsically worthwhile or meaningful? It's really hard to answer without begging the question.

This all sounds pretty depressing. Thankfully, my interest in depressing blog posts has waned. Instead, I'd like to offer an alternative to Stanley's "donut analogy" as to why one should live. It is what I call the "dream test".

Suppose that you are having a lucid dream -- a kind of dream where the dreamer knows they're dreaming. You've been in the dream for long enough that you don't recall who you really are, but you do know that it's a dream that would eventually be over. What would you do in that case? Would you just try very hard to wake up just because you'll eventually have to wake up?

Hell no! You're in a lucid dream! If you've been in a lucid dream, you'll know that there are so many fun things to do in such dreams. Fly around. Try to teleport. Make things appear and disappear. Make yourself invisible. Explore this dream state.

Sure there aren't many inherent value in things. Dream donuts might taste good but there is no point in accumulating as many of them as possible. They'll all disappear once you wake up.

But, the experience itself has value outside of the dream. Once you wake up, that experience stays with you. The knowledge, the (self?) understanding, and the experience all stay. Maybe this is why spending money on acquiring experiences makes people happiest.

So here's my answer to the kid in the comic:
What's the point of all this? Why live if we're gonna die anyways?
Well, remember the last time you had a dream? What if you suddenly realized that you're dreaming, and can control things in the dream? Pretty neat huh? In that case, wouldn't you want to explore, and see what you're capable of? Would you think about trying to wake yourself up, just because you know that the dream is going to eventually end?
No! Because the dream is going to be an interesting experience. Sure it might be short, and sometimes scary, and sometime sad, but you can experience a lot and learn a lot about yourself. 
...and at the end of the day, you will having one interesting story to remember and share. Who knows, maybe the experience that we're building up in "real life" will be meaningful somehow too.
The difference is that the focus here is on experience rather than pleasure. It is easier for me to accept that experience might be of importance after we die, and that thus dying now is equivalent to dying later. It is a lot harder to say the same about pleasure. (I'm not certain what's going to happen when we do die, but I sure would bet that experiences have a higher likelihood of persisting compared to, say, donuts.)

I sometimes use this "dream test" to tell if a goal or aspiration makes sense, given that we don't live forever: suppose you're hit by a bus and enter a very deep sleep. While you're asleep, you dream that you've gone through the process of achieving that goal, or became what you aspired to be. Would you be content, knowing that that had only been a dream?

If you are content with having the experience of achieving that goal, then you will probably say yes. If you are looking for the effect of achieving the goal, then you will probably say no.

If you said "no", then you might want to think twice about working towards that goal.

Saturday, November 29, 2014

Watching Sports

I watched a basketball game for the first time, a Raptor's game at the ACC.

Those who know me know that I'm not exactly a sports fan. Of course, it's impossible to grow up in North American without having watched any sport on TV. Seeing it in person gave it a slightly different perspective.

Camera positions and angles makes it easy to give the perception that the viewer is right there on the court. Because it is the focus, the outcome of the match seems of utmost importance. Paradoxically, when watching a game in person, you are really watching slightly further away, giving more perspective. From where I sat, it looked rather silly and unimportant. It looked like what it is: a game.

What surprised me the most, though, was the hostility towards the visiting team. Yes, I've heard of the term "home team advantage", and thought that it was referring to (a) not having to travel, (b) not having to worry about time zone differences, and (c) having fans that would cheer for you. The difference in the amount of time spent announcing the opening players is one thing, but actually trying to distract the visiting players during a penalty shot? That's another. Even the refereeing seemed off.

All in all, I can understand why one can become so absorbed in this. There is the "we" versus "them" that unites the fans. There is the accessibility of the game (who hasn't played basketball?). There is also the idea that anything can happen, and that the fans can make a difference, however minute.

Sunday, March 2, 2014

I moved to Toronto, and blogging

So, I moved to Toronto.

Every time I move to a new place, I think of it as a new beginning, and try to live a bit more like the ideal me in my mind: getting up earlier, reading more, exercising more, cleaner, better, healthier, and... blogging more.

It usually doesn't last very long. Maybe one habit would stick for more than a week or two, then I would be back to my boring old self. Yet every time, at a brand new room or apartment, I can't help but try again. It's kind of like a new year's resolution. You might know that you won't make it until the end of the year, but if it motivates you to live better for one month, or even one week -- that's still a positive change!

So yes, like everyone else out there who has a blog, I want to write more.

The thing that prevents me from writing more is that I take blog posts very seriously. After all, if I'm going to take your attention away from something else, it had better well be worth it. I like there to be a central thesis (which is difficult to distill down to), solid arguments (which are difficult to construct), and reasonable flow (which means writing and re-writing). It is possible to write several paragraphs, then realize that the central thesis had been wrong, and take a different perspective. This is why writing is so great for you: it forces you to organize your thoughts, and forces you to face the inconsistencies in your thought process.

So, maybe it's the writing and not the publishing that is more important for bloggers.

Incidentally, one experiment I tried a couple of years back is promising to write something every day. I had a list of ideas back then, and those were bite-sized thoughts that could be hashed out into an article in a reasonable amount of time. Though the experiment didn't last as long, it was clear that those posts did not actually provide that much value.

What actually did provide a lot of value are posts that I spent many days researching and perfecting. They were some of the more difficult posts to write, either because they are technical or because they are very close to heart (so close that I'd contemplate whether or not to post them at all). In fact, at least half of pageviews come from older posts that had gone viral, and newer, crisper posts have little traffic in comparison.

So, well, what is the point of all this? Well, I don't know, this is actually just a rant. I guess I'm actually going against my own advice about taking time to write quality posts as opposed to publishing. (...to, er, illustrate the point about inconsistencies!) I guess the point is... there will be triggers in your life that encourages you to become a better person. Even if those triggers don't give you enough momentum to change who you are, it can take you one step in the right direction, for however short a duration. And that is good. So long as you maximize for the right things. Unlike me.

Tuesday, February 11, 2014

Back, thank you, and moving on

Hello, blog. It's been a while since I last wrote here. I was spending some time in a (figurative) cave, trying to understand a couple of things. Last time we spoke, I was working on Polychart, a data visualization startup that was taking the flexibility of tools like Tableau and bringing it to the web. It’s a neat idea, really, and we built an awesome team behind the idea. It was also a great learning experience, being a first-time entrepreneur.

Judging by the past tense used in the last paragraph, you probably realize that this is not what I will be doing in the future. You’re right. We turned down the investment we were about to get, knowing that it wasn’t going to be the right path for us. We’ve just open sourced Polychart to share what we’ve built, to make it more useful as an easy way to visually explore databases. You should check it out if you haven’t already.

We hear many discussions about "finding oneself", especially from young people. We sometimes take to travelling, long periods of solitude, recklessness, or drugs to achieve that purpose. Ancient greeks, too, thought that “know thyself” is worthy enough of an aphorism to be carved in front of temples. Their interpretation of the aphorism might be slightly different, and involve fewer psychedelics. While Polychart was no psychedelic (for the most part), running a startup turned out to be a great way to find oneself.

What does it mean to know oneself? I interpret it as an understanding of one’s goals, likes, and dislikes. Knowing what you like is easy -- for me, I loved running the engineering organization and building the technical team. The hard part is drawing the line between bettering oneself, and attempting to be someone one is not. I thought that learning to sell and pitch would be things I could do to develop myself. Would I be able to eventually learn to be great at it? Maybe? Eventually I have to admit that, well, perhaps not. Perhaps I won't enjoy it. Perhaps my talents should be focused elsewhere.

So, I'm moving on.

Before saying anything else, I want to thank everyone who had supported Polychart, and had come along for the ride. I hope you got as much out of it as I did. Thank you --

Jeeyoung Kim: for starting this amazing journey with me and putting up with me for as long as you did
Samsons Hu: for believing in Polychart when few others did, and taking it to the next level
Fravic Fernando: for being a part of Polychart, the whole way through
Tina Lorentz: for seeing and teaching us what we didn't know (seriously, I learned so much from you)
Anjida, Sina, Alex: for teaching us the importance of team building
Zach Kocher: for supporting us when few others did
Raymond Cheng: for understanding and being passionate about what we stood for
Tim McLean: for quickly picking up whatever expertise we lacked
Luc Ritchie: for adapting to new roles when we needed it
Kevin Mendoza: for supporting us in one of the most interesting times
Christoph & Ronuk: for helping us with engineering expertise we did not have
Mike Kirkup: for helping us in many, many different ways, for over two years
Brett Shellhammer: for being our moral support, all the way through
Ted Livingston: for getting us started on this journey, and teaching us to pursue our passions
David Crow: for believing in us, and guiding us to choose Polychart
Ali Asaria: for funding us indirectly, in at least three different ways now?
Jesse Rodgers: for teaching us the importance of credibility and namedropping :)
Andy Yang: for believing in us, funding us, and understanding us when we moved on
William, AK, Dale: for providing guidance, assistance, and friendship
Darren, Danny, Peter: for providing many introductions
Lin Fan: for the many questions you answered
Cameron Marlow: for inspiring me, supporting us, giving us confidence, and for being so kind
...and everyone else who has helped us in this journey. Thank you.

I will be continuing to support Polychart whenever I can. I'd also like to introduce you to my new home, another startup in Toronto called Rubikloud. I'm really excited to tell you that I'll be joining Rubikloud as the VP of Engineering. The best part about Polychart was running its engineering operations, and so I'm really excited about this new role. You should check out Rubikloud, especially if you run an e-commerce shop or if you're a data scientist looking for your next step!

Once again, to everyone who helped me on this journey, thank you.

End of Entry