Project Ideas

Many people are frustrated that they have a hard time coming up projects. Or even startup ideas they would like to work on. For me, I don’t know if I had this problem. Probably because I think everything can be better. My problem lies in with maintaining momentum on a project, sticking to it, and executing well. Which is what I’m thinking about in this new year. It’s all about the execution.

Here is a tip that can help you come up with your own idea.

Work backwards!

There are naysayers saying we already have everything we need, and should be satisfied with what we have now.

Bullshit.

The brilliant mathematician Carl Jacobi is famous for saying, “Invert, always invert.”

Start from an ideal world — every one is healthy, happy, and leads fulfilling lives. A world without car accidents, no hospital bills that destroy lives. A world without war. A world without orphans. Everyone lives a life of liberty and the pursuit of happiness. On their deathbed, they think “Ah, I’ve had such a fun and meaningful life. Totally worth it” Or who knows, maybe we never have to be on that bed!

This is the big picture world that team humanity wants. Imagine this utopia, and start working backwards. What steps are required for us to achieve paradise on earth?

Paul Graham mentions some great ideas.

Frighteningly Ambitious Startup Ideas
_March 2012 One of the more surprising things I’ve noticed while working on Y Combinator is how frightening the most…_www.paulgraham.com

Let me supplement the list here.

1. Health

The American healthcare system is broken. We all know it. During my first internship at a small business which worked in open source healthcare, my naive self asked my boss on why he thinks that the current healthcare industry is so broken. He laughed, and said, “It’s not just one thing that’s broken. It’s a combination of many other things.”

If we want to unravel this mess we created called healthcare, there’s a lot of work we need to do to fix these broken components one by one. First, we need greater transparency on our medical bills. Every time I’ve called to dispute my bill, I’ve always gotten it reduce by at least 30–40%. With one phone call. This leads me to believe that there is something seriously wrong. How am I supposed to know what they’ve charge is even real? I look at my medical bills - it’s as if they are trying to make something as complicated as possible so the average layman will never understand.

A value of a good or service can only be accurately priced if there is information flow available to the market participants. But for healthcare, it’s really lacking and things need to change because it’s not something customers understand, and it’s always a one time expense.

We need Google for Healthcare bills.

Second, the incentive system is broken Because charges are “personal”, consumers have no idea what all these items with fancy terms are supposed to cost.

The incentive are grossly misaligned. The healthcare providers usually charge the insurance company, which charges your employer. The common citizen doesn’t care if the bill is high, because it’s not coming out of their pocket. So the medical provider’s optimal strategy is to charge as high as possible for every service without triggering alarms from the insurance provider. Even if the insurance provider gets charged a lot - no worries, they will charge higher bulk plans to the employers, which will then pass that on to the average citizen.

It’s such a mess that not a lot of people are willing to tackle it. Health is also something that we all need to maintain through our lives, but this is incredibly hard to do so since many of us in the United States are in suburban and rural regions. Not everyone can afford a $2,000 dollar bike to get fit, nor have the space in their apartment to do so.

I really wonder if there is a better way. Maybe the only solution to this mess is to create some technology at such a reduced cost that wipes out the need for serious medical bills. If we put the smartest humans in charge of scrolling through endless feed that have marginal signal to noise, then can we do something to hack healthcare?

Everyone like playing games. How can we combine them together to create a fulfilling experience? How can we make games so addicting and feel good that, when you do a sit up, you think - just one more situp? Is it possible? Feel like a lot of things can be fleshed out here, and the design space huge.

2. Improve the Engineering Experience

In an ideal world, the invention process would be - “I think, and it is made”. We are nowhere near that. Instead, most of us are stuck with a keyboard layout that makes zero sense, and a tiny pointer to navigate boxes in front of our faces which constantly strain our eyes and make us cry. This is our workflow for most of our creative processes everybody. Is this the best that we can do?

I don’t know about you, but I’m getting so tired of micro mice manipulations. That happened in the 1980s. Now would be a time for new interfaces, so we don’t have to worry about all these mice manipulations and memorizing keyboard shortcuts.

3. Loneliness and Isolation

