Author: mattchung

  • “I’m not going to raise my kids the way my parents raised me”

    We’ve all heard people, including me, say “I’m raising my kids differently” or “I’m never going to raise my kids the way my parents raised me”. I hear that all the time. But, have you ever heard someone say “I’m going to raise my kids just like my parents raised me”.

    I doubt it.

    I’ve never heard anyone mouthed those words.

    I think it’s because we as a society often focus on all the negative ways in which our parents raised us, recalling all the drama and trauma that afflicted us. And in reaction to that trauma, we announce that we will behave differently, raise our kids differently. For example, if often goes like this: someone was abused (physically or emotionally) by their parent and then take every measure to ensure that they do not abuse their child. Or someone felt that their parents hovered over them too much, controlled every element of their life; and as a result, they create a house in which liberty exists, a sense of freedom.  In a way, that’s great — the next generation reaps those benefits. But still, it’s an act in opposition.

    But what about passing on positive life lessons that we want to pass on? The good stuff that we want to continue ?

  • My first singing (and guitar) recital

    This past Saturday, I sang and accompanied myself on the guitar, my first time singing in front of a crowd of about 20 people.  I played my arrangement of one of my favorite songs: No Regrets by Mike Love.

    Leading up to the actual performance, so many nerves and anxiety ran through my body. What if I mess up? What if I forget the lyrics? Minutes before I took the stage, my brain started playing tricks on me, suddenly unable to recall the lyrics to the chorus, despite me practicing this song probably over 100 times (bless my wife for listening to all these hours of practice). But because I’m familiar with my brain playing tricks on me — it does the same thing when I publicly speak — I simply drew in a couple deep breathes and put those thoughts to rest, trusting myself.

    All in all, I feel proud. The performance went well and my wife recorded my recital and you can watch it here:

  • Friday donut ritual

    Today is donut day! Actually, every Friday is donut day.

    I started a weekly ritual about six months ago. Every Friday, my entire team (apart from one or two people) rides the elevator from the 13th floor down to the lobby, and then we proceed to take a brisk 2 minute walk Mighty O: Seattle-based shop that serves vegan donuts.  Once we arrive, I firmly grip the handle of the glass door, swinging it wide open and rushing the counter, where donut samples lies on a silver shiny platter.  I lower my head towards the samples, my nose hovering half an inch above them, and inhale deeply, getting a sweet whiff of all sweet smells: chocolate, vanilla, french toast.

    Following scarfing down a sample (sometimes two), I saunter over to the cashier and place my order: a french toast donut and a large almond milk chai.  Occasionally, I order a different flavored donut, depending if Mighty O offers a seasonal donut that appeals to my senses. For example, a few weeks back, Mighty O concocted an ore flavored donut — it was damn nice. But normally, I stick to the french toast.

    What can I say ? I’m a creature of habit.

    This entire donut routine spawns from my affinity for donuts. It’s an emotional food.  For me, donuts sends me back to my childhood.  When I was a young boy, about seven or eight, my father would drive me to school, the little me sitting in the front seat, feet dangling off the edge, too short to reach the floor. On the way to school, my father would stop by a local donut shop with a drive through ordering; we rarely (if never) ate inside the actual store.  As we pulled up to order, a cashier would slide open the drive through window, and my father would proceed with ordering: chocolate bar for him, me the sugar glaze with a side of milk.

    At the end of the day, here it is: I love donuts.

     

  • Why I love Seattle

    I consider Seattle my new home.

    Perhaps it’s the lack of pretension.  Folks around here tend to pragmatically dress themselves: sneakers, blue jeans, puffy Patagonia down jacket. This is unlike how people dress themselves in southern California, where I lived for over 25 years, where the overall vibe is to dress to impress. I admit, I once bought into that lifestyle, setting my alarm hour an hour earlier than normal in order to iron both my pin striped business long sleeve shirts along with my cream colored khakis. But not anymore — I dress for comfort.

    Perhaps it’s the overwhelming love people have for their furry four legged babies.  On the weekends, rain or shine, you’ll find the park bustling with people walking their dogs,  winding up and launching tennis balls into the lake, their dogs galloping at full speed and diving in for the retrieve. Dogs love swimming.

    It’s beautiful.

    Or perhaps Seattle just happens to be the city in which I started feeling comfortable under own skin, shaking off years of built up anxiety and self consciousness and low self esteem. It’s here in this city that I not only found my singing voice, thanks to Liz Frazier (a top notch vocal instructor), but a voice that resonates with love and confidence and conviction.

    Seattle. Thank you.

  • The beauty of dynamic programming

    I just discovered dynamic programming and damn, I’m blown away by the concept.  The other day, hile working through a homework assignment, I compared the run times between two python functions that I wrote, one function written recursively and the other written in a dynamic programming fashion.  Starting with the recursive solution, I arrived at the following:

    def fibonacci(n):
        if n == 0:
            return 0
        if n == 1:
            return 1
        return fibonacci(n-1) + fibonacci(n-2)
    

    That’s a fairly standard implementation of Fibonacci. There are two base cases; n=0; n=1.  So when n is either of these two numbers, the function simply returns 0 or 1, respectively.  But for any other number, the function recursively calls itself until reaching the aforementioned base cases.

    So far so good, right?  And for calculating small values of n, this implementation doesn’t really present a problem. But say we want to calculate fibonacci when n equals 40. How long does this take? Alarmingly, this computation hovers around 45 seconds:

    ./fibonacci.py 40
    fibonacci(40) = 102334155 took 45.22154 seconds
    

    Now, what if we run the same calculation. But this time, we run it using a dynamic programming technique? How much time does that shave off?

    ./fibonacci.py  --dynamic-programming 40
    fibonacci(40) = 102334155 took 0.00002 seconds
    

    What ?! From 45 seconds down to under a millisecond ?! How is that possible?

    def fibonacci_dynamic_programming(n):
        fibonacci = [0,1]
        for _ in range(0, n):
            fibonacci.append(fibonacci[-1] + fibonacci[-2])
        return fibonacci[n-1] + fibonacci[n-2]

    As you can see from the code above, instead of recurisvely calling fibonacci, we iteratively calculate all the values. In other words, this implementation runs linearly (i.e. direct proportion to n), unlike the first, recursive implementation, which runs exponentially.

     

     

  • Disabling remote loading of images (in e-mails)

    On both my laptop and iPhone, I’ve configured my e-mail clients to disable a setting called “Load Remote Images.”  Although there are a number of benefits in doing so, like reducing network traffic (i.e. bandwidth), my main motivation is this: preventing senders from tracking my e-mail behavior, preventing them from identifying whether or not I’ve open their e-mails.  When loading an image, the e-mail client sends an HTTP request to URL defined for the image(s). This, coupled with the the sender’s ability to craft a unique URL for each image, enables them to check the server’s access logs. In short, it answers the question: “Did they open up my e-mail?”

    Am I paranoid? Perhaps. Is it over the top? Maybe. But allow me provide you a screenshot (below) of an e-mail that I recently received from The Everygrey, an awesome (daily) newsletter sent out to those interested in what’s going on in Seattle.

    Touch base e-mail from Everygrey
    Touch base e-mail from Everygrey

    Despite the above e-mail, I’d like to mention that actually read their e-mails. Every day. But without loading of remote images (as well as not clicking on the links embedded in the e-mail), they can only assume that I’m an inactive user, which obviously isn’t the case.  And although I’ve used them as example, I’m actually defending against more nefarious senders.

  • Why I picked up the guitar

    Although I’ve been playing the ukulele for over a year, I decided to pick up the guitar four months ago, when I returned to Seattle after spending the Christmas holidays in sunny southern California.

    During my visit, my little 13 year old brother and I would occasionally jam. Me on my tenor ukulele strung with a low G, him on his electric guitar (and occasional grand piano).  We’d take turns playing rhythm, a steady tempo of 80 beats per minute.  I would start with strumming a simple I, IV, V progression (i.e. C, F, G), him soloing in the key of C. Then we would swapped roles, him shredding his guitar, me applying my (little) music theory, picking and plucking away, one note at a time.

    One day, while driving in the car by myself from Orange County to Northridge to my mother’s house, I was playing Spotify on my iPhone, music blaring through my Black Mazda hatchback’s speakers, acoustic and indie songs playing, one after another.  Spotify was playing songs listed in my “discover weekly”, a playlist algorithmically Spotify created based off of my listening behavior (i.e. listening to a handful of 80s music and acoustic guitar, over and over and over again).  Anyways, I’m driving up the 405 freeway, two hands on either side of the steering wheel, passively listening to the music in the background. And then, my attention shifts to the song playing, which was about already two minutes in, a song titled “When you love someone — James TW”.  At first, my ears perked up at the beautiful sound of the acoustic guitar, a combination of picking and strumming with an upbeat tempo.  In addition to the guitar, the melody was catchy, although I couldn’t really make out the lyrics.

    With two eyes glued to the road, I hover my right hand over to the center console, grabbing my phone and swiping the phone unblock, tapping on the back, restarting the song to the beginning. And then I intently listened to the song, as I continued to drive up the highway.

    The second time around, the song hit me emotionally, forcing tears to my eyes. Unexpectedly, the song’s lyrics revolve around a young boy whose parents are divorcing. “It don’t make sense. It don’t add up. We’ll love you. No matter what. ” – for some reason, those words shredded me apart. To be honest, I had not cried that hard in a long time (last time, if I can recall correctly, was during the episode of “This is us”, the episode where, spoiler alert, Randall’s father laid in the hospital bed, passing away and dropping words on wisdom before his consciousness faded).

    Anyways, after listening to that beautiful song play about three or four times, I decided that I wanted to learn the guitar and not only play that song, but accompany myself (i.e. sing).

    And for the past four months, that’s what I’ve been doing. Learning that song on the guitar, and only that song, one bar at a time.

     

  • Wrapping up discrete mathematics course

    Last Friday, I took the final exam for my (distant learning) discrete mathematics course and just now I had logged into the student portal (i.e. Blackboard), surprised to find that my exam had not only been graded but my final grade had been posted as well. I finished the course with an 88%, a B, a few points short of an A.  In the past, I would’ve incessantly beat myself up over not achieving the highest grade, denigrating myself with self destructive thoughts: if only I tried harder … if only I studied more … if only I was smarter …

     But not this time.

    This time, I’m inhibiting those thoughts. Instead, I’m celebrating. Celebrating that I’m fortunate enough to be able to take this mathematics course, a course where I learned about: writing proofs, solving Diophantine equations, applying set theory, counting with modular arithmetic, proving assertions with mathematic induction, converting recursive functions into closed form functions using characteristic equations method. Prior to the course, I was never exposed to those concepts.  Looking back, I only vaguely heard of those terms.  And who knows if I get to apply any of those concepts as I pursue a master’s – maybe a PhD, one day. Who knows if I’m lucky enough to apply that knowledge to my job as a software engineer.

    But who cares?  Because really, my goal was to stretch myself, learning more about my field and craft: computer science.

  • Graph theory and upcoming final exam

    I just scheduled my final exam for my discrete mathematics course, now that I submitted my homework for the final assignment covering graph theory. Throughout this assignment, I was introduced to a variety of concepts: Leonard Euler and his discovery of Euler paths and circuits, Hamiltonian paths and circuits, and a handful of graph related terminology (e.g. vertex, edges, degrees, bridge, cut-vertices, isomorphic graphs, trees, forests).

    In addition to the concepts above, I learned two different ways to represent graphs in (computer) memory. One approach is using adjacency matrix, a matrix whose columns and rows are represented by each vertex. The second way to represent a graph is by an incidence matrix; unlike an adjacency graph, an incidence matrix’s columns are vertices, the rows representing edges.

    Star like graph
    Star like graph
    Adjancey and Incidence matrix
    Two ways to represent the (above) graph

    Although the lesson only scratched the surface on graph theory, I reveled in the fact that many of the terms I learned were actually terms that I encountered at work, terms that I had no idea were rooted in mathematics.

    For example, the term forest (in graph theory) is defined as a collection of trees; I encountered this term while working as a system administrator, a time when I managed Active Directory (a centralized authentication system) and all the security rules and policies bound to a forest.

    In addition to the example above, I find comfort in the fact that some data structures (e.g. binary search tree) and algorithms (e.g. breadth first search) that I’ve studied in the past build on top of graph theory.

    Star-like graphs that are nonisomorphic
    Star-like graphs that are nonisomorphic

    In any case, I really enjoyed learning about graph theory, a lesson I’ll continue to build on top of as I pursue my life long study of mathematics and computer science.

  • Career contentment

    Lately, I’m feeling very content with my career.

    For the majority of my life, I’ve been constantly searching for some job that would fulfill me. Like many others working in the tech industry, I had a tendency to hop around from company to company every two years, always switching it up, never allowing myself to settle down. This tactic, of shuffling my career, was somewhat deliberate and strategic in the sense that salaries leap when switching from one company to another. In other words, if you want a substantial increase in your salary, you need to move. Otherwise, your stuck with receiving incremental pay raises that are considered trivial in comparison. For example, when I left Cisco to join Fox Networks, my salary increased by 40% .

    In addition to increasing my salary, I had vigilantly switched from one company to the next because I was afraid of intellectually stagnating, as if the company I was working at would potentially hinder my personal development. And this can be true, to a certain degree, since working for a small mom and pop software company will never present the same technical challenges as working for a large, cloud computing company.

    Regardless, I no longer feel as though there’s some magical company where I would work on a magical team that writes magical code.  In fact, as much as I enjoy working on new features or new products, I revel in maintaining software and systems.  In short, I realize that I control my technical growth and that regardless of what company I work for, I’ll always strive to improve my craft. Moreover, the more I study computer science, the more problems rise to the surface, problems that I would otherwise dismiss due to my lack of understanding.

    Despite my contentment, I’m not saying I’m going to settle down in my current role and current company for the rest of my life. Nobody can predict what’s going to happen in a year (or even tomorrow).  But for the foreseeable future, I see myself staying put, working for Amazon Web Services, developing software and building systems, one byte at a time.