Subscribe via Email

Saturday, January 4, 2020

[morriscode deliberate exploration #2] Erlang Message Passing


Morris-code #2: Jan 4, 2019: Erlang Message Passing
Erlang is all about fault tolerant distributed communication. Goal is to set up an mvp where two Erlang processes communicate with each other.
outcome:
  • build a program in erlang where the processes communicate with eachother

post mortem
did I meet the deliverable? (y/n) and why?
    Kinda. Here's the code. didn't have bidirectional communication working, but I think spawn passed a message to another process.

-module(helloworld).
-export([start/0,server/1]).

start() ->
    spawn(server("Hello there!")).


server(Message) ->
    io:fwrite([Message]).



what I learned?
crashdumps get reported all the time using the online compilers. I may have to install my own compiler so I can diagnose stuff better.
I had taken some example code from tutorialpoint and directly pasted it into an online compiler, and it didn't build. So 23/25 minutes was spent debugging. Got this MVP working above. From my understanding spawn creates a new process that runs the server function.
The code works even if I remove the server/1 export, which is odd.

Didn't quite get bidirectional communication working, but I was reading docs about the receive command that lets you do this.

Debugging was my bottleneck. 92% of my time was spent frantically googling to make stuff work.

lingering questions/next step inspiration for future projects?
using the receive function for bidirectional communication. got a bunch of other projects in mind too though that aren't erlang related. may pursue those first.

update: I'm going to just publish these from notion since it's quicker than making a blogpost each time.

You can find my projects here:
https://www.notion.so/morriscode/Focused-deliberate-exploration-08816681b85240d5a4027a51c968f4d1



Friday, January 3, 2020

[morriscode deliberate exploration: #1] Hello Erlang


Quick intro
I overthink stuff, often think "man I wish I was exploring more tech tools and speeding up as a developer"...

My 2x-ex-cofounder Aaron had a blog that really inspired me: peddles projects (see here)
I'm going to try it.

How it works
every day, 30 min
  • select some pre-scoped project, with defined learning objective/deliverable
  • 25 minutes: hack like heck
  • 5 minutes: reflect 
    • did I meet the deliverable? 
    • what'd i learn
    • lingering questions & potential future projects

Why?
  • gain ability to rapidly prototype 
  • remove hesitation of jumping into new tools.
  • get better at just working really fast in a short burst instead of over thinking 
  • learn to scope out work into bitesized chunks
  • learn to group existing projects together over time to solve bigger problems
  • It embodies my "try it now and try it fast" mentality
  • exploring various tools without overthinking may help me discover valuable paths and connections in my mind and in the existing world that I can connect later on and may have not done so b4.
  • If I establish this habit of moving fast and diving into projects it may leak into my other work and accelerate me overall.
  • If this 30min activity daily yields a 1% weekly compound growth on my ability to reason, and move forward on things, that's >50% yearly return, which is insane.
Aaron and I spoke yesterday about this.

I woke up today thinking:

"Hmm... should I try this? Maybe I'll reflect on Sunday and decide then. Need to scope it out after all."

No. Bad. hush OCD hush.

The point is to dive in.

"ugh... but I don't know... what if..?"

NO.

"but...?"

"Should I post this on my blog...? it's going to be so jank"

ahht aht. shhh. no think. just code

"ok here we goooo"



Morris-code #1: Jan 3, 2019: Hello Erlang

Aaron introduced me to functional programming. I never used it much and figure it's perfect for this blog series.  let's get a hello world program working.
outcome:
  • build hello world program in erlang
learning objectives?
  • meta: want to see how this deliberate exploration system works out for me. diving in NOW.
post mortem
did I meet the deliverable? (y/n) and why?
yes, was pretty straight forward getting the helloworld working.
tried to get further and print a variables contents to no avail
what I learned?
  • erlang is compiled to bytecode for a virtual machine (kinda like java?)
  • erlang is built for distributed fault tolerant systems
lingering questions/next step inspiration for future projects?
  • whole point of erlang seems to be distributed message passing, so I'll perhaps create a program where messages are passed between 2 processes and printed out.

ok back tomorrow!

Sunday, December 1, 2019

[Africa 2019] Welcome to Kenya


While working in San Francisco I met incredibly bright and creative individuals. One of them, whom I lived with in the Folsom hackhouse was Nyabuti. He's a microbiologist from Kenya who came over to SF to accelerate various lab processes via deep learning (details here). I was impressed by his hacker mentality and tendency to explore everything. I decided I wanted to visit him in Africa and see where on earth this kind of talent is coming from.

Nyabuti and I had a video chat early May to discuss trip options. A couple weeks later I booked a ticket to Kenya, and on July 6th I arrived solo (first in Addis Ababa, Ethiopia) a week after finishing Uni courses. Time for an adventure!


The language used in the flight tutorial was new to me. I think the language is Amharic. It felt like I just unlocked a new map in a game and have to figure out how to navigate it.

The flight was 17 hrs 33 min total, it went by quick. Winnipeg(Canada) to Toronto(Canada) = 2 hr 23 min
Toronto(Canada) to Addis Ababa (Ethiopia) = 13 hr
Addis Ababa(Ethiopia) to Nairobi (Kenya) = 2 hr 10 min

Upon arrival in Ethiopia I setup my laptop to handle some urgent work on my startup between flights. I couldn't find wifi. I searched for a place with wifi in the airtport, then realized I was thirsty. Come to think of it, where do I get water?

I prioritized wifi before water supply... This was the first of many reality checks I expect to face, and this is why I travel.



Arrival in Kenya
When I landed in Kenya and saw Lion King tourist memorabilia, I went "aha!" so this is where lion king came from! Behold, I had less awareness of East Africa than someone from the West whose scholarly pursuits ended at the Lion King. Leading up to this trip I refrained from doing thorough research. I wanted a completely new experience, without preexisting thoughts or opinions on East Africa. I don't wish to have any opinions during the trip either. I'm here to listening, feeling, exist.  

Nyabuti and his brother met me at the airport, and escorted me to their place. I'm staying with their family in a beautiful house within the Ngong region.

I noticed a lot of farm animals in the city: chickens, cows, and -- ok you're probably thinking "wow kyle animals exist in Canada too" -- yeah, I get that; I'm just saying you don't see farm animals on the street where I'm from. They felt more like part of the community here, rather than part of my dinner.

On the first night, I had to learn to sponge bathe (ok tbh I skipped bathing for a couple nights because it looked confusing but figured I had to learn this eventually right?).

For the first few days, I felt like baby again. I don't remember being a baby, but I imagine this is how baby's feel. I had to learn how to navigate, take transportation, bathe.
Navigation is especially hard because most of the city isn't on google maps so you need to actually know where you're going. *screams millennialy*.

In most of my posts, I ramble on about everything I see. I'll still do that; but I also felt like making a more conclusive video showing 1 full day of me roaming around Kenya, solo, with a GoPro camera strapped to my head.


Kenya is awesome, it's hard to summarize it like a story. So I'll just write out a bunch of other cool stuff I noticed for my first week here.

Gangster Rap Matatu 

When you go to the bus stop in Kenya it feels like you're an esteemed prize, and a bunch of people are competing for your attention, slappin' their buses, gesturing for you to get in. The buses (matatu) had elaborate artwork on them, rather than generic fleet-wide branding I'm used to
I try to pick buses that ft. tupac or easy-e because they usually have cali rap blasting inside. (see more @ here)

Food!

Nyabuti's family was more than accommodating, preparing healthy breakfasts, lunches, dinners, and welcoming me to join at any time. They introduced me to Ugali, a cornmeal porridge that is a staple in Kenya, with kale.  I felt so much energy each day I was out there. perhaps this is what it was like actually eating healthy food...













The MPesa Monopoly

There is a dependency on phone providers and data lines for payments in Africa. MPesa is one such provider and has a monopoly here.  It would be like needing a phone provider like Bell or MTS in Canada so you could use Paypal. Interesting...
I saw more Mpesa in Kenya than Starbucks+McDonalds in Canada combined.

Greetings


In Canada if you ask someone "How are you doing?", most will say "good, you?" as if it's just a template response.
In Kenya when I asked someone how they are doing, they responded with something like "My close friend recently got married, I don't fully approve, but I'm managing it well and will continue work, I'm just going to the store now to buy some new clothes for my daughter".

In the West such a sincere response would catch someone off guard. They'd almost be thinking "woah, I asked how you're doing, now HOW you're doing"

I feel more welcomed talking to strangers in Kenya, because the conversations appear more genuine and unique in their initial depth and transparency.


Karen Blixen

I went with Brenda, Nyabuti's sister one day and she brought me to the Karen Blixen Museum.
Karen Blixen was a famous colonial author who settled just nearby Ngong hill and owned a lot of land. The museum was her house, and part of her coffee plantation.

I explored the museum, learning the basics of colonial history

a thought dawned upon me...

What I'm doing:
I build tech that displaces certain workers from jobs. I believe technology is a positive thing in the world and it's our responsibility to keep up to date with it. Hence, by displacing people upwards into more tech-oriented skills I'm ushering in a better future.

What colonialists did
In a very terse sense, colonialists believed they were civilized and knew how to develop the world. They took over aboriginal land and justified their actions by claiming the existing inhabitants were uncivilized and colonialists were doing the gracious act of ushering in a better future.

So... in this sense, I'm a tech-colonialist. This thought perturbed me, probably because colonialism has a bad connotation. Traditional colonialism looks barbaric, and crude; yet my beliefs and actions seem to mimic the colonialist narrative in modern society.


Conclusion

I usually have opinions about things, but I'm not writing this post to play historian or act like some expert voice on colonialism. I'm just bouncing around my thoughts that were spawning at the time. There's an extensive history to colonialism that I feel there's a lot of value in studying.

I enjoy having control and doing what's best for me, but if I'm seriously trying to create a more efficient world -- if this is the schtick I'm pitching to people -- I'm going to have to put the world first. I need to understand those around me and rigorously dissect my beliefs instead of just projecting my own desires on the world as if my way is the right way.
I'm fine with having beliefs and pushing for them, but I don't want to become delusional and push for things as if they are an extension of my identity. If one of my beliefs is false, I want to realize this as quickly as possible and change direction. For example, if automating a certain process DOESN'T create a net add for the world, I don't want to automate it.

Thanks all for letting me stay with you

Wednesday, October 2, 2019

HELL DAY: 24-hour Navy SEAL Training Challenge

Hey friends! My last post was 10 months ago (yikes!)

A lot has happened since then.

I'm living in LA right now. I got into Harvard Business School, launched a company, backpacked across Africa, and now I'm heading to Canada next week to get my graduation documents.

On one hand, I should have been blogging all of this: all these shiny accomplishments and title changes to boost my ego.

On the other hand, I realized all of these life-changing events introduced significant psychological tension I had to overcome personally. I took a few months to reflect, but I'll begin playing blog catch-up now!

To start, here's an experiment I tried with my friends Mohammed and Fahad back at the end of June.

Mohammed is my personal trainer, who played a tremendous role in helping me recover from chronic back injuries (due to injured ribs & spinal damage circa 10 yrs ago).

Fahad (left), Mohammed (Middle), Ya'boi Kyle Morris (right)
We were working out together one day, talking about how inspirational the Navy SEALs are.

I go around thinking I work hard and that I'm putting in good effort; but I was curious: could I handle even a fraction of what the Navy SEALs can do? What is my breaking point? How will I behave when I'm absolutely exhausted beyond comprehension? Knowing the answer to these things would expose a lot about myself and my leadership style under stress. It is also an effective way to make stronger friendships!

A week later we got up at midnight and started training. For 24 nonstop hours we replicated (to the best of our ability) 1 day of the Hell Week exam that all Navy Seal candidates must complete as part of their training.

We live-streamed all 24 hours of the training! Thus, as opposed to writing about it, I'll just link to the summary video.


Check out the Hell Day results here!

note: I highly Mohammed as a trainer if you want someone whose over-the-top about making sure you reach your goals. You'll see for yourself by watching the video above! Winnipeg is super blessed to have him. Check out his site @ https://www.zulgambz.com


Subscribe to Updates via Email