Why is it so hard to keep in touch with friends, and work on problems together? Why is it hard to make new friends as well? We’re connected to so many people via the Internet, but many of us feel like we’ve never been more alone.

I’ve thought a lot about this problem. Here are some things why I think it’s hard to make friends online:

  1. The me mentality. It’s all about sharing my happiness, my accomplishments, and my problems, and not about helping other people. No one is really honest about social media, or feel threatened to become vulnerable. We put on this facade.
  2. Online interactions are ephemeral. Friendships take an enormous amount of time to build. We make friends at school because we just spend a lot of time with our friends, but it’s hard to do that online.
  3. Low engagement and low degree of freedom in interactions. Like a post, put an emoji, write a comment. That’s really not enough expression or degrees of freedom to interact with other people.
  4. Social media also suffers from a fan out problem, where it’s always 1-to-huge n. What if we design systems so it’s 1 -to-very small n?

But most interactions with people on the Internet are ephemeral.

What kind of technology can we use to change this status quo? How can we be friends from people all over the world, teach them new things, and meet awesome people that change our lives?

4. Content on the Internet

I’m a little disillusioned by the amount of trash content on the Internet. Yes, we are generating information on a never before seen scale. But how much of that content is useful? Not much.

One good criteria that I used for movies, or any content after reading it is — what did I get out of this? Does the length justify the content? I read through an article, and think about delta. Is the essay large delta?

It’s also marred by people who want to make a quick buck (Can’t say this post isn’t one of them) How can we develop content collaboratively so that we due our due diligence to the English language, and produce quality content?We can’t keep drowning our readers in boredom and useless crap they don’t need.

There’s also one gatekeeper for the Internet. Google. Everyone has to go through Gatekeeper Google. Google is everyone’s best friend but unknown to them, they could be their worst enemy. And most people in tech, or any specialized domain, knows how Google can suck so much with anything remotely complex. Try looking up anything extremely specialized. There’s a high chance you won’t find a hit.

There’s a line of philosophical thought that doing everything means you do nothing. Does Google fit this narrative? It has to meet the demands of everyone. It has to deal with people who are trying to game the search engine, corporate interests, and everyone else on the planet. There’s something very wrong with this picture. But no one is willing to take a shot, and I don’t blame them.

Because it’s Google, who has an army of the best software engineers in the world. But are we overestimating their capability? Afterall, PageRank was a slight modification of Katz Centrality, and 20 years is a long time in the tech industry so the initial constraints that went into building Google no longer exist.

I would like to end with the fact that Google is still very far from the ideal information retrieval system. To me, the ideal state is thinking of a question, and I get the best answer that fits my needs which is the truth and nothing but the truth. The exact quanta of information I need, with everything removed. Can you really argue that this is Google?

And, let’s say you solve this information retrieval problem. It doesn’t end there. Then the question is — why am I even asking this question in the first place? Why couldn’t I have this information already with me, and why do I not know it? How can we make something so we already know what we have to ask?

5. Environment

We generate tons of trash, and as far as I know, there doesn’t seem to be any innovations on this trash generation process. In an ideal world, we would consume all of our foods, then throw out the packaging anywhere we want and it would disappear instantaneously. Or everyone cares enough to recycle. But that doesn’t happen. I once had to drive to an obscure place across town to recycle my used electronics battery. Shouldn’t there be a better way? Part of the reason is how incentives around recycling and environmental friendliness is structured. No one in their right mind would drive across town to recycle something for free without some monetary compensation in return. This is why me 5 cents on a beverage bottle is useless.

In high school, I thought making a recycling lottery was a great idea. This area definitely needs some fresh ideas.

6. Biotechnology

The next revolution in biotechnology could be something like Amazon Web Services for biotech. It seems like the biggest barrier for biotech is the extreme amount of capital required to get started. Hmm. That sounds eerily similar to what Amazon did to computer infrastructure. You rent out unused biotechnology equipment, design specific programs and rigorously test it to meet certain criteria, then deploy it instantaneously to people who need it. Maybe we’re decades away from this workflow.

