Author: Matt Chung
-
Friday night in
My wife (Jess) and I were both dead tired from yesterday—friends had come over to our house and cooked a Vietnamese meal the night before and we fell asleep around just before midnight, a little over two hours past our bedtime—and we had decided to spend the Friday night staying in doors, eating leftover, vegan…
-
A brief introduction to cache organization
As a software programmer, I always had a vague understanding of how an operating system fetches data from memory. At an abstract level, I understood that a processor requests data from the memory controller, sending a message (with the memory address encoded) across the bus. But I learned recently that in addition to the system’s…
-
Defusing a Binary Bomb (phase 1)
http://blog.itsmemattchung.com/2017/02/28/csapp-defusing-the-bomb-phase-1/ I password protected the original post (email me for the password if you are interested in reading it). When I posted the original link on reddit/r/compsci, multiple commenters suggested that I delete the article to avoid students from cheating (which was not my intention). I then sent an e-mail to the professors (at CMU) and they kindly replied, asking me…
-
How does the modulus operator work?
As a programmer, I’ve written a line or two of code that includes the modulus operator (i.e. “return x % 2“). But, never have I paused to think: “How does the underlying system carry out this operation?” In this post, I limit “underneath the hood” to the lowest level (human readable) programming language: assembly. So, I’ll take…
-
Here’s some assembly instructions … now write the corresponding C code
A wide grin formed on my face, after successfully completing an exercise (from Computer Systems a Programmer’s perspective) that required me to write C code, based off a sequence of a six assembly instructions: void decode1(long *xp, long *yp, long *zp) { /* xp stored in %rdi, yp in %rsi, zp in %rdx) decode1: movq (%rdi),…
-
Let’s get lower than Python
Like a huge swath of other millennial, I dibbled and dabbled in building websites —writing in html, css, and javascript—during my youth, but these days, I primarily code (as a living) in favorite programming language: Python. I once considered Python as one of the lower level programming languages (to a certain degree, it is) but as a I…
-
Calculating page table entry size
How many page table entries are required given a virtual address size and page size? I was confronted with this question when reading Computer Systems from a programmer’s perspective on virtual memory management (VMM) which forced me to reread the chapter, over and over. It wasn’t until I forced myself to close the book, step away from the…
-
Fakebook
Every day for the past two weeks, my friend’s stream of Facebook posts poured onto my timeline, engulfing my entire newsfeed with photos of him and his latest girlfriend, having such a comical time together. They can’t get enough of each other. They really can’t. They are glued at the hips. They must share every dish of food. Pictures…
-
Graduate record examination (GRE) in 2 months
I’m pursuing a master’s degree in computer science and most of the schools I’m applying to— Seattle University, University of Washington, University of Southern California — require that I take the general GRE (graduate record examination). Although I don’t necessarily agree with standarized tests, especially the GRE, I recognize the necessity to establish some sort of bar for…
-
Reflections on 1984
Working the normal nine to five job leaves little time for personal reading, which is why every morning, as soon as I situate myself on the bus, I immediately rip out a book from my backpack and read. I guard this meager time like a gambler and his poker chips. Without these short thirty minute rides to and from work, I…
-
Data structures and algorithms in Java – Inspectional reading
My plan on completing Data Structures and Algorithms in Java by December 31st, 2016, requires changing my reading strategy. Reading technical books cover to cover, like a novel, is rewarding but inefficient and impractical. How about a different approach ? I’m applying active reading principles from How to read a book[1] and A mind for numbers: active reading by questioning author’s intention, indentifying questions author…
-
My GSD alarm
I’m an early bird. I find that I’m the most productive with a little extra time in the morning, which I devote to personal development — meditating, reading, and writing. I wake, usually, to the sound of the alarm; today, though, I woke up naturally. Or so I thought. I glanced at my watch. 05:30AM. I gave…
-
A simple C problem
I’m slowly working through “Computer Systems from a programmer’s perspective” [1] , struggling every bit of the way. I stopped beating myself up about it, though. The code snippets below are in C. The first function, inplace_swap, swaps two integers. The code itself looks lacks intent but I promise you, it swaps two integers. The…
-
Teaching as a form of learning: Binary Search Trees (BST)
Last week, an e-mail was sent out to an internal mailing list [1], looking for volunteers to lecture on data structures & algorithms topics, but nobody replied. I jumped at the opportunity. I volunteered to lecture on binary search trees, without any previous knowledge on the topic. Why in the world would I volunteer to…
-
It’s just a phase
Look through my history, and you’ll find how infrequently I post on Facebook, however, I strongly encourage you to watch this short video clip, especially if you are approaching 30, like me, and plan on having children. This video poignantly touches on the issues, revolving around teenage homosexuality and bullying, that our younger generation is…
-
Learning a new language
I studied Spanish in high school for four years and 10 years later, I’m embarrassed that I can’t form a comprehensible or grammatically correct sentence. I traveled throughout Europe last Christmas and was impressed by the number of bilinguals. Most people fluently spoke a combination of English, French and German. My second language, Vietnamese, however,…
-
A short thank you letter to my body
I’ve been very sick this past week … coughing phelgm, swallowing pain, and battling headaches. Two nights in a row, an uncontrollable cough prevented me from sleeping. This morning, however, I awoke without a sore throat. It goes to show you how much I take you for granted when I’m healthy. My elation at regaining…
-
Python progression path – quiz
Python progression path – From apprentice to guru is a popular StackOverflow post. To categorize whether a person should take his beginner/intermediate course, one of the commentors posted this question: I can better answer this question after reading Fluent Python. Example 1 and Example 2 deal with immutable and mutable data types – respectively. Let’s…
-
Relearning how to juggle
I learned how to juggle 15 years ago. I remember relentlessly practicing in my room late into the night. Within a week, I was comfortably juggling three balls. Recently, I stumbled across YouTube video of someone juggling four balls and was very impressed. How much more difficult is juggling four balls than three, I thought…
-
Belgium terrorist attack and the media
Belgian was this morning. I send my thoughts and prayers to those in Belgium, but I’m worried about the media’s knee jerk accusations of Muslim terrorists. At the moment, there’s no concrete evidence. But why is the live feed incessantly hinting at ISIS and Muslims? I can’t stay updated without feeling the media is inculcating…
-
AWS Lambda part 2 – packaging and deploying
I received positive feedback on my AWS Lambda presentation in London. This post discusses how to package and deploy your lambda function. I’m sure there are other ways but I wanted something simple. This allows me to maintain separate enviroments (i.e “dev”, “production”). Makefile I use Make to create a package (i.e “sample-app.zip”). The dependencies…
-
Monitoring background processes with SumoLogic
This post discusses one way we monitor our background process – which is different than how we monitor our web services. It’s difficult when you can’t send a request/poll the service. I wanted something more than checking if the process is alive. One solution we came up with is is using syslog with a log…
-
Getting older
I was standing outside the car, wiping the dogs’s feet when I overheard a voice. “Are you a young lady or a man?” Did I hear him right? I continued wiping my dogs’s feet and responded: “Well, HER name is Metric. And SHE’S a German Shepherd.” I wanted to make it clear that that we…