[{"categories":[],"content":"In Walden, Henry David Thoreau recounts his experience spending two years living in a small house he built himself in the woods near Walden Pond. Through this experiment in simple living, he distances himself from what he sees as the exhausting lifestyle of many “civilized” people, such as farmers and carpenters, who work most of their lives just to afford food, shelter, and clothing. Thoreau questions a society in which the cost of these so-called “necessities” demands so much labor that people have little time left to truly live. He challenges the idea that a bigger house, finer clothing, or nicer furniture are worth the amount of life people must trade to obtain them.\nThoreau presents this lifestyle as a choice rather than an inevitability. He suggests that people can choose to pursue the comforts of modern life, paying for them with most of their time and labor, or they can choose a simpler life with fewer material comforts but greater personal freedom. To illustrate this, he contrasts “civilized” society with his idealized view of Indigenous peoples—whom he refers to, using the language of his time, as “savages.” He describes them as “rich” because their way of life allows them to meet their basic needs without the same relentless labor required in industrial society. In this sense, he argues, they possess a kind of freedom that many “civilized” people have lost.\nOne funny idea (amongst many) in the book is when Thoreau observes that houses constantly collect dust and therefore demand endless cleaning and maintenance, while grass does not accumulate dust at all. This humorous comparison highlights a broader point: the more possessions we have, the more time and energy we must spend taking care of them.\nReading this work made me think critically about my own spending and lifestyle. For example, can I justify working two weeks just to pay my monthly rent? Or could I live with \u0026ldquo;less\u0026rdquo;?\nThoreau’s ideas can also be connected to modern technology. In Walden, he suggests that it is not we who own our houses, but the houses that \u0026ldquo;got\u0026rdquo; us. In a similar way, we might ask whether today it is really we who own our phones, or if, in some sense, they have come to own us. Just as houses required constant labor and upkeep in Thoreau’s time, smartphones notifications demand constant attention, time, and mental energy, raising the question of whether it is really we who own our phones, or if, in some sense, they have come to own us (and our attention).\nNote/disclamimer: thoughts are mine, but worded together nicely-er/processed by GPT\n","permalink":"https://cindymiao.ca/posts/walden-essay/","tags":[{"LinkTitle":"Book Review","RelPermalink":"/tags/book-review/"},{"LinkTitle":"Essay","RelPermalink":"/tags/essay/"}],"title":"What are you enslaved by? A modern take on Thoreau's Walden"},{"categories":[],"content":"Just in time for thanksgiving, here is something I\u0026rsquo;ve being wanting to write for a while now. I suppose a lot of poeple would like to ask, Cindy why are you so happy all the time? So today, I\u0026rsquo;d like to share some of my own personal secrets to happiness\u0026hellip;\n1. Being happy with what you CURRENTLY have.\nI think a lot of people (myself in the past included) get so caught up in achieving the next \u0026ldquo;goal\u0026rdquo; that you feel like you can ONLY be happy when its acheived. And then you get disappointed when you realized it was never the thing that you were CHASING that was supposed to bring you happiness.\nMost days I wake up feeling happy that I have a job where I can use my skillset. When I get a task, I feel like its a challenge that I get to work on.\n2. Being happy with who you CURRENTLY are.\nI think another common source of UNHAPPINESS is not loving the current version of yourself. Sure, you can set goals for yourself to achieve, such as exercise more, dress better, earn more money, get prettier, etc. Btu the key to happiness is to love yourself as you ARE. A rheotrical question posits the following: how are you suppose to be happy if you DISLIKE yourself?\nSo the challenge here is how can you have an accurate evaluation of yourself while being happy with who you are, despite all these \u0026ldquo;comparisons\u0026rdquo; that are made daily in a globalized society.\n3. Be as you are.\nI think authenticity is another key ingredient of happiness. This means to truly be youself, and not \u0026ldquo;masking\u0026rdquo; to fit in, or give the answer that you think people want to hear.\nSure, this means you WILL lose friends. Some people WILL naturally dislike you (when you show up as who you are). But this also means that you will find the right people will APPRECIATE you as who you are. And for the rest? You probably didn\u0026rsquo;t want them around in the first place.\n4. Remember that NOTHING is a big deal.\nMade a mistake? It\u0026rsquo;s okay. Late to something? It\u0026rsquo;s okay. Hurt someone by accident? It\u0026rsquo;s okay, as long as you make the right amendments and learn from the experience.\nA wise doctor once told me that besides life and death being irreversible, the other trival things we encounter daily in life pales in comparison.\n5. Stop listening to other people and do what you want to do\nLife is too short to be living for other people. If they want you to do something, or act a certain way, or achieve a certain thing, just tell them to do it themselves. Ultimately it will be you who is living out the consequences of your choices and actions, not them. They have their choice, and you have yours.\n","permalink":"https://cindymiao.ca/posts/keys-to-happiness/","tags":[{"LinkTitle":"Thoughts","RelPermalink":"/tags/thoughts/"}],"title":"What's the key to happiness?"},{"categories":[],"content":"Another year older, another year wiser, or so they’d like to think. I think birthdays are a great time (as ever), to reflect on your year, and be proud of the things you’d accomplished and the obstacles you’d had to overome in such an ever-challenging game as life. I feel like a lot of times people always look towards the future – what goals they want to achieve, where they see themselves, yet we never really reminisce on the past, and the things that we did overcome, maybe unless on “bad things” in the past or fond memories that aren’t possible anymore.\nI sincerly believe that you cannot have the brighest days without the darkest nights—meaning everything is in relation to something else and never stands alone. If we have nothing to compare it to, how can we treasure our lives today?\nSo I’d like to challenge you, the reader, as well, to think about how much you DID grow over the past year. Maybe things aren’t as bad as we think, we just need to take a look at them 🙂\n","permalink":"https://cindymiao.ca/posts/birthday-thoughts/","tags":[{"LinkTitle":"Thoughts","RelPermalink":"/tags/thoughts/"}],"title":"Zooming in on past growth"},{"categories":[],"content":"Early in my first internship, I recall my mentor back then gave us a good introduction to git, and taught us some useful git commands. From then on, I\u0026rsquo;ve accumulated my share of learnings from using git over the years, so if you\u0026rsquo;re just learning git or you\u0026rsquo;re just entering computer science and would like to learn git: don\u0026rsquo;t worry, let me share the basic and most useful git commands that I think are good to know~\nNote: I\u0026rsquo;ve been meaning to write this one for a while, but never got to it.\nTerminology To understand how to use git, you need to know the following concepts:\nRemote repository: this is a version of your project that exists on a centralized server like Github. It allows for collaboration on the same project. Local repository: the copy of the same project, but on your local machine. You make changes here, and then push your changes to the centralized location (the remote repository), where everyone else can see it. Commit: all changes in code are tracked by a history of \u0026ldquo;commits\u0026rdquo;. Each commit has a message, by the author (you), detailing what has been changed, as well as the actual code changes made in that commit. Branching: Each repository has a main (or master) branch, which contains the source of truth for the repository. Each code change has to be verified through pull request reviews and approvals by other team members, before it is taken into the main branch. When you do your own development, you can create a new branch that duplicates the state of the main branch, or the current stable code. Then, you make your code changes locally, and create a pull request to merge your branch (with the new code changes) back into the main branch. This ensures that the main branch always has peer-reviewed and production-ready code. Pull request: Once you are happy with the code changes on your branch, and you\u0026rsquo;re ready to add it to the current stable code of the main branch, you create a pull request. This makes it clear the changes you have made on Github, and allows you to receive comments from the team on your changes. Once the required reviewers have approved, you can merge your changes into main, and add your changes as a part of the latest and greatest stable code. SSH keys To do anything in git, you will need a way to clone the repository, meaning downloading the source code of the project you will be working on from Github onto your local machine. There are different ways of cloning a repository, either through HTTPS or SSH. If you do it through HTTPS, no set up is required, but you will have to enter your github password to authenticate every time you pull/push your changes to the remote repository. Now instead of doing this, most people like to add SSH keys. This is a set of keys that you add to your local machine, which authenticates you to github. That means you won\u0026rsquo;t have to authenticate on every remote read/write.\nThe steps are as follows, and documented in the Github docs as well.\nCheck if you have any existing keys in the /.ssh directory of your laptop, or wsl setup cd ~/.ssh # change into .ssh dir ls -la If you see any file with id_rsa.pub, or id_ed25519.pub, you have an existing key, and you can skip step 2.\nGenerate SSH keys ssh-keygen -t ed25519 -C \u0026#34;\u0026lt;your-email-address\u0026gt;\u0026#34; Next, you can click enter twice for no password and default location. This will generate a private/public key pair.\nAdd your public key to github Open your public key file id_ed25519.pub or id_rsa.pub in whatever editor you want, and copy its contents.\nThen, paste the contents below, where it says \u0026ldquo;Key\u0026rdquo;. Be sure to give your SSH key a Title to, in case you have multiple laptops/environments.\nClick on profile -\u0026gt; Setting on Github, and then look for SSH and GPG keys on the left sidebar Done! That was easy, right? Now will you will be able to pull/push to your repositories without having to enter your password every time.\nBasic workflow Suppose your manager asks you to make a bug fix in on of your team\u0026rsquo;s repositories. You would need to clone the remote respository onto your local computer, make the required bug fix, and then push your changes back up to the remote git repository, such that your team can see it and review your changes before it is merged to the main branch. Here is the regular work flow:\nClone the damn repo. git clone \u0026lt;my-repo\u0026gt; This will clone the remote repository in your current working directory.\nCreate a branch. git checkout -b \u0026lt;my-feature-branch\u0026gt; Like discussed previously, its best practice to create your own branch, do development work there, and then merge it to main. Unless you are the only author of your project, where in that case you can feel free to work off the main branch.\nMake your changes in the source files. Don\u0026rsquo;t forget to press control + s to save!\nAdd your changes. There are some different variations of commands you can do here:\nAdd all your changes. Might not be good if you want to review your changes, or there\u0026rsquo;s some files that you don\u0026rsquo;t want to commit git add . Interactively reviews which changes you would like to add to the commit. This is my favorite command, because you can see in the interactive shell exactly which changes you made (and catch it early if you made any typos or mistakes). git add -u -p Write your commit message. This should be a descriptive message that details the changes you made in this commit.\ngit commit -m \u0026#34;this is my first commit! yay!\u0026#34; Push your commit to the remote repository. git push -u origin \u0026lt;my-feature-branch\u0026gt; You will see that if you don\u0026rsquo;t add the -u -origin here, you will encounter an error. The next time you push to this branch, you won\u0026rsquo;t need those tags.\nNote that this updates the upstream or remote copy of your branch. However, the main branch still does not have your newest changes. Thus, lastly you will need to:\nCreate a pull request to merge your feature branch to main. If you\u0026rsquo;ve made recent changes to a branch and pushed it to the remote repository, there should be a button that pops up on the online IDE to make a pull request. Useful git commands However, sometimes things don\u0026rsquo;t go to plan, and you need another arsenal of git commands in your belt to fix things. Here are some other cases you might encounter\nEditing your last commit For example, you just committed and pushed something, but realized you made a typo after you looked over your pull request on github. Here\u0026rsquo;s what you can do without adding a new commit, and letting everyone also see your typo :)\nMake any corrections to your code, and then stage the new changes. git add . Make the new changes on the old commit. git commit --amend An interactive shell will pop up such that you can edit the commit message if you wish, otherwise just escape out of the interactive terminal (meaning you agree to the previous commit message)\nFinally, Force push to remote. git push -f We have to do a force push on the last step, because we edited the previous commit (basically replaced old commit with new commit), and now our local branch is different from the remote branch, so we have to forcefully update our new commit to the remote (overwriting the old commit).\nObviously, you should not force push on the main/master branch, unless you\u0026rsquo;re feeling otherwise risky that day. Usually there\u0026rsquo;s guards preventing you from doing this on company repositories.\nResolving merge conflicts Now, this is the most tricky one for beginners in my opinion. I remember struggling with this so much in my first computer science class—like what do you mean I have to resolve merge conflicts?? Why are they different and what\u0026rsquo;s up with the squigglies \u0026gt;\u0026gt;\u0026gt;??\nLet\u0026rsquo;s suppose that you and your friend are working on a project together. You created a branch off of main, and your friend created a branch off of main, at around the same time. Your friend is faster than you, and commits her changes, pushes her branch, and then merges her branch to main.\nSo when you commit your changes, push to your branch, and make a pull request, it says that what was on the main branch had changed (because your friend had edited it). Now suppose your friend set some variable, m = 5, in her code. And you decided m = 10. Who\u0026rsquo;s change is the correct one?\nGit also cannot figure out who\u0026rsquo;s change it should take. If you had made a branch after your friend set m = 5, and overwritten it with m = 10, then Git will take your new change. However, because both parties made each change independent of one another (suppose m did not exist in branch main previously), Git doesn\u0026rsquo;t know who to listen to anymore. That\u0026rsquo;s when you need to manually resolve the merge conflicts.\nYou could possibly have a conversation with your partner, and ask why they set m = 5. After the conversation, there are 3 possible outcomes:\nThey convince you that m = 5. So you take their changes (from main), and ignore the incoming changes from your branch You convince them that m = 10. So you take your new incoming changes, and ignore the changes on main For some reason, m = 5 and m = 10 should both exist (you are working on a quantum mechanics project involving schrödinger\u0026rsquo;s cat). Then, you can take both changes. What does this look like in practice?\nSuppose you made some changes in your feature branch \u0026lt;my-feature\u0026gt;, and now you want to merge those changes to main.\nCheckout the main branch. git checkout main Pull any new changes that have occurred on the main branch. git pull Merge your feature branch into main. Note however, if you raise a pull request to merge your feature branch into main, and there are merge conflicts, you will need to merge the otherway around to resolve the conflicts by merging main into your feature branch first, or rather, rebasing your feature branch on top of main (see note below). Then, once the conflicts are resolved, you can finish the pull request and merge your feature branch back into main. git merge \u0026lt;my-feature\u0026gt; If there are merge conflicts, meaning that the new changes occurring on the main branch conflicts with your local changes, you will see that git will prompt you to resolve merge conflicts in the local IDE.\nResolve any merge conflicts. You can do a quick search in the local IDE for \u0026gt;\u0026gt;\u0026gt;, which indicates places where there are merge conflicts to be resolved. Within the interactive IDE, you can choose whether to:\ntake incoming change (from your feature branch) take original change (from main) or keep both changes Once you resolve all the lines with \u0026gt;\u0026gt;\u0026gt;, and the code is fully working, you need to commit your changes.\nMake a merge commit. git add . git commit Note that we don\u0026rsquo;t need to specify a message -m for commit this time, because it will automatically write the commit message for you, something like merging feature into main branch.\nVoilà, you can push the main branch back to remote with the changes from your feature branch merged in. git push Note: an alternate to merging is using git rebase \u0026lt;main\u0026gt; on your feature branch, which re-applies the changes from your feature branch on-top of any new changes in main. It is an alternative to merge, without introducing an additional merge conflict.\ngit log This feels like the ls -la of git (as that is to filesystem). To see the history of the git commits on your current branch just, type the following in your terminal:\nFrom this, we can see that the hash of the last commit was 9c203943954e0f06a7fbe977213be21a2ebf3604, authored by Cindy Miao (that\u0026rsquo;s me!), with the commit message that I made edits to git tutorial.\nFuthermore, we can see that my local branch git-tutorial and main is pointed to this latest commit, whereas my remote main branch is not yet updated and still pointed to 35eTesTtatc3ed471440T6baca7cUabT570841b9.\nSimilarly, to see what branch you\u0026rsquo;re currently on, you can do a:\ngit branch Re-writing history This one is a more complex command. Suppose you want to do a git commit --amend, but you want to do it not only on your last commit, but you want to edit all N of the previous commits. Here\u0026rsquo;s what you can do:\ngit rebase -i HEAD~N where N is the number of commits from the current commit that you would like to edit.\nThen, Git will show you a list of all the last N commits, and give you the option to add a letter to each of them, depending on what you want to do with that commit.\n# Commands: # p, pick \u0026lt;commit\u0026gt; = use commit # r, reword \u0026lt;commit\u0026gt; = use commit, but edit the commit message # e, edit \u0026lt;commit\u0026gt; = use commit, but stop for amending # s, squash \u0026lt;commit\u0026gt; = use commit, but meld into previous commit # f, fixup \u0026lt;commit\u0026gt; = like \u0026#34;squash\u0026#34;, but discard this commit\u0026#39;s log message # x, exec \u0026lt;command\u0026gt; = run command (the rest of the line) using shell # b, break = stop here (continue rebase later with \u0026#39;git rebase --continue\u0026#39;) # d, drop \u0026lt;commit\u0026gt; = remove commit # l, label \u0026lt;label\u0026gt; = label current HEAD with a name # t, reset \u0026lt;label\u0026gt; = reset HEAD to a label # m, merge [-C \u0026lt;commit\u0026gt; | -c \u0026lt;commit\u0026gt;] \u0026lt;label\u0026gt; [# \u0026lt;oneline\u0026gt;] # . create a merge commit using the original merge commit\u0026#39;s # . message (or the oneline, if no original merge commit was # . specified). Use -c \u0026lt;commit\u0026gt; to reword the commit message. # For example, if you pick edit or \u0026ldquo;e\u0026rdquo; for all the past N commits, git will backtrace through history, starting from the last Nth commit. Then, you can edit the last Nth commit, make changes, commit it, and then continue the rebase process, which will allow you to repeat the steps with the last (N - 1)th commit, until the latest commit.\nRevert Okay, suppose you merged a change to \u0026lt;main\u0026gt;, but then realized that you broke something in production\u0026hellip;uh oh. Don\u0026rsquo;t worry, you can just revert that pull request, which will create another commit that reverses the PR. This one is just easy to do on on the IDE (there\u0026rsquo;s a button on your PR to revert it, after you merge it).\nPush your local branch to another remote branch This one I learned very recently. Suppose you want to overwrite your remote branch with changes from a different local branch. For example, I already have a PR open with the remote branch, but I wanted to completely modify the contents by overwritting it with the commits from another branch, without loosing all the history and comments on that open PR. Then, I can force push the contents of a different local branch to that remote branch (which the PR is open on):\ngit push -f origin \u0026lt;local-branch\u0026gt;:\u0026lt;remote-branch\u0026gt; And there you have it, my favorite and most useful git commands! There are plenty others like git stash and git cherry-pick that I didn\u0026rsquo;t get a chance to cover, but they\u0026rsquo;re easy to investigate on your own. And last but not least, have lots of fun with version control 😄\n","permalink":"https://cindymiao.ca/posts/my-favorite-git-commands/","tags":[{"LinkTitle":"Code_tutorial","RelPermalink":"/tags/code_tutorial/"}],"title":"A beginner's Git tutorial"},{"categories":[],"content":"The cloud has become such a popular term, but what does it really mean? What does it mean to your data backed up to \u0026ldquo;the cloud\u0026rdquo;? Or apps running on \u0026ldquo;the cloud\u0026rdquo;? Where does it all really go?\nAs an engineer working in Microsoft Azure, let me explain some of these broader concepts. I will be using Microsoft\u0026rsquo;s cloud as an example, but these concepts can be extended to any cloud, like Google GCP or Amazon AWS.\nI will be explaining this concept in a top-down fashion: from cloud → regions → datacenters → racks → VMs/containers.\nAlso a side note, I work in the space of on-premise cloud, so discussing the public cloud is one step away from my area of expertise\u0026ndash;please correct me if any information is misplaced.\nCloud In the world of Microsoft Azure, there are 4 distinct clouds. If you install the Azure CLI which enables you to interact with Azure resources via the terminal, you can run the below command:\naz cloud list --output table Which returns a list of all the clouds in Azure!\nIsActive Name Profile ---------- ----------------- --------- True AzureCloud latest False AzureChinaCloud latest False AzureUSGovernment latest False AzureGermanCloud latest As you can see, Azure has isolated sovereign clouds operating in US, China and Germany that are separate from the Azure Pubic Cloud. This is because they need to meet nation specific requirements in terms of security, compliance etc, in those regions. On that note, Satya just recently announced bringing M365 services to the sovereign cloud to match European data regulations.\nLet\u0026rsquo;s take a look at the cloud of interest to us for this article—the Azure Public Cloud.\nPublic Cloud The Azure public cloud is divided into 70+ regions globally. Each region consists of a number of datacenters, joined by a network, and each region is contained within a single geography (country). You can find the full list of regions here From Microsoft documentation: Azure Regions List The next level down from regions are availability zones. These are groupings of datacenters within a region, where each availability zone has \u0026ldquo;independent power, cooling, and networking infrastructure, so that if one zone experiences an outage, then regional services, capacity, and high availability are supported by the remaining zones.\u0026rdquo;\nFrom Microsoft Azure documentation: What are Azure availability zones? | Microsoft Learn Finally, we\u0026rsquo;ve peeled back enough layers to actually get to the datacenter in the hierarchy.\nDatacenter Image from Microsoft News: Understanding Micrsoft Datacenters This is a datacenter.\nImage from Microsoft News: Understanding Microsoft Datacenters These are racks within a datacenter. Each rack is connected to multiple servers. And each server can run multiple VM\u0026rsquo;s or containers (more on that later).\nVirtual machines Virtual machines are like isolated virtual computers on a physical host computer. Thus, one physical computer/host can have multiple virtual machines running on it, each with their own application and operating system. Virtualization at this level is achieved by creating an additional layer of abstraction, called the hypervisor, on top of the host hardware (in the case of bare-metal servers). The hypervisor manages the amount of resources allocated to each VM and provides isolation between the VMs.\n|--------| |---------| |--------| | VM1 | | VM2 | | VM N | | apps | | apps | ..... | apps | | OS | | OS | | OS | |--------| |---------| |--------| ------------------------------------------ | Hypervisor | ------------------------------------------ | Hardware | ------------------------------------------ Service models (IaaS vs PaaS vs SaaS) Now we have a bunch of compute power. How do we sell it to customers? That\u0026rsquo;s the main question the cloud service model answers. Different customers like large enterprises (with their own IT department) have different needs compared to small business (who are not knowledgeable about IT and want a fully-fledged solution), compared to a student who wants to simply run their app on the cloud.\nIaaS In the IaaS model, you get virtual machines. This works for any customers who have existing physical infrastructure, and would like to transition their workloads to the cloud. The customer can choose from a variety of machine specs for different uses (e.g., AI, graphics), as well as the VM image itself (e.g., for Windows server, ubuntu, etc). Although the complexity of the backend infrastructure is managed by the cloud provider, the customer will need to manage the VMs themselves, including virtualized networking, and the OS, on top of any data and applications.\nPaaS In the PaaS model, you manage applications and data. The virtual machine aspect is abstracted away from customers. Instead, you use Azure storage for your data needs, and Azure App service to deploy your app, either in code or as a container.\nSaaS Software as a service is basically any cloud-based application delivered over the internet. Users use the internet or an installed web client to use the software, and does not need to worry about the underlying infrastructure. Common examples include gmail, slack, teams, etc.\nConclusion Thus, we can see that the public cloud delivers a wide range of services— from virtual machines, containers, and bare-metal resources to fully managed applications and platforms—all hosted on the cloud provider’s infrastructure.\nSay tuned for part 2, where I will go over the 3 core pillars of cloud compute, and containers (CaaS)!\nReferences:\nhttps://learn.microsoft.com/en-us/azure/reliability/regions-list https://learn.microsoft.com/en-us/azure/reliability/availability-zones-overview https://cloud.google.com/learn/paas-vs-iaas-vs-saas https://news.microsoft.com/datacenters/ ","permalink":"https://cindymiao.ca/posts/up-in-the-clouds-part-1/","tags":[{"LinkTitle":"Technical","RelPermalink":"/tags/technical/"},{"LinkTitle":"Software","RelPermalink":"/tags/software/"}],"title":"Up in the clouds! (Pt. 1)"},{"categories":[],"content":"In a modern society designed for comfort, indulgence and entertainment, too often do we grow complacent of our own situations, without striving to be better (myself included). Is it human nature to avoid difficult situations and take the easier path? Yet an easier path simply means no growth, sure it will be satisfactory in the present, but maybe it’s not the wisest option in a long-term perspective.\nJust yesterday, I was in my Lyft, which reminded me of the day when I just moved to Seattle, taking the Lyft from the airport. At that time, everything was new and shining, and there were innumerable different possibilities I saw in this shining new city. Yet silently and without notice, I started to become complacent of my life here. I had a good job, a nice apartment, enough to eat/drink/entertain–what else was there to be desired? A passive choice at that, I simply avoided any tension because it was easier, my life was good “enough”. Yet maybe it’s this complacency that hinders my very ability to grow. And it’s not saying I’m not “growing” per se. Of course I’m learning new things every day, at work, at life, etc. But it’s limited by something.\nWhen we get welded into our daily routines, it’s hard to see different possibilities. But maybe the tough decision is sometimes the right decision—we just need enough courage to choose it.\n","permalink":"https://cindymiao.ca/posts/complacency-as-the-path-to-ruin/","tags":[{"LinkTitle":"Writings","RelPermalink":"/tags/writings/"}],"title":"complacency as the path to ruin"},{"categories":[],"content":"Exchange was one of my favorite experiences during university. I did study (2 CS courses + 1 elective), but mostly got to experience the university life in Singapore, as well as the local culture and experiences. Another highlight was travelling around SE Asia!\nFunny story: I actually almost didn’t graduate on time because of this exchange experience. Apparently I was supposed to get approval from a Go Global advisor if I were to go on exchange in my last uni semester, but since they had approved my exchange application I thought it meant I was all good. Then, I suddenly got an email while on exchange saying I didn’t meet the grad requirements because I was on exchange. I remember I was in the airBnB in Thailand writing emails to my school’s science advising telling them to please let me graduate. Thankfully everything was sorted out, and I graduated on time!\nAll pictures taken on my Canon G7X Mark III. I actually lost a lot of my photos from Thailand onwards (as I somehow lost my SD card in the midst of relocating to Seattle), but this is the remaining collection.\nAnyways let\u0026rsquo;s get to it~\nThailand Chiang Mai Feeding elephants in Chiang Mai Elephant Sanctuary, Thailand At 6am in the morning, we were picked up by these half-covered open trucks, which they sped on the highway with (I was fearing for my life). After the longest ride of my life, we arrived at the elephant sanctuary. My favorite part was feeding the elephants. There were big and small elephants, and you could give them a banana, which they would happily reach out their trunk to grasp, and put it in their mouth. You could also say a magic word, and they’re trained to open their mouth, and you could directly feed it to them. It was a bit scary to do so at first because you had to get very close to them, probably because they’re gigantic animals and could probably squish you with just their weight, but it was too funny to see their crooked smile when they opened their mouths. You could also go up to take a picture or pet them, but don’t expect them to cooperate (afterall, they’re only there for the free bananas!). BBK (Bangkok) This was one of my favorite places, though I could be biased because I just love people. There are so many people in the city, which means a lot of great food, shopping, and a never ending list of things to do.\nChinatown, BBK We went here on the first night we landed in Bangkok: it was still bustling at ~11pm at night, and there was a lot of food vendors on both sides of the street. Unlike a lot of other night markets for tourists (like that in Phuket), I would say the food here was pretty decent and less touristy. On that note, I would avoid the Khao San night market (it is VERY touristy and non of the food looked good, think funky insects...), while the Chatuchak weekend market was big and had decent food. Muay Thai fight Also one of the \"must-sees\" in Bangkok, this was an interesting experience. The fighters were a lot younger than I expected, and one of them threw up after getting punched in the stomach 😬. So I definitely have mixed feeelings about this one. Tana Restaurant My favorite meal out of this whole trip! I recall we were just coming back from visting the Grand Palace in BBK, and stumbled upon this little shop. I had little expectations, because there weren't that many folks inside, but the stew I had was so favorful and aromatic. Also if you're in Thailand don't forget to try the hot pot and Mookata! Phuket Phi Phi Islands, Thailand To be honest, I didn't really enjoy staying in Phuket, Thailand (if you know, you know). They are mostly famous for the nightlife, and a lot of foreigners (again if you know, you know). The islands and beaches were quite beautiful, though. Also if you're thinking of doing one of the popular speed boat tours to Phi Phi islands (like we did), just be warned that the boat is very very choppy. Vietnam Halong Bay Halong Bay looks like these floating mountains in the water (\u0026ldquo;limtestone monolithic islands\u0026rdquo;), and we booked a tour off of Klook (yes, again) where they take you on a traditional \u0026ldquo;junk\u0026rdquo; boat tour around the bay. We got to explore the impressive rock formations inside a cave, do a hike up one of the islands, and kayak inside a lake in the bay. They also provided delicious food on the boat. Although the water isn\u0026rsquo;t as \u0026ldquo;green\u0026rdquo; as the pictures online, I think the limestone monoliths/islands were breathtaking, and definitely a very unique and memorable experience.\nKayaking in the waters of Halong bay, Vietnam One of the many limestone caves in the area Hoi An This is a really beautiful city, known for the canals throughout its ancient architecture, as well as the lanterns at night. Although I have to warn you that it\u0026rsquo;s VERY touristy here, the atmosphere at night is amazing, with the bright lanterns, music, and boats and latern candles floating across the water. If you\u0026rsquo;re going with your girlfriends, you can dress up in Ao Dai\u0026rsquo;s (traditional Viet dresses) and take pictures by the water.\nLooking across at the other side of the canal An artist busy with his work on the streets Singapore Although this is suppose to be an exchange to Singapore, I guess I don\u0026rsquo;t have the most exciting pictures in this section. I stayed at Prince Geroge\u0026rsquo;s Park (PGP) at NUS, and I actually really liked it, despite the negative commentary on that residence. As mentioned in the beginning, I took 2 CS classes - CS 3245 and CS3240 (modeling and animation), and an elective GEX1007 - Darwin and evolution. There are usually a lot of other exchange students in your classes (I guess it\u0026rsquo;s a really popular exchange destination). And usually the classes with more exchange students are easier 😉. However, do note that the math in Singapore is a lot more intense, meaning that local students will have a much better and deeper grasp of mathematics. I remember I was barely trying to keep up with all the calculations in my CS3240 class (matrices, etc), and had to use my calculator the whole time, meanwhile the local students can just do it in their heads.\nBreakfast at NUS Canteen I absolutely love a good chinese/singaporean breakfast. There are tons of options too, including fried dough sticks (油条), green onion rolls (花捲), tea eggs (茶叶蛋), and the classic Singaporean Kaya toast. You have to get it with a milk tea (for $1) or a Kopi (Singaporean-style coffee with condensed milk). Besides breakfast, the cafeterias at the school are seriously next level. Each canteen (and there are about 6-7) is like a huge foot court with lots of different food stalls and A/C. You can get anything from chicken rice, to dry spicy hot pot, to yong tau foo (noodles with assorted fish balls with tofu/veggies), to rice + dishes. There are so many stalls, and I don’t think I even tried half of them by the time I left. The food is very reasonably priced too, around $5-10 SGD per meal.\nLizard casually chilling in the park in Singapore Yes, these gigantic lizards (they grow up to 3m) are just casually chilling in a park in Singapore. It's always fascinating to see the different native animals when visiting another country. Cloud Forest Dome at Gardens by the Bay, Singapore One of Singapore's most famous attractions is called 'Gardens by the Bay'. Besides the iconic supertree grove, which are these massive architected trees, it also features different domes that show off the fauna from all over the world. The cloud forest dome (above) was my favorite. Squrriel taking a peak This was actually taken at the Singapore Zoo. This little guy was sitting on one of the tree branches in the birds exhit, and I thought it was absolutely adorable. Otherwise, the Singapore Zoo is definitely worth a visit. The range of animals they have is very different to the ones in the West, like tigers, lions, leopards, elephants, giraffes etc. Althought I'm not a proponent of animals being locked up. Clouds above Singaporean Airspace I think I shot this on one of the plane rides in or out of SG. The cloud formations in Singapore are just spectacular—they are much bigger and higher than that in the West Coast in North America. China Hangzhou During my exchange trip, I also snuck in a little time to visit my aunt and uncle in my hometown, Hangzhou. It had been a while since I had visited and the weather was so nice to visit in the springtime, instead of the usual hot summers when I used to visit.\nSpringtime in Hangzhou, China Malaysia One of the malaysian foods I still eat today to this day is Char Kway Teow (stir-fried noodles). It\u0026rsquo;s like pad thai, but less sweet and better ☺️ (sorry in advance if I offended any Thai folks, or any folks that like pad thai). You also have to try Nasi Lemak when in Malaysia.\nKL One of the classic symbols of Kuala Lumpur is the iconic Batu Caves. Besides that, I really loved the 7/11\u0026rsquo;s in KL, as well as the overall city vibes. Like BBK, it is a major big city, with lots of people walking around at night.\nIconic Batu Caves in KL, Malaysia Penang The beaches here were really gorgeous. They also have a bunch of water activites you can do—I tried jet skiing for the first time! It\u0026rsquo;s also not overly crowded, and the sunsets were amazing.\nBeautiful beaches in Penang, Malaysia Bali, Indonesia Bali was another one of my favorite destinations. I think the food there is superb (think mi goreng, nasi goreng, satay skewers, and lots of coconuts!). There are a couple of different places to stay in Bali, and they are quite far apart, depending if you like surfing, yoga retreats, etc. We decided on Ubud because a lot of the popular tourist attractions were there. Also a note on \u0026ldquo;Bali belly\u0026rdquo; or common diarrhea for foreigners when visting Bali—personally my friends and I didn\u0026rsquo;t find it that bad, but of course, always ymmv.\nUbud Tegallalang Rice Terrace in Bali Honestly this wasn't my favorite place. It's suppose to be a A UNESCO World Heritage site featuring \"cascading rice fields\", but it was pretty small and not that impressive in my opinion. It's also not as green as you see in the pictures, so I'm not sure why it's so popular. Baby monkey peeling a stick, in the Monkey Forest Saving the best for last, this is my all-time favorite photo that I took on this trip (and maybe all-time favorite of all). This little girlie/guy was perched on top of a really big cave opening. There are a few monkeys here and there in Singapore, BUT the Monkey Forest in Bali had a ton of monkeys, just walking or laying around. They're mostly minding their own business too (like the elephants), so it's hard to get a good picture. But beware, sometimes if you get to close, they may try to take something from you: a monkey made a grab for my friend's necklace that was hanging around her neck 😅. That\u0026rsquo;s all! Although this post has actually been in the works for about ~2 years now (since I finished exchange), I didn\u0026rsquo;t make much progress on it until recently because I wasn\u0026rsquo;t sure on the direction I wanted to take it in. Hopefully I persuaded you to do an exchange semester (trust me, if I could, I would do another one).\n","permalink":"https://cindymiao.ca/posts/exchange-experience-in-pictures/","tags":[{"LinkTitle":"University","RelPermalink":"/tags/university/"},{"LinkTitle":"Experience","RelPermalink":"/tags/experience/"}],"title":"Exchange Experience in Pictures!"},{"categories":[],"content":"Don’t be afraid to ask questions! Seriously… You see this advice everywhere, and yet it’s one of those easy to say, hard to follow ones. Sometimes the question is just at the tip of your tongue, but something tells you that its a dumb question or “what would people think of me if I ask this?”. I present to you the alternative dilemma: would you rather not know the answer to your question, or maybe be perceived slightly silly by others? I used to be the former type, where I could always care more about how others view me instead of actually receiving very useful and important information that could help me in my job. Now, I would always choose the latter. I think there is also definitely a balance to this, for example, there is definitely such a thing as asking too many questions without looking yourself. I think you would just have to be the judge of where you are on the scale.\nScope out the timeline for your project Make sure you’re on track with your work! 3 months seems like a long time but it passes by just like that. I’m lucky that my manager during the internship had set out timelines for me, but even then I ended up slighly behind, so make sure you have a rough idea of what you should complete and by when. This way, you will have a strong and executable plan of finishing your intern project.\nDo your work seriously, but also don’t forget to have fun! I’m a big fan of the work hard, play hard motto. Especially at a company as big as Microsoft, or any other big tech company, there are so many other interns and fun intern events floating around.\nI definitely encourage you to make the most out of those opportunities, and have lots of fun when you are an intern, because it will not be the same when you are full-time. It’s almost like a fun techy summer camp in my opinion.\nGet to know your team There are obviously pros and cons to an internship model where interns work on their individual projects vs. tackling regular features and tickets for the team. For the former case, you will be responsible for a project end-to-end (pro), however, you may not get to know the operations and day-to-day of the rest of your team as well, since you are so entrenched in your own project (con). I would strongly recommend to talk to the rest of your team, and figure out the on-call schedule, what product the teams owns/maintains, and how your product fits into the bigger picture of your org.\nExplore the Seattle Area This one is more specific to Microsoft interns in Redmond, or any other interns in the Seattle area (Amazon I’m looking at you). But the PNW is very nice in the summer time, except for the occasional heat wave. One of my favorite experiences during my internship in Seattle was exploring the nearby trails–Mt. Rainer was a personal favorite of mine!\nRent a Car! This one is a bit debatable, but if you can drive, I would highly recommend taking the rental car option at Microsoft. Although there are connectors that take you to/from the campus, there are just so much more places you can explore with your own vehicle.\nDon’t commit to summer classes I made the mistake of registering for a summer class when I was interning. Between going to work, attending intern events, hanging out with friends, going to the gym, and exploring the city, I really did not have time to finish my class deliverables. So if you want to really enjoy your time, I would advise to not take summer classes.\nLastly, remember to enjoy your internship and have an amazing summer!\n~Cindy\n","permalink":"https://cindymiao.ca/posts/tips-for-interns/","tags":[{"LinkTitle":"University","RelPermalink":"/tags/university/"}],"title":"Tips for incoming interns (as a former Microsoft SWE intern)!"},{"categories":[],"content":"Quietly and unnoticeably, hours trickles into days, days to years, and years into a quarter of a lifetime. Many people are oblivious or ignorant to the finiteness of a human lifetime. It seems like a hundred years is forever, but doesn’t it alway pass in the blink of an eye? And that’s not counting accidents, sickness and death.\nSo, would you live today differently if you didn’t know tomorrow was guaranteed?\nI think a lot of this comes down to living with intention. Instead of living passively and blinding following what others expect from us, we should look to listen to our own hearts, and follow our own goals and aspirations. Otherwise, we\u0026rsquo;ll always get pulled in five hundred directions trying to satsify the expectations of others, while neglecting the one true opinion that truly mattered—our own. I don’t think living with intention requires a dramatic upheaving of your current life, like giving up your 9-5 job to try to make it as a singer. Instead it could look like setting intentional career goals in your work, and reflecting on what you want to learn in this role, and the skills you want to develop. Of course what you need to contribute for the company is equally important, but I think it’s a two-way street, and a lot of times folks forget the other way.\nLiving with intention can also seep into your hobbies. For example, what do you really want to do with your free time? Are you actively choosing to scroll on social media, or is it a mere passive choice? If it’s the latter, I would encourage you to give a chance in actively choosing something else. And if that thing ends up being using social media to connect with others, so be it. But a lot of the times, we don’t choose it per se, but it’s right there in front of us, and we’re tired. Until we remember that hours passed to days, days to years, and years into a quarter of a life time.\nSo, would you live today differently if you didn’t know tomorrow was guaranteed?\n","permalink":"https://cindymiao.ca/posts/a-human-lifetime/","tags":[{"LinkTitle":"Writings","RelPermalink":"/tags/writings/"},{"LinkTitle":"Outlook","RelPermalink":"/tags/outlook/"}],"title":"A human lifetime"},{"categories":[],"content":"That evening when I returned from work, a thought suddenly registered in my head: my apartment was completely and utterly dark. The usual faint glow of the city lights that shone through the windows after you’d turn off all the lights was gone, replaced by an eerie black. So was the hum drum of the fridge, the sound of air passing through the heater, and the whirling of my neighbor’s annoying washing machine. It was more silent than it ever had been. The only light was from an occasional car outside, turning into the pitch black apartment complex. Driving home, darkness engulfed both sides of the street where there used to be entire neighborhoods, as if they were swallowed by the pitch black nothingness. The traffic lights were also gone, replaced by long lines of cars stopping and going, and stopping and going again.\nAnd so I sat there in my room, looking out the window. Except there was really nothing much to see. The darkness inside my apartment blended together with the darkness of the trees and buildings outside as one of the same - all a grotesque black, the darkest shade of black, #000000. The only that wasn’t the same shade of black was the night sky, which stood out against everything else as a dark black-greyish hue.\nEarlier that day, I headed to Safeway for some bread and bottle water, which was probably going to be my meals for however long the outage lasts. The usually lit up signs of the strip mall was absent, and inside the windows was all dark, much like an abandoned mall. There were only a handful of cars parked, mostly outside of Safeway. As I went inside, entire sections had no light, except some where the dim lights powered by the generator illuminated the way. The workers had already emptied or sealed off all the freezer sections.\nSince the power was out for almost all areas in my neighborhood, including restaurants and shops, the few that were lucky enough to be spared were bustling with people. Driving past a corner coffee shop with the unusual but welcoming \u0026ldquo;OPEN\u0026rdquo; sign lit up, the entire shop was packed to the brim of hungry morning commuters. The drive through line at the seemingly only open Starbucks wrapped around out the driveway, blocking the intersection. It marked a stark different to the dim and empty Safeway.\nAt work, our building was crowded with people, including parents bringing their kids. All the conference rooms were occupied, and it took me quite a while to find an empty room to charge my portable charger.\nWithout an actual flashlight, I stumbled around the room, using my phone, attached to my portable charger, as the only source of light. Laying in my bed in the darkness, I checked the outages map on my phone, which was like our usual neighborhood map, but densely speckled with numerous red pentagons, signaling all the areas without power. Things weren\u0026rsquo;t looking too good, as not many areas had been fixed since the outage last night. With a new estimated restoration time of 3 days away, I called a few hotels in the area, but they were all booked. And so, I laid there rather uncomfortably under my 2 duvets and 1 fleece blanket. The cold apartment air made me feel like I was out camping. It was going to be a long few days.\nThe power ended up getting restored after 3 days.\n","permalink":"https://cindymiao.ca/posts/electrical-outages-and-post-apocalyptic-vibes/","tags":[{"LinkTitle":"Writings","RelPermalink":"/tags/writings/"},{"LinkTitle":"Experience","RelPermalink":"/tags/experience/"}],"title":"Windy with a chance of meatballs \u0026 post apocalyptic vibes"},{"categories":[],"content":"I\u0026rsquo;m proud to say that after 5 years of studying computer science, I can finally build a nice static website now (without using anything I learned in class), complete with build pipes and a UI editor. And after following this post, if your relatives or friends hear that your studying CS, and hit you with the classic question \u0026ldquo;so can you make me a website?\u0026rdquo;, you can tell them that you can, but you probably wouldn\u0026rsquo;t want to—unless you receive a very decent compensation of course.\nAlso note that I am not a full stack developer (I only make blogs), so please do correct me if I say anything wrong about websites.\nBackground What are static websites? A static website doesn\u0026rsquo;t mean that the site\u0026rsquo;s content is non-responsive or non-interactive, which is what I thought for the longest time. Instead, it denotes a kind of site where all viewers who visit the same page will see the same content. This means that when a user requests a page from a static website, the web server just has to retreive the stored HTML, CSS and JS files and send them to the user, without any additional processing. Examples of static websites include blogs (like this one!), portfolios, or business websites.\nOn the other hand, the other type of website is a dynamic website, which provides customized content for each user. It achieves this by generating the site content in real-time using server-side scripting. In this process, when the user requests a webpage, the web server retrieves data from the site\u0026rsquo;s database, and creates/returns a customized file for the specified user. This means a dynamic website can provide targeted content based on the user\u0026rsquo;s location, settings and/or preferences. Most complex websites are dynamic, for example e-commerce sites like Amazon and Shopify, or entertainment sites like Netlifx and Youtube.\nOf course we won\u0026rsquo;t need a dynamic site for a blog like this one, so we\u0026rsquo;ll go ahead with a static website.\nWhat tools do we need? Static Site Generator → Hugo Headless CMS → Decap CMS Build \u0026amp; Deploy → Netlify A brief description of each of these tools below:\nStatic Site Generator (SSG) A static site generator takes in the data and content of a site, and generates a ready-made frontend. This is amazing because developers won\u0026rsquo;t need to deal with the UI much, if at all; instead, they can just pick from a variety of open source themes to adopt and plug their content into. Another powerful aspect of static site generators is templating: this means that SSGs create templates for common elements like headers and footers that can be reused across many HTML pages (for example, all the blog posts on a blog will probably have the same header/footer). In addition, a third advantage of SSGs is that site pages are pushed to the content delivery network (CDN) during build time. This takes away the work required from the web server at request time, resulting in better performance and faster load times.\nThere are a variety of Static Site Generators to pick from (see the Jamstack website for a complete list). I personally chose Hugo because I\u0026rsquo;m not the biggest fan of JavaScript, but you can use any static site generator.\nHeadless CMS CMS refers to a Content Management System. A headless CMS is a way of managing content such that the backend content is decoupled from the frontend view. For our use case, we will utilize Decap CMS to give us a nice frontend UI to edit the content. This means that we will have an admin webpage on our website that allows editors to log in and edit the content directly, without accessing the code repository. Decap CMS does this by communicating with GitHub to read/update content. Of course, this step is nice to have, but optional if you don\u0026rsquo;t need an online UI editor to update your content, and just want to do so via your code editor.\nBuild and Deploy We will use Netlify as our tool to deploy and host our website.\nSet-up Now that we got through the boring stuff, we\u0026rsquo;re ready to set-up our website (yay!). Note that I will be working on WSL (Windows Subsystem for Linux), so any commands shown will be for Linux. Since there\u0026rsquo;s lots of official docs or unofficial guides that exists already which describe the steps better than I can, I will just outline a summary of all the steps, and then link each doc or guide that I personally followed.\nCreate a Hugo site For Hugo\u0026rsquo;s official installation docs, see here . I think the hardest part was actually installing Hugo because I found their set-up guide kind of confusing, so I copied the commands I used to do this below:\nDownload the latest Hugo release, either on the command line, or from the Hugo repository wget https://github.com/gohugoio/hugo/releases/download/v0.124.1/hugo_extended_0.124.1_linux-amd64.tar.gz Extract the tarball contents tar -xf hugo_extended_0.124.1_linux-amd64.tar.gz Install hugo sudo apt install hugo Verify the installation worked hugo version After installation, you can use the Quick Start Guide to create your new website!\nTip: Note that you get to pick a theme for your site. It\u0026rsquo;s important to choose one that looks well maintained and documented, as you will need to customize it later on!\nDeploy with Netlify To deploy our site on netlify, all we have to do is create a Netlify account, connect it to our git repo, and then add our build settings (i.e., hugo to build our site). The Netlify docs are pretty straightforward for this part. Netlify provides some very nice build pipelines, which run automatically when you commit on main (this means that our live site will be updated too). We can also trigger manual builds via the Netlify UI.\nThe site will be live at a ...netlify.app/ url. We can also chose to connect to a custom domain.\nThe build pipelines for one of my builds for this blog. May be extra because all of the building is done by Hugo anyways and there\u0026rsquo;s nothing to debug, but it looks pretty.\nIntegration with Decap CMS Decap CMS has a page on integrating Decap CMS with Hugo, but I found this blog post by Arsh Sharma to be more detailed.\nAdd Google Analytics (GA) After you\u0026rsquo;ve published your site on Netlify, you probably would like to know how many visitors your site is getting. To do this, you just have to sign up for a google analytics account, get a tracking ID, and add it to your Hugo config files. I found this blog post to be very clear.\nAnd that\u0026rsquo;s a wrap! Have lots of fun with your new site \u0026#x2728; \u0026#x1f603;\n","permalink":"https://cindymiao.ca/posts/static-websites-with-hugo-decap-cms-and-netlify/","tags":[{"LinkTitle":"Code_tutorial","RelPermalink":"/tags/code_tutorial/"}],"title":"Static sites with Hugo, Decap CMS \u0026 Netlify"},{"categories":[],"content":" CPSC 304: Introduction to Relational Databases (Rachel Pottinger/ Fall 2021) CPSC 310: Introduction to Software Engineering (Elisa Baniassad/ Fall 2020) CPSC 312: Functional and Logic Programming (Steve Wolfman/ Fall 2021) CPSC 314: Computer Graphics (Michiel van de Panne/ Fall 2022) CPSC 317: Internet Computing (Alan Wagner/ Fall 2020) CPSC 320: Intermediate Algorithm Design and Analysis (Patrice Belleville/ Fall 2020) CPSC 322: Introduction to AI (Jordon Johnson/ Fall 2022) CPSC 340: Machine Learning and Data Mining (Mike Gelbart/ Fall 2021) Note: Its funny that I took all of these classes in the fall term—almost as if I didn\u0026rsquo;t go to school for any of the spring terms. But I was most definitely probably just on co-op or taking CPSC 4xx courses.\nAs usual, I try to make these as objective as possible by keeping my opinions in the Experience section, but as an additional disclaimer, everything is based on my personal experience and opinion, so ymmv.\nAlso just for fun, I wanted to summarize all my ratings for these courses by some means, and what better way than making a big buble chart? This graph shows my ratings of all the classes in terms of their respective Interest (X), Difficulty (Y) and Workload (bubble size). I also added a few non-third year courses for comparison.\nNote: I was reading Factfulness by Hans Rosling at the time, which inspired me to make this\nNote: The size of the bubble represents the 3rd dim-\u0026gt;workload\nCPSC 304: Introduction to Relational Databases Introduction All things database related, including entity-relationship/ER models (diagrams that define the data stored in relational databases), database design and normalization, relational query language, SQL, data warehouses and data mining.\nThe course also includes a project in a team of 3, where you you design a database schema for a real world entity (e.g., school, library), from drafting the database schema diagram, to creating the tables and inserting dummy data, to creating a backend to query the database.\nLecture Topics ER diagrams database schema normalization, functional dependencies relational algebra SQL queries data warehousing and data mining Coursework database project with 6 milestones 2 midterms + final exam in class exercises Project The project was only worth 25%, and accordingly, it\u0026rsquo;s not a big or difficult portion of the class, but it does take some time to complete and discuss with your team.\nA snippet of the Entity-relation diagram for our project—a database for a courier service like Fedex. If you look at the entities in the centre joined to the orange triangle, you can see that there are 2 types of employees: PostOfficeEmployee, and Delivery Staff, and they do not overlap, as represented by the triangle (i.e., post office employees do not deliever packages). This is the kind of stuff we learn in the course. We began by choosing a real-world database application, for example a library management system that keeps a books catalogue, users, each users\u0026rsquo; borrowed books and due dates, etc. This also included drawing the ER diagram, where the entities and relationships of the system are modelled. Then we mapped the diagram to tables, which included deciding on keys and normalizing the tables to a standard format to reduce redundancy. Finally, we created the tables in SQL, and populated them with dummy data. I think this part of the project took the longest simply because of the number of tables and relationships.\nThe end product was a webpage, which allows the user to do some sample queries on the database, for example, \u0026ldquo;Insert a new book into the library\u0026rdquo;, or \u0026ldquo;Select the average cost of all the books in the library\u0026rdquo;. The backend portion consisted of creating the SQL connection and executing the queries. The webpage also has a simple HTML/CSS frontend for the user to enter a few details of their query, like the name of the new book to be inserted, and see the printed table contents after the query. This coding portion was very minimal, and mostly copying pasting from a provided template and then modifying the contents.\nTech stack\nDatabase: Oracle DB Database access: SQL plus backend/SQL connection: Java/JDBC or PHP frontend: HTML/CSS Experience Personally, I found the course material to be very theoretical (such as creating very complicated ER diagrams for no reason) for a course that I thought was going to be more practical. I also have a hunch that this course material may be very old and slightly outdated. With the introduction of cloud databases in AWS or Azure, I feel like Oracle DB is declining in popularity (except maybe in government and military organizations where security is a concern), and I would like to have learned about setting up a database with popular open source options like MySQL or PostgreSQL that can be deployed to the cloud.\nIf you already know how to do SQL queries like I did from my previous co-op, then there\u0026rsquo;s not much additional/useful/interesting takeaways from CPSC 304, and don\u0026rsquo;t think that you are obligated to take it because everyone else takes it, or says that databases skills are employable (unless you would like to be a DBA of course). Personally I found that the course clarified a few concepts of SQL queries that I found confusing previously, like complex SQL queries, but for me it wasn\u0026rsquo;t worth a whole term. But if you don\u0026rsquo;t know anything about SQL or databases, then it may be worth learning.\nWorkload: 1.5/5 Difficulty: 1/5 Usefulness: 2/5 CPSC 310: Introduction to Software Engineering Introduction This class is distinctly divided into a theory and project part. The theory portion formalizes software engineering principles and methodologies; this material is covered in lectures and tested in midterms and the final exam. On the other hand for the project portion, you and your partner create a courses and rooms data query engine for UBC, written in TypeScript. The project is split into 4 checkpoints with respective deadlines, and is scored against autobot tests.\nLecture Topics Testing Development Methodology (Agile/scrum) User requirements/stories Refactoring REST Object Oriented Design Principles \u0026amp; Patterns (Factory, Singleton, Visitor) Ethics Project Overview\nThe application you build takes a query from the user and returns a list of either courses or rooms at UBC matching the query criteria. Specifically, it allows user to add datasets of either UBC courses or rooms, and then proceed to make some query like “show me all courses with an average \u0026gt; 60” or “show me all rooms with \u0026lt; 30 seats”. The program then returns a list of all courses or rooms matching the criteria. The project is done in partners, and split into 4 checkpoints: (1) writing tests, (2) backend for adding dataset and parsing query, (3) adding more advanced backend \u0026ndash; support for rooms and transformations, (4) adding the web server and UI. Scores are evaluated by a set of tests that are automatically run on your project for each merge onto the master branch.\nTech stack\nMostly TypeScript for the backend (TypeScript is JavaScript plus object oriented features), and requests and results are in JSON. Tests are written with Mocha and Chai. The web server is written with the REST server library restify, and the frontend is in vanilla JavaScript.\nRecommendations\nStart each checkpoint early if you think you need help. Piazza/office hours get really busy close to the deadline. A reliable partner is pretty important for this class. I thought the project workload was pretty heavy, and was barely able to finish my portion of the work on time. Read up on some TypeScript/JavaScript if you’ve never used a functional language before. It’s quite different from Java, Python or C/C++. Experience Lectures are pretty optional, since most of the information is on the slides. Midterms are true/false questions, which makes it easy if you’ve looked at the slides.\nMy portion of the project (add dataset) consisted of mostly asynchronous code, using promises. Considering I have no experience in neither JavaScript nor async code, this was a very difficult and daunting task in the beginning. I had no clue what I was doing with promises and TypeScript. After writing lots of code, I still had no clue I was doing, but the code works.\nOverall, the project was lots of work (and will be difficult if you don’t know JavaScript or promises), but the lecture material is super easy and straightforward.\nWorkload: 4.5/5 Difficulty: 2.5/5 Usefulness: 3/5 CPSC 312 Functional and Logic Programming Introduction This course provides an overview of 2 languages: Haskell (functional) and Prolog (logical), which are both very different from object oriented lanaugages like Java or Python. Though the emphasis is mostly focused on how to write code with these languages, the course also includes the underlying details of how they work and their potential use cases/strengths.\nThere is also a group project (2-4 people) where we chose either Haskell or Prolog, and created anything we\u0026rsquo;d like really, as long as it incorporates something that we explorered by ourselves that wasn\u0026rsquo;t taught in class.\nLecture Topics Haskell—first half of the course Prolog—second half of the course Coursework 7 Bi-weekly quizzes ~65% 1 project ~20% no exams/midterms Experience Most of the course weight was on the bi-weekly quizzes, which contained either M/C questions or very short coding questions with autograder tests. Overall, these were fairly straightforward, and the course itself is not too difficult. However, I did find it hard to adjust to the way of thinking of Haskell and Prolog, and was frustrated at times because \u0026ldquo;I would be able to do this way easier in Python\u0026rdquo;, simply because I wasn\u0026rsquo;t accustomed to the properties of these languages. In retrospect, these languages are actually quite intersting as they compel your brain to think in a completely differently way about coding.\nThe project is much more unstructured than regular computer science class coding assignments, and more like a Hackathon project, but you can only use Haskell or Prolog. Though I was skeptical at first, I think our project turned out okay, and our team was able to build something interesting with Prolog (a grammer checker bot).\nWorkload: 2/5 Difficulty: 2.5/5 Usefulness: 2/5 Resources CPSC312 W2021 Course Website CPSC 314 Computer Graphics Introduction The sphere (and the other objects) floating in the centre of this scene is actually situated inside a 6-sided cube (\"skybox cube-map\"), with a texture-map of the mountains/water/bridge mapped onto each face of the cube. The skybox cube-map simulates an environment pretty well! Computer Graphics are images created by computers (obviously), but these 2D computer generated images are actually constructed by manipulating 3D models of objects and then rendering them in two-dimension. For example, in video games where your character is constantly changing positions, this strategy of creating images is very useful\u0026ndash;in fact, video games render images in real-time.\nTo do this, we start with our object represented as many small triangles (or rather the geometric coordinates of these triangles), and call a series of operations: 1) transform/rotate/scale the object into the desired location/orientation/size, 2) project the object onto a 2d coordinate system, 3) clip any parts of the object that lie outside our camera\u0026rsquo;s field of view, and 4) interpolate color for each pixel in a triangle via rasterization. The result is a color value for each pixel in the final image, and this process is referred to as the graphics pipeline.\nOf course, there are many subtle complexities in the graphics pipelines, including when you have many objects in a scene, and need to calculate which object is closer and therefore will cover all objects farther than it in your 2d image, referred to as occlusion. In addition, simulating lightning (i.e., adding a light source like the sun) is also challenging because light can be reflected, transmitted, or bounced off objects depending on their material. One solution for global illumination is ray-tracing, which traces light paths from the eye backwards into the scene.\nLecture Topics Transformations and coordinate systems Projection transformation Culling, clipping, and visibility Rasterization Texture mapping Lighting Animation (briefly) Coursework ~7 assignments: 2 math, and 5 coding 2 quizzes final exam Experience Computer graphics mainly utilizes math topics like linear algebra and graphing to manipulate and transform scenes into images, and accordingly, the course has a lot of math. BUT the math is not very hard at all, and I think the more challenging part is actually understanding the computer graphic algorithms.\nAn implementation of raytracing (simulating light by tracing the path of light backwards from each pixel into the scene) that we did for our last assignment. You can see the reflection of the checkerboard floor on the blue sphere, but note that if you look closely you can also see the checkerboard inside the reflection of the pink sphere through the blue sphere (this is because our raytracer implemenation tracks up to 3 bounces of light!!). The coding portion is very fun and not too challenging either. The technologies used is three.js, WebGL, and javascript, and you get to create a scene following the assignment prompts/instructions. There are a lot of detailed instructions so its easy to follow, for example, \u0026ldquo;shade the teapot with the phong shading model\u0026rdquo;, or \u0026ldquo;rotate the skybox cube to the right orientation\u0026rdquo;. The fun part of course is watching your scene develop as your implement each step in the code.\nIf there is one thing I didn\u0026rsquo;t like about this course, it would be that the lectures felt kind of scattered and it can be confusing at times what is happening in class. The lecture slides are also not very helpful in the sense that they focus more on how to do the actual math, and misses the context of what the math is actually used for and where it fits within the computer graphics process. So if you miss the very brief verbal explanation in the beginning (which I probably do since I\u0026rsquo;m always late), you will be very lost the entire class what the math you are doing is actually doing.\nWorkload: 1.5/5 Difficulty: 1.5/5 Usefulness: 2/5 Interest: 4/5 Resources Course website (2023) CPSC 317: Internet Computing Introduction Mostly theoretical course on how the internet works, the 5 layer protocol stack, and its respective protocols, including ethernet, IP, TCP/UDP, DNS, SSH, etc. Also analyzes performance in regards to network metrics like bandwidth and latency, and covers internet security via encryption and possible cyber attacks. Includes three coding assignments related to server, client and socket programming.\nLecture Topics Internet Design IP layer (networking addressing, routing packets) Link layer (ethernet frames/addressing, local area networks, DHCP, ARP) Transport layer (TCP/UDP) and Domain Name System (DNS) Calculating network performance (bandwidth, latency, delay) Reliable data transfer (acknowledgements, sliding window and pipelines) Security Coursework 3 programming assignments Weekly canvas quizzes 4 bigger quizzes Weekly tutorials Experience Very interesting course since I had no prior knowledge of the internet, and mostly theoretical like CPSC 313. The programming assignments are on par with CPSC 313 assignments (but there\u0026rsquo;s only 3). The coding itself is pretty straightforward, but most of the time there’s quite some ambiguity and underspecification, so I usually like to wait until others have clarified the task on Piazza to start the assignment.\nOverall easy assignments, light workload and mostly theoretical material. Good course for anyone that would like to know more about the internet and server/client programming.\nWorkload: 1/5 Difficulty: 1/5 Usefulness: 4/5 Interest: 3.5/5 CPSC 320 Intermediate Algorithm Design and Analysis Systematic study of basic concepts and techniques in the design and analysis of algorithms, illustrated from various problem areas. Topics include: models of computation; choice of data structures; graph-theoretic, algebraic, and text processing algorithms. Source: UBC SSC I too, have no idea what this course description is saying, so putting it into words that are more understandable:\nIntroduction A math and theory heavy course that focuses on algorithm design—for a problem, give a brute force solution, then create a good algorithm, and analysis—prove that your algorithm is correct, and determine the run time. We also analyze some common problem topics, such as greedy algorithms, graph problems, divide and conquer, and memoization/dynamic programming. No real programming involved, only pseudo code in coming up with algorithms, and a heck of a lot of proofs. Overall, the course provides a good starting point for more advanced leet code or interview problems. HOWEVER: even though the course covers some of the same problems in technical interviews, the aim of this course lies more in a mathematical and proof approach to solving these problems, rather than writing a working piece of code to pass your interviews.\nLecture Topics Designing and analyzing algorithms general steps Solving problems via Reduction Graph problems (BFS, DFS) Greedy Algorithms Divide and Conquer Algorithms, Master’s Theorem, recurrence trees Memoization and Dynamic Programming NP-completeness (reduction and proofs) Coursework 5 written assignments in Latex 2 take home tests Weekly tutorials Experience I took this course in the online term (2020W), and it seems like it was made a lot harder than previous in person sessions. They made the midterm so difficult that the average was 18/35 or ~52% (the final was not much better). Other than the absurd difficulty of the tests, this class has a pretty light workload.\nClasses contain no teaching, rather its alternating periods of you working on a worksheet in a breakout room, and the professor going over the answers. The worksheets are mostly straightforward, while the assignments take a bit more effort, though it seems like I either understand it, or not, in the latter case I proceed to write some random stuff, and hope for a lenient TA and part marks. There are also textbook readings and quizzes, but those can be done with a very quick skim.\nOverall, good professor (Patrice), very difficult exams, mostly easy workload except assignments are slightly more work.\nWorkload: 2/5 Difficulty: 3/5 Usefulness: 3/5 Resources For my year, everything was on the course website. CPSC 322: Introduction to AI Introduction If you\u0026rsquo;re looking for a course to learn about all the HOTEST, LATEST, AND TRENDIEST AI TECHNOLOGY, then let me tell you this course is EXACTLY THE OPPOSITE OF THAT. The Al that this course teaches must be made in the 1950\u0026rsquo;s before AI was even invented, because its essentially based on search algorithms, probability and logic. However, if you like funky search algorithms, this might be right up your alley.\nIf you want to learn about modern AI that is not ancient, you\u0026rsquo;re much better off taking CPSC 340 (think neural networks, although its slightly ironic that neural networks were invented in the 1940\u0026rsquo;s). I have a hunch that the lecture topics in this course is nowhere near anything slightly related to modern popular AI/machine learning technology from the last ten (or perhaps even twenty) years.\nNote: I know I said opinions will be in the experience section, but I felt that this should be in the introduction very strongly.\nLecture Topics Search algorithms (DFS, BFS, IDS, LCFS, BestFS, A*, Branch and Bound, IDA*, Memory-bounded A*) Constraint satisfaction problems Local Search Planning Logic (propositional logic, datalog, unification) Probability theory (Bayesian networks, independence) Decision theory Coursework 5 written assignments: 20% midterm: 30% final exam: 48% clickers: 2% Experience To be very honest, I found that the lectures for this class are fairly boring because the pace is pretty slow and the topics are kind of dull. In fact, I ended up not going to any of the lectures because I was so bored in class, which made it slighly challenging for me during exam week. The assignments are pretty easy and directly based on topics taught in class. There were a few search algorithms that I found pretty interesting (e.g., branch and bound, backtracking), and you get to go into depth about different search algorithms. However this course actually has a LOT of information/topics covered for some reason. Overall, its a moderately easy, slow-paced course, but contains a lot of topics/information, albeit not very useful ones.\nWorkload: 2/5 Difficulty: 2/5 Usefulness: 1/5 Interest: 0.5/5 CPSC 340 Machine Learning and Data Mining Introduction In this class, you can expect to learn about and implement machine learning models mostly from scratch (with provided skeleton code of course), including classifiers such as decision trees, K-means, and Naive Bayes, linear regression with different loss functions and regularization, minimization algorithms (gradient descent) and neural networks. Lectures provide the theory as well as pseudo algorithms, while the assignments are using Python to build machine learning algorithms. This course does have a lot of math, including matrix operations, taking derivatives (of matrices), statistics (probabilities, distribution), and linear algebra.\nLecture Topics Supervised learning: decision trees, Naive Bayes, KNN ML process and principles (training, testing, validation, hyperparameters) Unsupervised learning: K-means, Outlier detection Linear regression (least squares, regularization) and linear classification Latent factor models, principal component analysis (PCA) Neural networks and convolutions Coursework 6 assignments in Latex—mostly code to implement and submit, ~30% midterm + finals Experience I found that this class was THE most interesting and fun 3rd year CPSC course at UBC. Lectures were great to attend because the topics are interesting and Professor Gelbart delivers them well.\nAssignments are done in partners, and mostly consists of code (in Python) to implement the various ml algorithms. It also includes short answer questions, as well as math derivatives/calculations sometimes. I spent a lot more time on the earlier assignments, especially the math parts, but the assignments seemd to get easier, or maybe I got used to writing ml code, as we progressed into the course.\nI think CPSC 340 is great because 1) interesting topic, 2) amazing slides, 3) great professor, 4) we got to implement parts of the machine learning models ourselves, within the provided skeleton code.\nBottom line: Would recommend 100%, even though you might not be doing ml in the future. It\u0026rsquo;s cool to see what it\u0026rsquo;s about, write some machine learning models, and learn about the applications. However you might not like this course if you don\u0026rsquo;t like theortical topics or calculus, and you should definitely be prepared to take some derivatives!\nWorkload: 3/5 Difficulty: 4/5 Usefulness: 3.5/5 Interest: 5/5 Resources Complete lecture recordings from 2017 ","permalink":"https://cindymiao.ca/posts/all-cpsc-3xx-courses-review/","tags":[{"LinkTitle":"Course_review","RelPermalink":"/tags/course_review/"},{"LinkTitle":"University","RelPermalink":"/tags/university/"}],"title":"All CPSC 3xx Courses Review"},{"categories":[],"content":"","permalink":"https://cindymiao.ca/manifest.json","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.de/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.es/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.fr/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.hi/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.jp/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.nl/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.pl/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.ru/","tags":[],"title":""},{"categories":[],"content":"","permalink":"https://cindymiao.ca/search/_index.zh-cn/","tags":[],"title":""},{"categories":[],"content":"My name is Cindy Miao and I\u0026rsquo;m currently a software developer based in Seattle, WA. I graduated from the University of British Columbia (UBC) in \u0026lsquo;23 with a BSc in computer science. In my leisure time, you can find me reading non-fiction or sci-fi books, hiking, playing Mendelssohn\u0026rsquo;s rondo capriccioso on the piano, or enjoying my favorite racquet sports. ","permalink":"https://cindymiao.ca/about/","tags":[],"title":"Hi there!"},{"categories":[],"content":"Note: my favorite books are bolded\n2025 Jul Piranesi. (Clarke, Susanna) Feb The Lord of the Rings. (Tolkien, J. R. R.) 2024 August After the Worst Day Ever: What Sick Kids Know About Sustaining Hope in Chronic Illness. (Bidwell, Duane R.) July Cured: The Life-changing Science of Spontaneous Healing. (Rediger, Jeffrey) June Dune. (Herbert, Frank) The Choice for Love: Entering Into A New, Enlightened Relationship With Yourself, Others \u0026amp; the World. (De Angelis, Barbara) Beautiful People: My Thirteen Truths About Disability. (Blake, Melissa) Points of Interest: In Search of the Places, People, and Stories of B.C. (Edited by David Beers and Andrea Bennett) May Life, the Universe and Everything. (Douglas Adams) The Restaurant at the End of the Universe. (Douglas Adams) April Digital Minimalism: Choosing a Focused Life in a Noisy World by Cal Newport\nHIGHLY RECOMMEND as this book is the reason this blog exists today (otherwise I would\u0026rsquo;ve been on tiktok) The Hitchhiker\u0026rsquo;s Guide to the Galaxy by Douglas Adams\nThe first book in a series of 6, this is the best fiction book I\u0026rsquo;ve read in a long time. Adams\u0026rsquo; comedy is out of this world, literally. The Four Agreements by Miguel Ruiz March Parallel Worlds by Michio Kaku Feb. Welcome to the Universe by Neil deGrasse Tyson A Brief History of Time Stephen Hawking Jan. Comos by Carl Sagan Millionaire Teacher by Andrew Hallam 2023 Dec. The Disordered Cosmos: A Journey Into Dark Matter, Spacetime, and Dreams Deferred by Chanda Prescod-Weinstein Nov. A Short History of Nearly Everything by Bill Bryson The End of Everything (astrophysically Speaking) by Katie Mack Oct. Sapiens by Yuval N Harari The Time Machine by H. G. Wells Of Mice and Men by John Steinbeck ","permalink":"https://cindymiao.ca/booklist/","tags":[],"title":"What I'm Reading"}]