Can you imagine a world where we could make our own fruits and design unicorns?

I know some people will say we are playing God, but still. What an exciting future if this could be true.

Conclusion

There is no shortage in the supply of problems for team humanity. The challenge is finding something you are passionate about working on, and having the drive to work on it for the long haul. Even me — I haven’t made so much progress on that due to a myriad of reasons, some which are on me and some that are not. I believe that there is a problem out there for everyone, and wish you the best of luck.

Immortality Key is a Letdown

I recently read https://www.amazon.com/Immortality-Key-Uncovering-History-Religion/dp/1250207142 for a book club. I can entertain the concepts — they do have their worth. The problem is the poor execution of this book.

I didn’t like it. First of all, the title is definitely not WHAT the book is about. When you see Immortality Key, naturally you think about the key to immortality. What is some deep-seated secret in the Universe that offers us a key to live forever? But this book is so far from those concepts. It’s about a “secret” religion that apparently has been in the shadows of humanity — psychedelic drugs. When people take them, they gain a sense of purpose in their life, and glimpse into an immortal experience. Ancient Greeks, and early Christians, early nomads, etc used drugs to experience a sense of oneness. A sensation of being connected to everything when drugs stripped away a person’s sense of time and space and the invocation of the feeling of oneness with the universe. This oneness after drug use, free from time and space, is the “key” to immortality.

Reasons Why This Book was Lackluster

  1. High LCR(Length-to-Content Ratio)

My main qualm with this book could be summarized by another fellow reader who said, “The whole book could probably be written down to 100 pages”. That is my biggest gripe with the book. It was unnecessarily long. That is, The LCR — length-to-content ratio was too high.

If you increase the content of what you write, you better make sure that there’s enough damn content to justify what you write. Or increase the quality of the book. This 400 page tomb does not justify the length. It just felt very rushed and unrefined. There are sections in the book where the author repeats what he has said already multiple times. It feels like he’s disrespecting me, the reader — and wasting my time through repetition.

It’s as if it’s only gone through a single revision.

2. Complexity Management

The author didn’t do a good job of complexity management and tying in loose ends. He seems to go all over the place. In one section, he talks about pre-historic men, and then he talks about prehistoric beer, then he takes a loose connection to Jesus, then back to the Greeks. It’s very diffused and disorganized. It was also ridiculously hard to differentiate between implied factual information from his extrapolations and biases. Even if the evidence is very weak, or to some degree very counter to his claims, he spins it to fit his theory. The overall structure and organization was very poor. It’s a book about his journey, interviews, and factual information all cobbled together. I wished he focused a bit more on the structure of the book and had more coherence.

3. Stretching Way Too Much

Author argues that the use of drugs were pivotal to obtaining profound insight by feeling this sense of oneness — for the likes of Plato, Aristotle, Jesus, etc. The book seemed to imply that by doing these drugs, the famed Greek thinkers and philosophers were able to obtain fundamental insights about the nature of the Universe.

Am I the only one who finds this kind of reasoning heavily flawed? To me, this is seems unlikely. Out of a myriad of people who have gone through these trips, it’s hard to believe pivotal secret ingredients that made them make these breakthroughs was due to a miracle drug.

Again, he just stretches too much too little. For example, when he mentions that Christianity is a morphed from Dionysian festivals, it irks me. I’m not religious by any means, but the tenant of Christianity can be boiled down to loving God and your neighbors, if we take out the core tenant of Christ dying on the cross to save your sins. T o me, this drug theory about Jesus’ origins is such a insignificant portion of what makes Christianity still relevant in the 21st century. It’s still a powerful force where some people are willing to die for their belief of a powerful, loving God and a dedication to serving others. Passionate people from Christianity who are willing to lay down their lives for their faith — is all of this faith be based on a miracle drug?

The Good Points

I have to hand it to it. The author’s ability to spend an enormous amount of time chasing tails and going through all the research while I presume having a full-time gig as a lawyer is very impressive. Throughout the book, his resilience on trying to get to the bottom of my many different threads and leads were something to admire. Refusing to give up on leads and requesting interviews with experts is no easy feat. I’m sure he must’ve faced rejection after rejection. And traveling the world to really dig down on something you want to know, presumably on your own dime — it’s passion, isn’t it?

