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 graphTwo 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
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.
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.
Although I sometimes find getting paged for operational issues enervating, I wouldn’t have it any other way.
It’s well known that software engineers at Amazon (Web Services) own their systems, end to end. This means that we not only develop and maintain our software, but we operate the underlying system, complete ownership.
From a software point of view, one can run into an infinite number of issues. Got a build error? Roll up them sleeves and start digging through the compilation errors. You committed some code that broke the build? Fix or rollback the changes. You defined a dependency that’s deprecated? Update the dependency and ensure your unit and integration tests pass.
Similarly, we maintain the underlying system. If we deploy our systems to a servers, physical or virtual (e.g. EC2), we must keep it alive, like a breathing entity. From checking disk performance, to checking heap allocation, we monitor our systems closely, configuring monitors to alarm us when any component misbehaves.
In other words, there’s no divide between development and operations. There’s no separate team that handles operational issues, no DevOps. There’s no nonsense like writing our software and then chucking it over to another group to deploy it, a group that would otherwise find it annoying at best and frustrating at worst. Because I’ve been in those positions, where I’m on the hook for deploying software that I cannot fix. Similarly, I’ve been in situations where the deployment fails and then I must ring in someone who’s more familiar with the code base.
But now, I’m in a position where I’m responsible for the code I write.
Why is this important?
Although some would argue that software developers should stick to software development, and that there should be a clear separation of duty, I believe that owning a system end to end promotes operational excellence and a sense of ownership.
Last week, I was sitting behind my desk at work, surfing hacker news and and at the top of the website floated an article by the co founder of “Daily Coding Program”, a small tech start up that e-mails daily newsletters with a programming question. The article shared some of their insights over the past year and how they bootstrapped the company and eventually grew to $2,000 in monthly revenue.
Although I was interested in reading the blog post, I ended skipping over most of it and navigated to their front page, where I scrolled up and down and read more about the company’s product. When I reached the end of the front page, I was confronted with a sample interview question:
There’s a staircase with N steps, and you can climb 1 or 2 steps at a time. Given N, write a function that returns the number of unique ways you can climb the staircase. The order of the steps matters.
This question, I had initially thought, could be solved using some techniques that I recently learned from taking my discrete mathematics course. But to confirm whether or not I could apply permutations and combinations, I hollered at my colleague, repeating the question out loud and asking him how this problem could be solved. And as I started reading the question out loud, “There’s a staircase with N steps, and you can climb …” he interrupted me, finishing my sentence with, “1 or 2 steps at a time.”
Apparently, while preparing for interviews with Google and Microsoft, he had stumbled across this same practice problem.
So after letting him interrupt me, I asked him if this particular problem could be solved with permutations or combinations. In other words, do these two mathematical concepts apply to the problem. He confidently answered, “No — dynamic programming.” He then proceeded to step me through his solution, scribbling down his work on a white piece of 8.5 x 11 that sat on my desk.
Fast forward to now.
I’m at home, starting the next lesson for my discrete mathematics course, the lesson title: “Counting using Recurrence Relations” and “Solutions to Recurrence Relations.” I’m skimming the chapter, building a mental model of what the entire chapters entail, an overview. And when I reached the end of the first chapter, where exercise problems live, I couldn’t help but form a little grin.
To my surprise, the following chapters cover topics relating to the interview question that I had just read. In fact, the exercise in the chapter is phrased almost identically:
Sal climbs stairs by taking either one, two, or three steps at a time. Determine a recursive formula for the number of different ways Sal can climb a flight of n steps.
So, I find it always nice and serendipitous when what you are learning, either in school or on your own, can be applied to real life examples. Albeit, this application was only for an interview question.
When I first started playing ukulele, about six months ago, I would occasionally wince when lifting my fingers off of the nylon strings. Because in the beginning, the flesh of my fingertips were fresh, no callouses. But slowly, over time, after repeatedly striking down on the strings, my fingers gave birth to a new layer of skin, a thick coat protecting them from the piercing pain caused by the strings.
And now my fingers are repeating the same painful cycle.
About a week and a half ago, I started playing my new guitar that’s strung with steel strings, thin and sharp. And last Saturday, I lost track of time, jamming away for a little over an hour. The next morning, my index finger was throbbing, a blister forming at its very tip. As a result, I’ve been unable to play any of my instruments, giving myself a week to let the blister heal (and hopefully develop into a callous). Even now, as I type this up, I twinge in pain every time my left index finger strikes the keyboard.
About six months ago, I enrolled myself in a computer organization (i.e. CS1410) course offered by University of Northern Iowa and I’m taking it remotely from Seattle, where I work full time as software engineer at Amazon (Web Services).
I’ve completed about two thirds of the course, which consists of sixteen homework assignments and three proctored exams, my most recent homework assignment requiring me to code in MIPS, a low level programming language known as assembly. More specifically, I’m tasked with implementing the quicksort, a recursive algorithm, to sort a sequence of integers. This homework assignment targets teaching two important computer science concepts: the run-time stack and calling conventions.
Normally, I complete one homework assignment per week. However, this homework assignment was extremely challenging, taking roughly two and a half weeks to complete. The first couple days I dedicated to drilling the quicksort algorithm into my head, ensuring that I could visualize how the program actually sorts elements in the sequence, reading article after article (and sections from the books that have been collecting dust on my bookshelf); the remainder of the time I spent deep diving into writing the assembly code, typing code and executing in a MIPS simulator. I cannot explain the number of times I grew frustrated, banging my head into the keyboard, because of program crashing. At one point, I was stuck — for three days straight. None of my troubleshooting skills pinpointed me to the root cause. After three days of staring at the code, I finally discovered the problem: I was corrupting the run-time stack. After modifying one single line, updating the instruction to subtract 24 instead of adding 24 to the stack pointer (i.e. $sp register), the quicksort program ran flawlessly.
All in all, I found the homework assignment as challenging but rewarding.
On Saturday, just before the sun began to rise, Jess and I began loading our luggage into black Mazda hatchback for our Christmas trip from Seattle to Los Angeles. Normally, when packing, we haphazardly shove our suit cases into the trunk and squeeze bags between the front and back seats. But this year, we decided to leverage the installed roof rack, purchasing a black cargo bag capable of storing up to 15 cubic feet.
Roof rack from Amazon basics
Storing all our luggage — two ukuleles, a carry on suit case, Christmas presents for family, dry freezed raw dog food-— overhead freed up the entire rear of the car, allowing Jess to set up what she calls the dog palace:
I just finished reading my first science fiction book!
Up until three years ago, I really only read non-fiction books (e.g. The Power of Habit, Outlier) with the single purpose of expanding my intellectual knowledge. I read to increase my depth in a subject (e.g. programming) or read to pick learn about an entirely new subject (e.g. locksmithing). However, I’ve come to realize, after my wife pursuaded me to read the Harry Potter novels, that I can read for fun — no pressure to soak in new information.
So, about six months ago, my Italian colleague (who wears a heavy beard) from Dublin flew over to Seattle, where the Amazon headquarters lives. While he was in town, I suggested that, since he’s an avid reader, we swing by my favorite local, Seattle book store: The Elliot Bay.
Elliot bay bookstore in Seattle
So after work one day, we made plans to hit the book store so I launched the Lyft app (sorry, no Uber for me since reading Susan Fowler’s post that revealed the company’s rampant misogynistic culture) and popped in the destination address.
When we arrived at the bookstore, we scattered in different directions. While mindlessly sauntering, I recalled a memory of me visiting (about 8 months ago) my team’s office located in Dublin in order to ramp up as a new hire. One afternoon, I was sitting next to my colleague and on next to his laptop sat a thick, six inch novel — a science fiction book, the front cover painted with emerald green.
So, back to the book store. While we were walking up and down the various aisles at Elliot Bay, I leaned over and asked him if he could recommend me a science fiction book, a genre I was unfamiliar with and a genre that, up until that point, I had zero interest in. As if he was born for this very moment, he scuttled over from the poetry aisle over to the science fiction section and began scanning the shelf, his index finger running horizontally along the books, his focused eyes rapidly reading the titles. And then, he stopped. He gripped a tiny blue paperback, the title boldly printed with: Caves of Steel.
Front cover of Caves of Steel
I ended up purchasing the book but maintained my low expectations. I had always imagined that science fiction was too abstract, a genre rammed with plots and story lines that disconnect from anything resembling reality. I preferred literary novels — To kill a mockingbird, Boys in the boat; novels that capture the human struggle. Science fiction is just unrealistic, right?
I couldn’t have been more wrong.
I absolutely fell in love with the book (and the genre) and blasted through it within a couple days. Although the book centered around robots, the plot was not so farfetched. In fact, reading page after page, I found myself empathizing with the main character, Elijah, a police detective who laments working with his robot partner and who fears that one day, he’ll be automated out of a job.
The book was written and published in the 1950s and the author — Asimov, the defacto father of robots — paints such a realistic picture of the dystopian future, a future not so out of the question, considering that I currently live in a modern day dystopia: net neutrality was killed in the US today. Furthermore, after finishing up the first book in the series — I’m now on to the second book, The Naked Sun — I can better understand how Elon Musk’s vision (immigrate to outer space) was shaped by Asimo.
In short, if you think that science fiction only appeals to a certain group of people, do yourself a favor and go pick up one of Asimov’s books (e.g. iRobot, Caves of Steel) and I promise you that you’ll lose yourself in the plot, in the writing, in science fiction.
Last Saturday, I woke up at 06:00 AM (about 30 minutes later than I normally wake up on weekdays) and slipped into a striped, cotton t-shirt that my sister bought from target for my last birthday and my favorite knee length corduroy shorts, dressing myself in preparation for a 2 mile, dog friendly run in Tacoma, a city 45 miles south of where I live in North Seattle. I found this event advertised in the pet connection magazine, a free and well circulated newspaper that’s often laying around in the local coffee shops and I decided that, since my wife was gone for the weekend on a women’s retreat, me and our two dogs would kick start the morning off with some exercise.
The night before: eating sorbet ice cream with the dogs
In addition to the 2 mile run, the event included exclusive access to a city owned swimming pool that was opened up for pet dogs. The pool was to be drained and emptied out since summer was coming to an end, so the parks and recreations center decided to allow, for a small fee, owners to bring their dogs in for a swim.
So after getting dressed, I loaded the two dogs in the trunk of my ford escape, fired up the engine, popped the address of the parks and recreation center into Google Maps and then hopped on the I-5 freeway. I had left the house an hour and a half before the event started, leaving myself 45 minutes of buffer; I did this for two reasons: I hate being late and I almost always get lost despite having directions. And good thing I did, because the latter proved true once again, because when I arrived at the destination that I had initially keyed into Google Maps, I found myself pulling the car into an empty parking lot, a clear sign that I was in the wrong place. While idling in the parking lot, I opened up my phone’s browser and began typing away, searching for the correct address. Eventually I landed on the event website, which had the address plastered across the front page. So I took this new address and proceed to hop back on the freeway.
After driving 10 minutes back in the direction I came from, I eventually made it to the right location. I was certain I was in the right place this time but not only was the parking lot packed like a can of sardines, but when the drivers (dressed in running clothes) opened up either the doors of the backseats or trunks, their dogs would leap out.
Now that I was in the right place, I harnessed Metric and Mushroom, and the three of us sauntered over to the center of the park that was bustling with people and dogs, finalizing my registration under registration canopy and then pinning my micro-chipped racing tag to my chest. I then stepped over to the next canopy, where grocery sized bags, filled with goodies sponsored by Mud Bay, were laid out in rows along a table. I grabbed two bags, one for each dog, and then returned to my parked car, where I locked all my belongings (e.g. phone, wallet) into the glove compartment. With my pockets empty and with the two dogs amped up, ready to go, I proceeded to the starting line.
Two canopies, one for registration, the other for gift bags
A crowd of us runners and our dogs huddled around the starting line, where the event coordinator, a tall man with the voice of a lion, was making some announcements, primarily house keeping items like thanking the sponsors of the event and directions on how to navigate the course. While he wrapped up his speech, I snaked my way to the front of the line, a leash gripped in either hand. After his final announcements, he announced that the race was beginning and counted down, ending with “Go!”
And we were off.
I began jogging at a reasonable pace, a pace of about 9 minutes per mile. But after the first mile, Metric and Mushroom were no longer bolting in front of me. Initially, they were galloping like horses, practically dragging me to the front of the race. But they slowly began to run out of steam, their tongues flopping to the side of their mouth, panting louder with every step. And even though I wanted to power through and maintain my position in third place, I decided (after realizing that I was damn happy that the dogs were healthy enough to run this race with me) to reduce my jog down to a walk, stopping at the next check point, where bowls of water were laid out for the dogs. Metric and Mushroom practically slurped up the entire bowl.
We ended up finishing in 4th place, both dogs completely drained and ready for their nap. But as soon as I walked them over to the swimming pool, they were suddenly filled with energy, as if they didn’t just run 2 miles. I unleashed them from their harnesses and the two of them dashed into the water, spending the next hour paddling in the pool, constantly fixing their gaze at me, their way of signalling me to toss a tennis ball for them to fetch.
I really enjoyed the event—running 2 miles and letting the dogs to swim—and will definitely return to Tacoma next year for round two.
Metric and Mushroom staring me down, saying “THROW THE BALL!”
Over the past month, I’ve been investing more time in learning the ukulele, sitting in the office area in the morning, strumming and picking my soprano ukulele for at least 30 minutes either in the early mornings or just before hitting the sack. In addition to my daily routine, I’ve not only been taking weekly, 1 on 1 lessons from a local instructor in Seattle but I’m also reading books (favorite one so far was a short, 40-page book on music theory) and watching videos, playing along with the instructors from The Ukulele Underground. I find this website very impressive not only for the content itself, but how well organized it is, breaking down the website into different levels: beginner and intermediate and advanced. The organization of the website allows me to find exactly what I’m looking for. And when I cannot find the content I’m looking for, their staff is very responsive, replying to my messages.
In addition to my practice routine, where I drill scrumming patterns and drill my understanding of music theory, I make sure to carve out time (even if it’s just a few minutes) to just enjoy the instrument, playing songs that I like. Isn’t that the whole point—enjoying the beauty of music?
Speaking of songs that I like, here’s a video of me practicing the introduction to the song Stand by me. If you watch the entire 20 second video, you’ll be blessed with the special cameo appearance.