Upcoming Technologies

At this time, I think there are two areas that I’d like to focus. Apologies for the mainstream nature of the posts. This is all I see on Hacker News lately.

1. Artificial Intelligence

I think this will drastically change our society for the better. AI really has the power to uproot many industries.

Through my experience reading up on it and taking online courses, it seems like we’re so far from this concept called general artificial intelligence. Very far from it. To build a learning machine like a human is from a daunting task. The main reason I would think so is because we as human beings don’t understand enough about ourselves and how our brains work.

I’m willing to bet that we won’t be able to crack it in the next 10 years. But for sure in our lifetime.

Side note: I always read posts about how data hungry modern AI systems are. I get that, but consider us, the humans! We have millions of receptors in our eyes sampling more than 60 frames per second. People are just data collecting machines. We also generate huge amounts of data collected as well. I read some article on the main differentiation between humans and other species is that they have the prefrontal cortex which is massively beneficial in predicting the future and playing out different scenarios. In essence, I think it’s unfair to say that the state of the art machine learning algorithms are data hungry when we also are incredibly data starving.

Thus, to say that AI is data hungry doesn’t seem like a feasible argument. However, the argument that it can’t generalize well from the massive amount of data is reasonable.

Bill Gates said that a company who invents a general form of artificial intelligence would be worth 10 Microsofts.

I think it would be worth more. A lot more.

Consider this: Every one of us defined by our genetic makeup. And to some degree, all of us perceive the world differently based on our experiences and build up our skills around this “data”. Now the question is, can we make mockups of that process?

If we can spin these people emulators like Docker containers it would be crazy. These AI simulations of people don’t have to be at 100%. They can be less than half way there, but if you can have thousands of them with the correct behavior it would be like having your own mini kingdom. Considering that many high paying jobs in modern society is being stuck to a screen for 8 hours… can’t all that be automated through highly advanced software 24 hours a day 7 days a week? To deploy an artificial intelligence workforce at the press of a button would awesome and terrifying.

Think about organizations. They’re made up of departments with people who have different skillsets. Will there ever be a point - where some company can generate millions of artificial intelligence workers to make an entire organization with a click of a button? Hmm…

2. Decentralized Applications

I think there’s fundamentally something wrong about content creation. For example, whenever we write a review on Glassdoor, or on Yelp, or post on Instagram or Facebook, why are even handing all of our information to these massive companies to wrangle and wrestle out all these insights about us without our explicit knowledge? Why do they get to censor what reviews are trash and what reviews should be on top? Should they really be gatekeepers of content?

It seems counter-intuitive. Everything that we do, everything that we create, should be our property. We should know exactly who has it, and how it is being used, among others.

I read this post recently and I think this is far ahead of it’s time.

The premise is that we should separate the data layer from the view layer. We’re not there, but we should get there. This decoupling would do great good for society and defuse all the power that megacorpoations are amassing. However, there are significant hurdles so I don’t think it’s likely that it will happen soon…

But think about it. What if you can separate the facebook view from the data? You can have custom Facebook views instead of the common dark blue. Depending on your permissions, what if you can choose from multiple companies to pick out the feed that you like the most? Or if you don’t want any advertising, what if you can pay one company to host your data, and another view generating company to curate your custom feed with no ads, for some monthly fee? And why should we have one algorithm that determines what our feed shows us? Shouldn’t there be a marketplace tailored to different individuals, and have companies fight for whoever can come up with the savvyest machine learning algorithms to give us content from our data?

With respect to blockchain, maybe cryptography isn’t the driving feature of blockchain technology - it’s probably the distributed nature of the technology. What i find ingenious is the coupling of maintenance of the distributed network with incentives to keep the technology up and running by paying people. To keep the network running, you must have multiple nodes verifying the transactions. There’s a built in incentive structure for multiple parties to keep all records, which to me is fascinating.

So with respect to blockchain, I think the underlying concepts behind it are amazing, but not necessarily the actual technology that hodge podges so many different computer science concepts in a unique way.

Overall, I look forward to how our society changes with these technologies in the upcoming years.

Pair Programming, Abstractions, Flimsiness

This is a chain of topics into one post on things I’ve thought about the last week.

Pair Programming

I finally got a chance to pair up with a slippery creature at RC. Nevermind it wasn’t him - I was the slippery creature. It was because every time he asked to work on things together I had to do something else.

But before he left Recurse Center, I got to pair with him on a couple of leetcode problems. It was so interesting.