The other things I enjoyed was giving character to the experts. I loved how he characterization of the various experts throughout the book. He colored their mannerisms and character instead of defaulting to something such as, “Dr. Overdose said XYZ.”

Concluding Thoughts

The first 50–100 pages were solid. Then everything just went down from there. I have no problem with entertaining the idea that psychedelics drug cause a meaningful experience. But most of the problems I have is with implementation details.

My rating is a solid 1.5/5. Compared to other great alternatives, you’re better off reading the first 100 pages and putting it back on the shelf. There’s a whole Joe Rogan podcast which the author appeared in. I haven’t listened to it, but maybe that’s a better, free alternative considering the low amount of information?

I don’t know why Amazon reviews for this book are so high. There are so many other books out there that fundamentally turn your worldview upside down and change you.This book is not one of them. It is definitely not worth $30.

Don’t buy it.

Weird Behavior with HTML5 Video Webcam

I recently had to prototype an app that would use webcam videofeed across multiple devices. It was a challenging problem to tackle, because even if your code worked on one device, there was no guarantee that it would work on the other devices. It was mainly due to the differences between how Apple develops their browser compared to Google. Painful.

Here are a couple of issues that I encountered. Here are some gotchas.

Gotcha 0: Https - A coworker of mine was working on the initial implementation before I came in. He was accessing the website with http, and couldn’t figure out why the video wasn’t loading. Well, it turns out that if you try to access any webcam feed through http, it will not pop-up asking for your permission to use the camera. Camera access must be done through secure protocol. A simple fix would be to always redirect http to https.

Gotcha 1: iOS devices require an inline tag in order to render the video on the browser. So your video tag should look like this:

Your video will not play if you don’t have the playinline tag.

Gotcha 2: This was for my application. The requirement was that we needed to draw objects on top of the video. For instnace, you want to draw an oval on top of a video.

The first step is you get a canvas, and then draw an oval like this.

First, you can add a canvas and draw your elements.

Link to Demo - enable video permissions.

OK, so you have both html elements. Now how are you going to put the oval on top of the video? There’s two approaches. But my fellow developer friend took the first link on Google and did this:

First, here’s the modified the code to takes frames from the video and draw to the top canvas.

function processVideo() {
    let canvas = document.getElementById("canvas");
    let canvasCtx = canvas.getContext('2d');
    canvasCtx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight); //this line was added here
    canvasCtx.beginPath();
    canvasCtx.strokeStyle = 'red';
    canvasCtx.ellipse(video.videoWidth / 2, video.videoHeight / 2, video.videoWidth*0.3, video.videoHeight * 0.3, 0, 0, 2 * Math.PI);
    canvasCtx.stroke();

well, now, we can’t have two elements showing our face now, right? So we’re going to hack our way and hide the video element by doing this:

let streaming = false;
video.addEventListener("canplay", function (ev) {
    if (!streaming) {

    let canvas = document.getElementById("canvas");
        let canvasCtx = canvas.getContext('2d');
        canvas.width = video.videoWidth;
        canvas.height = video.videoHeight;
        //Chrome, Android will play this, but iOS and Safari will not! 
        video.width = 0 + "px";
        video.height = 0 + "px";
        video.style.position = "absolute";
        video.style.left = 0 + "px";
        video.style.top = 900 + "px";
      streaming = true;
    }
    processVideo();
  }, false);

OK. Yay, we fixed the issue, right? The video is 0px by 0px, but it will still be on the page! And it will write to the canvas!

Here’s a demo of that here…

Link to Demo

And the full code here.

<canvas id="canvas"></canvas>
<video id="video" playsinline autoplay muted>Your browser does not support the video tag.</video>

<script>

var constraints = { 
    video: {
        width: {min: 640,  ideal: 1920 },
        height: {min: 480, ideal: 1080 } 
    } 
};

var video = document.getElementById('video');

