Speaker Notes from Internapalooza 2017

Last Tuesday, I had the pleasure of being able to attend Internapalooza, a large gathering of interns in the Bay Area. While definitely not a flawless event (see my recommendations at the bottom, it was definitely worth checking out!
It started out with a Q&A with one of my favorite influencers, Naval Ravikant, followed by Dropbox CEO Drew Houston. In the middle were some not-so-great speakers, but there was a strong finish with a Q&A with Andrew Ng. My notes from the three named speakers above are below followed by some of my recommendations for the event.

Speaker Notes

Naval Ravikant:

  • What you work on is more important than how you work on it
  • Don’t let anyone control you, don’t try to live up to anyone else’s expectations, don’t be afraid to change your mind
  • Deep understanding of the basics will take you farther than just the specifics of just one thing
  • Be the hero of your own movie
  • Reframe setbacks as growth opportunities

Drew Houston:

  • Ask for responsibility, take initiative
  • Compound your learning
    • Learn to learn
    • Always find opportunities for learning
    • Ask people to book recommendations, things to learn
    • Take the path that optimizes for learning
    • Throw yourself into the deep end
    • Run towards the discomfort
  • Networking pays off in ways you can’t expect

Andrew Ng:

  • Follow good mentors
  • Be wary of joining a company that won’t tell you your team/boss until after you sign
  • Read papers and try to replicate state of the art results
  • Have a significant project
  • AI is the new electricity, every industry will be changed
  • Healthcare, education most promising/underhyped
  • Transfer learning interesting, GANs, RL as well
  • Most economic value in supervised learning
  • Large companies have advantage for larger verticals (search, etc) bc of larger datasets
  • More specific verticals super viable for startups, can form data accumulation loop
  • Go to San Francisco or Beijing
  • Don’t necessarily need advanced degree, company experience fine as long as you learn, increasingly more based on what you can do
  • Be a lifelong learner

Recommendations

There are three things I would change to improve Internapalooza (besides removing the ‘a’ in the middle of the name).

Make it a premium event. Because it was free, I don’t think most attendees gave the speakers the respect they deserved. If it was paid, there would have been a smaller but much more engaged audience. I felt that there were far too many people there for the space anyways. At times it was hard to even walk around without pushing your way through. In addition, it would have been nice to have food there since the event occurred during dinner time. I understand that this was not possible because of financial reasons, and this is yet another reason to sell paid tickets.

Having company booths there felt like an afterthought. It seemed to have been pitched to us as a career fair-type event, but resumes were not allowed and the experience from booth to booth was very inconsistent. Some were taking names, some were just there to provide information, and some were demoing their tech. It’s as if companies were not told what to expect as well.

The speakers who were sandwiched in between the keynotes seemed not to have prepared very much for it. As a result, their presentations were boring at best. At one point, a speaker started to pitch us his startup as if we were a crowd of VCs. Know your audience!

Although, overall, it was definitely worth going to just for the three speakers I took notes for and I look forward to seeing what it becomes in the future.

Random Observations on San Francisco

I’ve just finished moving into my apartment for the summer in San Francisco where I’m working as an SDE intern for Workday.

Here are a few things I’ve noticed about SF so far:

  • The homeless problem was not exaggerated. It really is bad.
  • Uber is amazing. New York needs to step aside and let capitalism do it’s job.
  • Free same-day and 1-day delivery from Amazon Prime is amazing too.
  • It’s not as warm as I thought. I failed to bring my other pairs of jeans and sweatpants, so I’ll have to
  • Target, Trader Joe’s, Costco, gyms, grocery stores–everything is so close!
  • So much good BJJ: I’ll be training at Ralph Gracie’s academy and 10th Planet’s SF satellite.
  • Everyone honks all the time. Why?
  • Vegan heaven. The two top rated restaurants around me are both vegan and there’s a vegetarian grocery store very close by.

Keep in mind that this is also the first time that I’ve lived in a major city since I’ve had personal agency.

I’m going to try and write a lot more often since it’s the summer now, so stay tuned for more!

Linux Kernel Project Update: End of Semester Wrap-up

It’s been a fun summer to work on this project and I want to thank everyone in Microsoft and RCOS that helped to support us!

My main takeaway is that OS dev is really hard and that after this project, I don’t really want to touch it again. I did, however, learn an incredible amount about a variety of things in the kernel including how drivers work, how devices communicate, SPI interfaces, and much more.

I agree with Max that Arch Linux may have been a poor choice to start with. During the summer, I’ll continue working on this to both add additional functionality and to document the install process on other flavors of Linux.

I’m glad that we were able to work with external contributors (cb22, roadrunner2, and more) to get the keyboard and trackpad working as that really sets the stage for further work. There are still quite a few things left that aren’t working: suspend/resume, speakers, bluetooth, and webcam, with the first being miles more important than the rest.

Here are all of the loops that we have left to close:

Generally:

  • How do we eliminate the need to recompile the kernel when fiddling with DSDT?
  • What are the side effects of disable LPSS? Can we rework something in LPSS so that it doesn’t hijack the keyboard output?
  • What are the steps to getting patches added to the upstream kernel? What do we need to change to get it accepted?

Keyboard:

  • Where in the keyboard drivers is rollover handled? Why is it not correctly dealing with our keyboard?
  • How is keyboard backlighting handled on other laptops in the kernel? Is there any major difference in the hardware (besides SPI) between our keyboard and others?

Suspend/resume:

  • What are those custom op-codes doing? Are they even relevant?
  • Is LPSS being disabled effecting suspend?
  • Could it be that suspend is working, but there is a problem with resume?

Speakers:

  • At what level of the audio stack is communication to the speaker breaking down?

For now, I’ll be focusing on suspend/resume and Max will be working to get our work so far merged upstream.

Again, thank you to everyone who helped us along the way!

Aftermath of My First BJJ Tournament

Last weekend (Apr 22) was my first BJJ tournament: The Good Fight New York State Championship. I fought as a 155lb white belt in both gi and no-gi. Small weight cut, probably fought at 4-5lb above.

My goal going into it was just to win one match. I ended up winning two! One in gi, one in no-gi. The way the brackets worked out, I actually got to fight three times in each division: a first round, a semi-final, and then a third place match. Despite losing these matches, I was happy that I got more experience in competition.

Overall, the day was super fun! I got to watch all my teammates compete and a bunch of them won medals! The environment was incredible and this competition  just adds to my infatuation with the art and makes me want to train more.


Here are the breakdowns (as much as I can remember) of my matches:

Gi:

Match 1:

In my first match, I faced a one stripe white belt who was about the same size as me. The match was pretty back and forth, I wasn’t keeping track of points or advantages, but I think I finished slightly ahead. We went to overtime where both of us escaped back control, mount, armbar, and then were submitted with triangles. In double overtime, we both escaped back control and mount. Starting in spider web, I was able to pry his grip and secure the submission. To end the match, I escaped from his spiderweb, giving me the victory!

Match 2:

I don’t remember this one too well. I faced a four stripe and it was pretty one-sided. I was still pretty tired from the last match and made a bunch of mistakes (not that I wouldn’t of made mistakes if I was rested) that ended when he submitted me with an ezekiel choke when I went to escape from mount,

Match 3:

For the third place match, I faced a three stripe who was shorter than me and quite strong. It was not as one sided as the last match, but he was definitely much better than me. Eventually I lost to a triangle when I went for an escape from mount.

No-Gi:

Match 1:

For the first no-gi match, I faced a kid who was clearly pretty inexperienced (even more than myself), and decided to go for a takedown. I shot a double leg where my penetrating step was not deep enough or fast enough. He countered with a guillotine that I got out of and then decided to just pull guard. The match consisted of me attacking from closed guard and I eventually finished him with a kimura. He had super flexible shoulders and I really had to crank it back, enough so that I was quite concerned his arm was going to break. Brian said, “My arm broke three time just watching that.”

Match 2:

Second no-gi match was against a super fast black guy. Again, I tried a failed takedown which led immediately to a counter where he ended up passing my guard. All of his transitions between positions were super quick. I would go for one escape, and before I knew it, he was somewhere else. I was barely surviving his onslaught and he eventually caught me with my arms out of position and finished with an Americana from top smash half guard.

Match 3:

My last match, I went against a kid who had a super strong upper body. He immediately went for an ankle pick and got it. Somewhere in the transition to the ground, he caught me in an arm-in guillotine which wasn’t quite in the right spot on my neck. I’m quite confident in my guillotine survival and at that point just wanted to chill for a bit while he wasted energy squeezing. He gave up on it after around 30s-1m after and I tried to sit up into dogfight. I got the underhook, but then he wrapped around that arm with a D’arce, a choke I’ve never been able to escape from, and finished me. We ended up talking after the match and he was super nice. Shoutout to you, Kiel!


Main Takeaways:

  • My stand up game sucks. I tried to go for some takedowns which all put me in a bad spot. Gotta pull guard from now on until I can make it to more Judo and wrestling classes.
  • I need to flow more and not force things. When I was on bottom, I kept trying to get triangles, most of which ended with him stacking me and passing.
  • My defense was really tested and held up pretty well. I got into a lot of bad positions because of how easy my guard is to pass and while I wasn’t, in most cases, able to escape immediately, I was able to hold off their attacks and almost always get the escape eventually.
  • My closed guard passing is really bad. Every time I want to stand up, they just double ankle picked and swept me. Then I would try for the knee behind butt break, but most of the time got my posture broken down too much to finish it.
  • BJJ competitions are super fun!

Linux Kernel Project Update: Touchpad is Working!

Big thanks to roadrunner2 for his work on getting functionality on his Macbook Pro (which shares alot of the same components as our computers). Apparently, there was a communication breakdown between the device and driver which is fixed by adding short delays between the setup messages. I’m not sure if this is the optimal way to solve it, but at least the trackpad has pretty close to full functionality now!

It makes me very happy to say that I am now typing this blog post from inside Linux on my Macbook.

What still doesn’t work is force touch (pressing harder on the trackpad) and right click via a two finger click (which I utilize alot). Most likely the force touch will be backburnered since it is high effort, low reward, and I can just add two finger click without having to do it from within the kernel itself.

I’ve put off work on the speakers for now since it is relatively unimportant, at least compared to getting resume working.

From what I’ve read and then confirmed for myself, the hard drive, which is nvme, is not shutting down properly. I tried reversing it, but haven’t been able to gleam too much from that process (I’m not experienced enough in reversing). Someone (I apologize for not remembering your name or where you said this) reversed it and was able to find custom op-codes that are manufacturer specific that are called right before OS X shuts down the hard drive.

My debugging of the problem is significantly hindered by the fact that every time I want to test anything, it results in me having to reboot. Thankfully, the ssd is very quick and arch has a small footprint.

Another possible part of the problem is the disabling of LPSS. From what I can tell from intel’s original LPSS patent, it is used to put the computer in a state where data can be recovered later. However, the patent is super old (1999) and an entirely different system or process is being used to suspend.

It is the intersection of these problems (improper nvme shutdown and disabled lpss side-effects) that makes fixing resume so finicky. I’m going to read as much as I can about LPSS and nvme as well as try once again to reverse the Mac driver.

Linux Kernel Project Update: Keyboard is working!

Project introduction here: http://charlieyou.me/linux0/

Max has figured out that if you disable the low power subsystem (LPSS) inside of the SPI driver (pxa2xx.c), then the applespi driver written by cb22 is able to do its job. In other words: the keyboard now works!

Well… mostly. Key rollover still does not work, so you can’t press two keys at the same time and have both be detected. Wakeup from keyboard also doesn’t work. The latter we’ll tackle along with sleep/hiberate issues. The former Max is trying to figure out now.

The immediate next step is to get the trackpad to work as well. Valid data is being read by the IRQ handler, so it should just be a matter of piping it to the correct place.

My focus is now on getting the internal speakers to work. Strangely enough, the headphone jack and internal mic work perfectly, it’s just the speakers that don’t output anything. There’s a bugzilla post for this that’s been a fairly helpful start: https://bugzilla.kernel.org/show_bug.cgi?id=110561. For an overview of the linux audio stack see this article: http://voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/.

So far, I’ve played around with the patches mentioned in the bugzilla as well as hda jack retask to see if I could reroute to a different pin that is hopefully the speaker. No luck with that. Next I tried to just route the output to all unconnected pins, and that did get some sound from the speaker. Not the right sound and the kernel promptly panicked. But it’s something…

After this, the next things to tackle are:

  • Screen tearing
  • Bluetooth
  • Sleep/hibernate

An Update on my Progress in BJJ

It has been exactly two months since I’ve started training Brazilian Jiu-Jitsu and I’ve managed to attend class on average five times per week (excluding last week which was spring break).

I am so glad that I started and am grateful for those who turned my attention to it: Mike Cernovich, who got the idea into my head that I need to build my body and train martial arts; my friend Dan who recommended I listen to the Jocko Podcast; Jocko and Echo, who convinced me that BJJ was an extraordinary martial art; and Joe Rogan and Sam Harris, whose commentary on it pushed me over the edge to finally go to my first class. I am also incredibly thankful that a BJJ gym is so close to me (10 minutes by bus) and that Brian is such an amazing instructor.

So for anyone thinking about training, go and do it, it is probably one of the best things to happen to me.

Onto the progress update…


Defense

This has been my main focus, I want to build my game upon a rock-solid defense. I’ve started every roll from butterfly except for those where my partner insists on playing guard (looking at you, Anthony).

Survival

If I can get into a good survival posture, I can almost always defend submissions against other white belts. The ones I have the most trouble defending against are the ezekiel choke from mount, bow and arrow choke from back, kimura from north/south. My best defenses seem to be against the guillotine and triangle.

The problem is that I can’t always get into a survival posture right out of a transition. This will be one of my main focuses going forward.

Escapes

I still don’t have a reliable side control escape, the standard hip-out-and-insert-knee works sometimes, but I still need to get it down solid. From mount, I can usually get an uppa vs smaller opponents and a knee-elbow vs larger ones. From back control, I seriously don’t have a good escape. I usually have to just try and survive until the round ends.

Playing Guard

In general, my 0pen guard is pretty horrible. It gets passed super easily and I can very rarely recompose it. Grapplearts’ Bottom Game Formula has been super helpful so far, I just need to implement the techniques more often in my rolls. The granby roll-type resets in particular have been hard to implement.

Although, playing spider guard is super fun even though I can’t get the sweep very often. In no-gi, I’m a fan of x and single-leg x to set up the straight ankle lock and guard pass.

From closed guard, I can semi-reliably get a hip-bump sweep and I like using a push-pull with the arm to setup the triangle. I still don’t feel like my armbar from here is tight enough.

Offense

Passing the Guard

Haven’t really focused on this at all, so it’s predictably very underdeveloped.

Control and Transitions

I can hold side control, but have trouble transitioning to mount, especially on smaller opponents where the knee ride isn’t available. As long as I can remember the feet-behind-hips cue, I can hold mount, otherwise, it’s pretty shotty. I haven’t really had enough experience with back mount to have complete control.

Submissions

The submissions I’ve gotten so far are the triangle from closed guard, omaplata from spider guard, and the ezekiel from mount. I’m still searching for that one submission that I really like and will try and master. Right now the triangle is the top contender, but I also really like the guillotine and arm triangle/darce chokes. Will make that decision as I get more experience.

Overall

I still have a long, long, long way to go, obviously. Right now I’m focusing on developing my open guard and getting into survival posture right away when it does get passed. I need to start doing some solo drills, especially related to hip escaping and granby rolls.

I have exactly one month until my first tournament, The Good Fight in Albany. I feel completely unprepared for it, but hopefully can tighten up my game a little before it. My cardio is probably going to be above average and I am going to use that as much as possible. Rounds are eight minutes and if I can make it as tiring for them as possible, I can force a mistake and hopefully get a submission. This means trying to keep it standing if possible and being the aggressor if they pull guard. Endless pressure and constant movement will be the name of the game. I’ll post another update right after the tournament with my results.

Newest Project: Working on the Linux Kernel

This is a long overdue post on our (Max Shavrick and my) work on the Linux kernel for RCOS. We are being supported by Microsoft through mentorship by Stephen Hemminger, who works on the kernel for a living.

Max and I both own the 2015 12″ Macbook (8,1), which unfortunately contains quite a few hardware items that do not yet have drivers in the Linux kernel. Our task is to try and fill these gaps.

The most important of these is getting the keyboard and trackpad to work. The issue is that they are both SPI devices, which Linux does not currently support. In addition, there is not a DMA controller built into the SPI controller as in the 2016 (9,1) Macbook. There are two posts on Bugzilla about it as well as one on Bounty Source. There is also a WIP driver on Github from cb22 that apparently has basic functionality (no rollover or wakeup) on the 2016 Macbook.

By forcing the pxa2xx driver (the main SPI controller for Linux) to not use DMA, Max has been able to detect keypresses and touchpad actions. However, all of the packets are filled with zeros. There are three hypotheses:

  1. We are not reading the correct number of bytes (currently reading 256 in chunks of 8).
  2. We are not correctly acknowledging that we have read the bytes resulting in the last packet being sent.
  3. No bytes are being transferred and an empty buffer is being returned.

At this time, we are not sure how to proceed. We aren’t able to run kgdb since there is no (simple) way to connect via a serial connection.

I’m still wrapping my head around how all of the communication in the kernel works, I’ll have a blog post next week explaining as much as I know.

 

Interesting Links: February 2017

Links

  • Why We Get Fat: “Optimal nutrition is about maximising micronutrients while managing your glucose load so your pancreas can keep up. In addition to managing carbohydrates, moderating protein, increasing fibre and maximising nutrition, are important to optimise body fat and normalise blood glucose.”
  • Why Learning is the New Procrastination: “Stop learning by watching the game. Start learning by playing it.”
  • Charlie Munger on Getting Rich, Wisdom, Focus, Fake Knowledge and More: “While we can’t have his genetics, we can try to steal his approach to rationality. There’s almost no limit to the amount one could learn from studying the Munger mind, so let’s at least get started by running down some of his best ideas.”
  • A Brief History of Existential Terror: “Success, in this view, is to find a fear that is at your level of skill and ambition, something which might not work, and to dance with it. The biggest danger in the modern world is not failure, it’s boredom.”
  • Creating Focus: “Instead of writing some non-sense motivational speech on how to get amped up about your life, we’re going to outline a way to consistently get into ‘the zone’.”
  • 10 Year Projects and Short Term Projects: “If you choose your projects right, life will be very satisfying, full of achievements, every year will be a little easier and better than the last one… I’d like to recommend a guideline to you: only do 10-year projects or short projects, and almost nothing in between.”
  • How Your Climate-Controlled Comfort Is Killing You: “But what if our quest for technology-enabled comfort has actually made us physically and mentally weaker and sicker? What if our bodies actually need discomfort to truly thrive and flourish?”

Books:

Recently Finished:

  • The 22 Immutable Laws of Marketing
  • Stealing Fire
  • Extreme Ownership

Up Next:

  • Contagious
  • Cashvertising
  • The Boron Letters
  • The Robert Collier Letter Book
  • Zen Habits
  • Mindfulness in Plain English
  • The Magic of Thinking Big

How I (Finally) Started a Journaling Habit

It seems that almost every site I follow recommends keeping a journal:

For the longest time (think: years), I’ve tried and failed to keep up a consistent journaling habit. But in the last 100 days, I’ve only missed two and by now it’s a solid habit that doesn’t take any willpower in the morning. In fact, it actually takes willpower not to do it.

So what finally did it?

Fountain pens and nice notebooks. Let me explain…


Journaling is one of those things where you don’t see much benefit from it until after you’ve consistently done it for a while. This makes it hard to fit into the cue-action-reward loop that is required for habit formation.

With meditation, my cue is sitting down at my desk after weighing in and the reward is the feeling of calm immediately proceeding it. With working out, my cue is a certain time every day and the reward is the endorphin rush and chocolate protein shake.

I had the cue worked out for journaling, but was never rewarding myself with anything. When I finally shelled out for a nice pen, ink, and paper (TWSBI Eco, Pilot Iroshizuku, and LEUCHTTURM1917 for you nerds out there :p), the act of writing itself was a pleasant experience and didn’t need an additional reward.

Aside: this is an example of friction and snowball mental models. Reducing friction lets the snowball start to roll down the hill to produce something exponentially greater than what you started with and the energy added.

This makes it much easier to get the action reinforced and once you add a bit of willpower to do it consistently for a bit… Voila! You have a habit!


Something else that helped me was the idea that you don’t need to follow any sort of type of journaling. Just start, experiment, and do what works for you. I tried quite a few that were so complicated that maintaining them took much more time than it was worth.

At first, you may think that you don’t have enough going on in your life to justify journaling, but believe me, once you start, you’ll want to write down everything.

For now, my journaling habit looks something like the following:

  • Immediately after waking: stream of consciousness, 1 page minimum
  • During the day: modified bullet journal to track habits, food, and condensed learnings as well as pending to-dos
  • After BJJ: freeform, anything I learned
  • Before going to bed: what went well and what didn’t