He blazed through all the problems for that day, and left me speechless. I definitely learned a lot from him, and it left me wonder how he was able to solve these problems so fast. What made him solve them quickly? It’s two things:

  1. Pattern recognition and intuition.

    My buddy seemed to just know what paradigm of thinking to use for these problems. I don’t know how you can train this but through experience.

  2. Flexible Thinking - Normally, when people keep track of an item in a grid, you keep track of one item. But he thought up of a way to keep track of multi-value items in one spot of a grid to solve the problem. I thought that was fascinating.

#2 then led me to think about…

Abstractions

My thought about this pairing session was - what can I learn from it? To expand, what can I learn from doing these toy puzzle computer science problems? And I think what’s important is to think one level above, at a higher abstraction on how the problems are solved. For example, with the above, you have to think about how you can’t assume that a spot in the grid has only one single type of value.

But can we take this principle one level up? Maybe.For example, that for a human being their state can’t be defined by a single word. You can’t define someone’s emotional state as happy. They can be happy and excited. Or happy and also sad (like graduating from college). So a function to get the emotional state of a person isn’t E(p) = 0.9 , where the numerical value indicates happiness.

It’s more like E(p) = [0.9, 0.6, ….] where God knows how many different types of emotion/states define how a person feels at a given point in time.

Another example that I encountered during a pairing session is how if you use a heap, you’re relaxing the constraint that you place on a sorted list that all items have to be in perfect order. The moment you drop that constraint, it leads you with a performance gain and other benefits. Of course, this comes with a certain set of detrimental effects. Similarly the bigger picture is that, dropping a requirement on a project or even a criteria for a recruiting candidate can leave you with so many new options, but dropping that requirement will led you to incur some other cost(i.e. increasing filter time for qualified candidates).

Last topic I thought about was…

Flimsiness

Yesterday I ended up going to the gym really late. But it was an enlightening experience. Before I left, I told my friend Pat that We’d get a dollar slice afterwards.

So I go to the gym and I try to be on the treadmill on my off days. What’s funny is that when I run, I always want to stop when I’m out of breath. Like my mind begs for me to drop the run.

But soon enough, 0.1 miles becomes 0.2 miles. And through the 2.2 mile run, my mind goes through a series of flimsy motivational states.

  • Let’s stop I’m tired.
  • Let’s keep going you’re half way there.
  • Let’s stop you’re close enough - you did better than yesterday.
  • Let’s keep going you only have 0.1 miles to finish it off.

It’s so weird. Anyhoo, I finish my run, and then…

I don’t want the dollar slice pizza anymore after my run. I get a sense of fullness?

So I go back to meet Pat, and since he’s waited for me to come back from the gym, we get that dollar slice.

I don’t want to go at this point, but we go anyway since he’s waited for me.

We go, and now I want 2 slices instead of one because the pizza smells delicious.

And then I eat half the slice of pizza, and now I don’t want that second slice…

Maybe I’m a flake, but damn. We just live in a world where things change constantly. Including our emotions. It’s like, one piece of information or a new way of sensing/observing something is only one step away from fundamentally destroying the state at another level.