if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    // Not adding `{ audio: true }` since we only want video now
    navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) {
        //video.src = window.URL.createObjectURL(stream);
        video.srcObject = stream;
        video.play();
    });
}
let streaming = false;
video.addEventListener("canplay", function (ev) {
    if (!streaming) {

    let canvas = document.getElementById("canvas");
        let canvasCtx = canvas.getContext('2d');
        canvas.width = video.videoWidth;
        canvas.height = video.videoHeight;
        //Chrome, Android will play this, but iOS and Safari will not! 
        video.width = 0;
        video.height = 0;
        video.style.position = "absolute";
        video.style.left = 0;
        video.style.top = 0;
      streaming = true;
    }
    processVideo();
  }, false);

function processVideo() {
    let canvas = document.getElementById("canvas");
    let canvasCtx = canvas.getContext('2d');
    canvasCtx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
    canvasCtx.beginPath();
    canvasCtx.strokeStyle = 'red';
    canvasCtx.ellipse(video.videoWidth / 2, video.videoHeight / 2, video.videoWidth*0.3, video.videoHeight * 0.3, 0, 0, 2 * Math.PI);
    canvasCtx.stroke();
  try {
    // drawOval(canvasOutputCtx, faces, 'red', size, eyes, eyesize);


    
    var req = requestAnimationFrame(processVideo);
  } catch (err) {
    console.log(err);
  }
}

</script>

Now, try this on iOS on an iPhone. It doesn’t work…

It’s interesting because on iOS Safari, it won’t render the 0 pixel by 0 pixel element. It just won’t. Similarly, if you set the pixel y coordinate to be off the screen, Apple’s Safari on Mobile Deice they will not render the video. For example, let’s say the viewing window is 900x1600, and your video element falls on position (900, 1700).

So who’s in the right here? Should the video element is 0 pixels by 0 pixels, should it actually function like it does in Chrome? Or should the browser not render the actual video at all like it in does in Safari? At this point, I’m not sure about which approach is correct. Chrome’s approach makes sense to have the video element function since there’s a downstream dependency on it. Safari’s approach isn’t worth either - why have the underlying element function if it’s not being rendered on screen?

Gotcha 3: Shape Flickering - If you draw something like a circle on the Canvas, but then delete the Canvas and draw the same one each frame, then the object will flicker on Apple devices. It will not on Android. Similarly, I found that canvas implementations seemed to be less robust on iOS. It’s not as smooth on Android when you have the same shape on canvas multiple times per frame. RangeError: Range consisting of offset and length are out of bounds set. You must copy the exact number of pixel values to an buffer object in IOS compared to Android.

Other Interesting Points: Part of the challenge was implementing some sort of facial detection for the project. If you Google this, the top results all point to using openCV’s landmark face detection. Unfortunately it currently doesn’t support the api call in JavaScript. So here I was, thinking of getting the source code and implementing that portion of the code myself.

However, what I later learned was that the weight files for that function requires 100MBs for a dependency! 100MB! You can’t load wait for that kind of data to download on the browser, so if I had gone through the approach it would have been a lot of time wasted since it would lead to a deadend. It made me reflect on the engineering process in general. What you conceptualize inside your head you’d work beautifully, but when it comes to practice there’s things you don’t know that you don’t know.

A good example of this is nuclear weapons. Just because you know the fundamental concepts that entail making a nuclear bomb, doesn’t mean that you can. The details and unexpected challenges in the physical world are much more nuanced and challenging - you can’t predict some of the obstacles.

DeviceOrientation and Motion:These set of events are triggered for accelerometer and gyroscope for handheld devices. Android enables permissions on devices by default. iOS requests permissions on your first time accessing the device. However, if you deny permissions, it will never ask you twice. Even if you reload the webpage or revisit you. You have to clear the cache.

Takeaway

It’s interesting because some minor things you can get away on Android, and then you debug on iOS it doesn’t work. I guess the big takeaway picture is something like this: Suppose you have two teams of engineers and let them implement X with the specs and let them work for a year without communication. Sure, it’ll support all the major functional requirements, but the underlying implementation could be very different.