It reminded of this Taoist story that my dad told me earlier: (https://medium.com/@davidgallan/who-knows-what-s-good-or-bad-my-tedx-talk-transcript-8404344779ce)

The idea that the world is in a constant flux of where good turns into bad and bad turns into good. To tie this back to my flimsy pizza story, I think the human mind(at least mine) is in a constant state of flux similarly to how the world is in a constant state of change.

But the big abstraction behind my gym pizza story? I’m not too sure. Maybe it’s: know how your mind works, and make decisions at the highest level and stick to it. Or leave multiple options open. If I decided that my life principle was to not get pizza slices after the gym, maybe I could have avoided getting a double whammy of two slices of pizza. Or if I told Pat that we might get a slice of pizza, maybe I would have flexibility to flake. It’s tricky, because sometimes you have to stick to your principles you’ve decided not to violate, but other times the correct answer is breaking your rule. But that’s life.

Experience with setting up GPU for Keras and Tensorflow + Rants

I’m going to document my experience with setting up Tensorflow on my GPU. I had hoped that I could setup a cloud version to see the differences in performance but unforunately the free tier of Google Cloud Compute won’t give me a GPU =(.

Basically, what it boiled down to is this:

  1. Had to update Ubuntu from 14.04 to 16.04 for the latest software from Nvidia.
  2. Download all the dependencies following this link[https://www.tensorflow.org/install/install-linux)

It seems pretty dumb to me that it’s such a painful process to set this up. You have to install the following dependencies:

  • Nvidia drivers
  • cuda
  • cuDNN
  • … and a bunch of other stuff I can’t remember.

Then you have to set the environmental paths. Remember, if something breaks along the process, as usual Google on.

So after all this trouble to use my GPUs for learning purposes, this is the final result:

(Insert pic here from other computer)

The good part: a 4x speed of in neural net training with two 970s!

The bad part: HAVING TOO MANY TABS IN CHROME AND RUNNING THE GPU ACTUALLY CAUSES COMPUTER TO FREEZE…

Finding Meaning in Life and Habits

A few weeks back I listened to a podcast from Indiehackers from Spenser Skates from Amplitude:

We talk about making a billion dollars here in Silicon Valley, you know what real impact is? Saving a billion lives. That story really stuck with me and resonated with me, and you know, he got the Nobel Peace Prize in 1970, but not many people understand the impact he has to hundreds of millions of people, but even more, our trajectory as the human race, and it’s like, woah, if I can have a tiny fraction of the impact that someone like that has had on the world, that would be incredible. It > was like, hey sign me up, I’ll dedicate the rest of my life, no question, and I will be totally confident in that, and that’s really important because I think a lot of folks go through life and they end up realizing what they want is very different from what they’re doing, so being able to find something where you can say, hey let me dedicate my life to this without having any doubts about that, or any regrets about what you do is super important and a good way to find long term success. When > I look at what we’re doing here at Amplitude, we’re nowhere near on the scale of an impact of someone like Norman Borlaug, but I think about my talents and what I’m good at, and it’s like what do I know how to do? Well I know how to build and sell software, so let me do the most good as we can through that.

I don’t expect myself to save millions of lives, but I like the idea that Spenser Skates mentions. Ultimately, what it boils down to is thinking about your talents and what you’re good at, and what you know how to do.

I thought about this quite deeply. What am I good at, and what can I do to follow Boyscout rule, and leave this world a little better than it was before?

My answer was not too far fetched from Spenser’s. For me, I’m not quite sure what I’m good at, but given my engineering background, things that I can do to make our world a better place is to work on building things that make people’s lives a little easier, and a little better than it was before. Hopefully I can have a lot of fun doing it.

That’s why recently I’ve trying to up my game, and spend a lot of time learning new things outside work and attempt to build cool things. So far, the progress has been rather slow. Despite my somewhat decent educational background, I haven’t spend too much time outside my class or work working on building interesting things. But I’m trying to change that for the past couple of months. It hasn’t been easy. To do things that you don’t normally do is challenging.

It’s really hard to change habits that have literally been engraved into your brain. Imagine that you planted a tree twenty years ago. And now you’re trying to uproot the damn thing. It’s not easy. The way I think about this is that every action that you do, it reinforces that certain habit. It’s extremely difficult to quit, whatever it is. It’s so weird. One thing leads to another… and you think, how the heck did I get here?!!!

I’ve been reading a book called The Power of Habit and it really resonated with me. The premise of the book is that our brain autowired to do actions in a certain way, and it follows this format: cue, action, reward. Essentially, the cue is a trigger that sets the everything in motion, action(s) are things that you do, and reward is the pleasure that you get.

For me, when I come back from work, I have dinner, then sit on my computer, and usually just browed reddit and watched a lot of YouTube videos. Then go to sleep. A common tragedy for many. In this power of habit framework, I don’t know, the cue would perhaps be sitting on the computer, and the rewards are the constant dopamine hits when you see an interesting post or a YouTube video. It’s maddening how automatic some of these actions are.

Whatever it is, you have to break out of the habit…. The thing that kind of worked for me was to delay having dinner until later, and configuring my computer to boot into linux and automatically opening up 3 command lines right when I boot in =D. Whatever it is, you have to change something. You can’t expect your willpower to override the thousands and thousands of times you’ve reinforced that loop pattern. Do something to break out of it!

That said, I don’t know where I read it, but someone somewhere did a study on people who had better self-control and willpower than others. The study found out that it wasn’t that the people who had better willpower literally had better willpower, but it was more of their ability to control themselves to avoid situations where their willpower would be compromised.

For example, if you’re more likely to be in a troublesome situation if you hang around with troubling friends, so these strong-willed people would avoid those situations in the first place! I think it’s a mix of thinking ahead with knowing enough about yourself to evaluate situations where you know you wouldn’t be able to handle certain pressures.

Anyhow, cheers to bad habit breaking, and finding purpose in mine. Mine: building things to make the world a little better.

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