The other thing it makes me wonder is about all the dominant products and services out in the market. Are they truly the best that society could offer that have been won through thick and thin of competitive forces? Are the best versions that are offered? Or are most of them the first implementations of an emerging idea that lucked out with the first mover advantage and shut out better ideas from existence?

What you see is a very fast simplifcation of everything that’s going on under the hood…

Resources used

https://www.html5rocks.com/en/tutorials/getusermedia/intro/ - This site doesn’t work on iOS

https://stackoverflow.com/questions/27420581/get-maximum-video-resolution-with-getusermedia

https://stackoverflow.com/questions/15993581/reprompt-for-permissions-with-getusermedia-after-initial-denial/15999940#15999940

https://hibbard.eu/how-to-center-an-html-element-using-javascript/

An Imitation of My Favorite Poem - Timing

My favorite poem is Ecclesiastes 3: 1 - 8. It’s a beautiful piece about timing and how in some sense, one rule doesn’t apply to all conditions in life.

For example, take this rule: I never want to be angry at someone. This could be true for 98% of all instances in a social setting. But if there’s something that deeply disturbs me, then I might have to yell at someone and fight for what I believe is inherent to my character and be angry. Or I won’t be able to sleep at night with my decision. Situation like this requires you to be tactful, and understand that there’s a time for everything.

Imitation is the surest form of flattery. I rewrote this for me! Taking into my style of writing and my opposites for the timings.

Alas, here it is.

Time for Things

There is a time for everything,

And also for nothing.

a time to tweet and a time to sing,

a time to startup and a time to bankrupt,

a time to fight to your heart’s content and a time to simply say sorry,

a time to create and a time to delete,

a time to shed tears and a time to troll,

a time to lend your shoulder and a time to give a cold one,

a time to send off your friends and a time to see them again.

a time to engage and a time to flee,

a time to search for the one and a time to give that up, because you’ve found them!

a time to keep your dying phone and a time to chug it,

a time to disassemble and a time to duct tape,

a time to be silent and a time to speak,

a time to be blind and a time to call out,

a time for hoard and a time to give it all away.

Timing is everything.

So time things carefully.

2019 Q4 Goal Checkin

I set some New Year’s goals and damn it’s Q4.

  1. Weight - to get to 160 lbs: I’m tweaking this goal to 165 lbs. Hmm. Have to take into account muscle mass right?! I’m thinking of changing my strat on this one. I think I should have a checkin or something to be more aware of my progress during the day. Paul Graham has this great sentence: You make what you measure.
  2. Multiplayer browser game: I learned Unity in the beginning of the year and was working towards this goal. But every time I develop anything in Unity with my MacBook Pro, it freaks out. Things keep freezing and slowing down. I get triggered by this. But now? I should have my desktop PC setup so things will be silky smooth! I will make that multi-player game before the end of the year.
  3. Learn Japanese: Nowhere near being close. My friend in Japan said to focus on learning to read as quickly as possible, and to focus on reading visual novels. Hmm. I am taking a 2nd level Japanese class, so I have to cram as much as possible this month and go through a first level workbook. I think I can do this! Woo!
  4. Meditation twice a week: Been nailing this one. I do it almost daily. Aim for almost 30 minutes. The whole topic needs a separate blog post, but I highly recommend it. It’s not some stupid fad. My dad has been encouraging this since 2009 and I’ve finally had enough discipline to be consistent at it. It’s made a world of difference.
  5. Books - read 25: I finished 9 books. Feel like 3 are almost done but have not been picked up yet. I’m reading another 3 in parallel but they’re in the early stages. I’m not rushing to finish books. I’m just enjoying the process as well. But it’s nice to have a goal that you want to go through. What I love about books is that the information content(if it’s a good book) is so dense. With physical books, you can highlight passages you love, write in margins. I always sign my books at the back with location and date when I finish, with one sentence summary of my thoughts. It’s the process of making that copy of the book yours.

In conclusion, I have a LOT of pieces to maneuver to fit this in before the end of the year. I’m more of a Q4 kind of guy. All the good things in football happen in Q4! So I’ll hustle and get it done. Do or do not. there is no try! XD.

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