<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by 顏廷 Tim Yen on Medium]]></title>
        <description><![CDATA[Stories by 顏廷 Tim Yen on Medium]]></description>
        <link>https://medium.com/@yentim0519?source=rss-a8bcb40a956d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*63lCj2PHTZ8BLFDiTfp5rA@2x.jpeg</url>
            <title>Stories by 顏廷 Tim Yen on Medium</title>
            <link>https://medium.com/@yentim0519?source=rss-a8bcb40a956d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 17:59:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yentim0519/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Pre-27 Manifesto]]></title>
            <link>https://yentim0519.medium.com/my-pre-27-manifesto-92e95716d2b8?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/92e95716d2b8</guid>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[self-growth]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Sat, 10 May 2025 23:01:48 GMT</pubDate>
            <atom:updated>2025-05-10T23:01:48.362Z</atom:updated>
            <content:encoded><![CDATA[<p>I am about to enter the 28th year of my life and am still on the journey of learning about myself. I’ve spent time reading and listening to podcasts about self-growth since college. Throughout these years, these inputs and my experiences combined and gradually sculpted my values and generated guidance for me to follow in my life.</p><p>This article is a snapshot of what I plan to do in the coming years. It would be fun to look at these after some time and see if anything changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xu0W5Rj5pLg2dPHGRzoSQ.jpeg" /><figcaption>My first-ever hot air ballon experience in Mexico City on 03/14/2025</figcaption></figure><h4>Focus more on myself instead of caring about people unrelated to my life</h4><blockquote>Mickey Mantle don’t care about you, so why should you care about him? — A Bronx Tale</blockquote><p>Yes, why do I spend so much time caring about celebrities or the ones who do better than me? They don’t care about me. When I spend too much time envying or focusing on others’ lives, I am wasting my time creating a meaningful and interesting life of my own.</p><p>I do believe that watching someone better and appreciating their work motivates me and opens my eyes to a higher standard, but I feel like I’ve spent too much time watching instead of doing. For instance, watching videos of someone playing instruments instead of practicing, or watching people do sports instead of exercising.</p><p>Adjusting this watching-doing balance should help me elevate myself faster to a stage where I can start appreciating my crafts, and hence creating a virtuous cycle of me wanting to put more time into it.</p><h4>Embrace myself for not being good</h4><p>I have to admit, I am a snowflake. When I get negative feedback on something I put effort into, my first instinct is either to resist it or plummet into a massive self-doubting black hole. Sadly, neither will help me improve.</p><p>Despite knowing that it takes time to be proficient at anything, sometimes it’s still hard to admit that I am incompetent. But, it is what it is.</p><p>From now on, if the outcomes aren’t as positive as expected, I won’t let myself get drowned in a bad mood for too long. It’s not a failure, it’s just a process of learning. I couldn’t imagine how much better I would get if I used all my past self-doubting time to actually work towards my goals.</p><p>On top of that, I should be more open to negative feedback. Instead of being defensive to them, I should be more grateful for receiving them and should encourage people to give me more, so I know where and how to improve. However, this does not mean I have to accept them all blindly. The point of being open is to take time to think first before denying it, then see if it applies to me.</p><h4>Stop romanticizing</h4><p>As they say, the grass is greener on the other side. I often romanticize how nice it would feel if I made certain achievements, but neglect whether I truly enjoy doing that or not.</p><p>It would be so cool if I could perform on this big stage! But do I even really enjoy performing on small stages? It would be so nice if I could own my own business! But can I tolerate always having to keep grinding and firefighting without a clear boundary between work and life?</p><p>My solution is to <strong>start small and iterate quickly</strong>. The faster the trial and error cycle is, the faster I get myself out of fantasizing and move on to goals that are more realistic and suitable for me.</p><h4>Prioritize only a few goals at a time</h4><p>There is always too much on my to-do plate, and new goals will keep being added as life proceeds. My focus was often shifted from one to another, which led to me not getting a satisfying result for each thing.</p><p>I am always frustrated about myself for not being able to have decent results for what I am working on during that period, it feels like I didn’t achieve the goal I set for myself.</p><p>To avoid this, I will set only a few goals during a period and focus on achieving them by any means. This should help me concentrate more on the objectives without getting distracted by new ones. In addition, getting results that satisfy me will instill confidence in me, keep me energized, and motivate me to keep going.</p><h4>Live in the moment</h4><p>My friend once said that I am always living in the future, not the present. What he means is that I am not paying attention to my current senses, but instead, immersed in thinking. It could be me planning for my future, or just simply looking at my phone.</p><p>Ever since seeing a sentence written on a wall in a cafe on Naoshima, Japan, in 2023: “You see, but you do not observe.” It struck a chord with me. I suddenly realized that I’ve always been like that. Eating food, but when recalling, I couldn’t remember the exact details of the taste. Going out, but my mind is whirling around plans.</p><p>After that epiphany, I’ve tried to dedicate my attention to the present. I improve the most at food. Now I am better at telling if the food quality is good, whether I like it or not, and knowing the ingredients. Put simply, I am cultivating the “taste” of tasting. This makes the energy-gaining session way more fun than previously.</p><p>Another thing I want to improve is photography and history. It will help me be more present while traveling. While traveling, sometimes I get bored and start scrolling through my phone, which loses the point of the intent of seeing new things. Knowing the history will help me appreciate more of what I am seeing, just like people vibe along more with familiar songs. Taking photos helps me stay present and will force me to put effort into observing instead of just seeing.</p><h4>Challenge myself more</h4><p>I believe that challenging or stepping out of my comfort zone is the fastest way to grow. Every time I tried something challenging, I either learned something new or gained new perspectives, which both enriched my life, and I am sure I want more of that.</p><p>I have little burden on me now, physically and mentally. I do not have a family to feed currently, I have a stable job, enough free time, and a healthy body. Who knows how long these will last? There is no better time to challenge myself and take some risks than now.</p><p>In 2024, I attended a singing competition. I might not have done well, but it’s fun, and it makes me more comfortable standing and expressing myself in front of many people while on stage. This is a perfect example of gaining benefits by challenging myself to do something that I am uncomfortable with.</p><p>I usually reflect on what I’ve done yearly and plan for what to accomplish next. In the future, I will have to make sure that I have something challenging once in a while to push myself beyond my current limit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92e95716d2b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rice MCS 2022 Fall修課心得]]></title>
            <link>https://yentim0519.medium.com/rice-mcs-2022-fall%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-b2abeb8da394?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2abeb8da394</guid>
            <category><![CDATA[graduate-school]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[rice-university]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Tue, 21 May 2024 03:22:45 GMT</pubDate>
            <atom:updated>2024-05-21T03:22:45.410Z</atom:updated>
            <content:encoded><![CDATA[<h4>以後也要被人家稱為「社會人士」了</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kizUzbn_0cRkpMxATJIFkA.jpeg" /></figure><h4><strong>前言</strong></h4><p>從Rice畢業後，也已經一年半了。秉持著有始有終的精神，還是想為最後一個學期寫一篇文章，以此紀念這段旅程。</p><p>有興趣的人歡迎去看看前兩學期的文章。</p><ul><li><a href="https://yentim0519.medium.com/rice-mcs-2021-fall%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-4669c24dbecb">Rice MCS 2021 Fall修課心得</a></li><li><a href="https://yentim0519.medium.com/rice-mcs-2022-spring%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-9cc8575e23b8">Rice MCS 2022 Spring修課心得</a></li></ul><p>這學期由於申請減修，課業量相較於上學期少很多。除了必修的Algorithm外，本來想選Distributed System，結果這學期沒開，於是便選擇了Parallel Computing，順便複習一下C++，畢竟上學期的DB我作業幾乎沒寫…</p><h4>課程</h4><h4>COMP534 Parallel Computing</h4><ul><li>Language: C++</li><li>Professor: John Mellor-Crummey</li><li>Workload: 4 projects</li></ul><p><a href="https://www.clear.rice.edu/comp422/">Course Link</a></p><p>修了之後感覺Parallel Computing的水真的深，修完這堂課也許對於能夠在工作上應用還有很大一段距離，但能夠淺嚐這個領域的一些知識也甚是有趣。</p><p>附上我覺得很讚的Parallel Programming<a href="https://ppc.cs.aalto.fi/">教學網站</a>，如果不是很確定是否要將寶貴的學分花在這堂課，可以先看一下這個網站，了解Parallel Programming是什麼，在解決什麼樣的問題，以及你是否有興趣。</p><h4>COMP582 Graduate Design Analysis of Algorithms</h4><ul><li>Language: Python</li><li>Professor: Dave Johnson</li><li>Workload: 13 problem sets, 2 exams</li></ul><p>對於之前有刷leetcode的人來說，這堂課一半的內容大概都已經會了。前期還會乖乖去上課，後來就懶得去了。每週寫作業時才會去看他的上課影片，聽不懂的地方就自己去查，畢竟線上Algorithm講的好的影片不勝枚舉。</p><h4><strong>Spanish</strong></h4><p>由於這學期課比較少，於是就和大衛跑去修Rice Foreign Language Program開的西班牙文課。總共8週，一週兩堂課，$490。</p><p>由於校外人士也能報名，我們這個班除了我跟大衛，大多是社會人士。來上課的原因各有不同 — 有的是為了在工作上和Hispanic同事能順利交流、有一對夫婦則是想一起學習一門語言以增進感情、還有一些台灣碩士生就只是生活太無聊，想在生活中找樂子。</p><p>每次上完課一起搭Uber回家時，我都會在車上和大衛一起討論和複習今天的上課內容。在休士頓，很多司機都是Hispanic，聽到我們在講西班牙文都會熱心地和我們搭話。俗話說的好，學一門語言就要先學習其髒話。於是我們就和一位司機請教西班牙語髒話，他人也蠻好，就教了我們。這一句是我目前少數還記得的西班牙語。</p><h4>後記</h4><p>本以為這學期可以修著少少的學分，參加個社團。誰能料到2022年中，科技業開始大規模hiring freeze跟layoff，所以包含我在內的大部分Meta實習生都沒有拿到return offer。於是只好窩在家裡投履歷和刷leetcode。</p><p>所幸順利地在10月被Bloomberg撿起（也是唯一一家我有拿到面試的公司），這邊要shout out to安妮，因為她前一天的面試官剛好跟我相同，我有特別去看她被考的冷門題目，隔天看到同一題超爽。</p><p>縱使這裡不太方便又無聊，但要畢業時還是不免感傷。離開前的最後幾天，走在校園，我努力地注視著這裡的建築和一草一木，希望將其烙印在腦海中，畢竟休士頓可不像台北，下次回到這裡不知道是幾年後的事。</p><p>一年半的碩士生活倏忽即逝，非常幸運地有達到當初來美國之前設定的目標。那時的我還不知道事情會如此地順利，對於未來遑遑不可終日。也感謝在這邊一起打拼的朋友們，我不會忘記這段時光和你們的幫助。</p><p>畢業時，隨著學生生涯正式落幕，我第一次開始有對於時間過太快的恐懼。願望列表上還有很多未完成項目，不知能否在有限的人生中將其完成，只求將來能夠好好把握時間，將清單上的項目一一劃掉。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2abeb8da394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2022 Meta Software Engineer Internship]]></title>
            <link>https://yentim0519.medium.com/2022-meta-software-engineer-internship-2b80542d50ce?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b80542d50ce</guid>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[internships]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Tue, 05 Mar 2024 03:43:00 GMT</pubDate>
            <atom:updated>2024-03-05T03:43:00.353Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLVcGVAHuFhZIhuprz21og.jpeg" /><figcaption>Rooftop View of Meta Dexter Office at 20:52</figcaption></figure><p>It’s been a while for me to write articles. 2023 was a fantastic year, and I prioritized other things over writing. At the beginning of 2024, I feel like it’s an excellent time to pick up this interest since I have learned so much during the past year.</p><p>In 2022 summers, I am fortunate to get the chance to work at Meta as a software engineer intern. It was a great experience with all the benefits and the fantastic working spaces. Most importantly, I learned a lot from my mentor and colleagues about how to become a better software engineer.</p><p>This article will conclude what I have learned through this internship.</p><h4>Not Only Coding</h4><p>When I received my task at the beginning of the internship, I had no idea what I was looking at, and it freaked me out. It’s my first time working at such a big tech company, so I am clueless about how to approach the tasks. After spending two weeks reading documentation and asking questions, I desperately want to start coding because I feel like no progress was made by me at all. But that is not the case. <strong>I did make progress. It’s just not coding.</strong></p><p>I spent another one-and-a-half weeks reading more documentation, asking more questions, and communicating back and forth with my managers to ensure my design plan was valid. Eventually, I finished my task earlier than the deadline and completed two more extension tasks during my internship.</p><p>Hence, coding is not the only duty of a software engineer. Understanding the systems, clarifying stakeholders’ requirements, absorbing the latest developing knowledge, and writing clear documentation are all crucial to helping you and your team design a better system for the company.</p><h4>Steps to Solve the Assigned Task</h4><ol><li>Documentation</li></ol><p>Documentation is an excellent place to start when trying to understand a new technology, whether a system, a service, a framework, or a language. The first thing to do when joining the company is to figure out where to look up documentations and read through them, which will onboard you faster.</p><p>2. Codebase</p><p>Sometimes, the documentation <strong>lacks instructions for implementation</strong>. Instead of trial and error, which is significantly time-consuming, the codebase is your go-to place for usage examples.</p><p>In addition, before implementation, make it a habit to look at others’ repos that use the same framework as you for reference. By reading others’ code, you might learn to write code with better readability, avoid a gotcha, or discover something you neglect.</p><p>3. Ask People</p><p>Asking doesn’t mean incapability or incompetence. I had a cognitive bias at that time, thinking that I had to traverse through every documentation and related codebase before asking my colleagues or manager; otherwise, I would be wasting their time by disturbing them with something I could look up myself.</p><p>I am wrong. Well, partially wrong.</p><p>Yes, it is nice to have some high-level understanding before asking others, but it is unnecessary to know the whole system from the inside out at the beginning. <strong>Before diving into the details, iteratively ask your manager or other senior engineers to make sure your solution looks valid to them. </strong>By doing this, you will know whether you are on the right track and save up all the time reading unimportant docs and code.</p><p>Yep, and that is all that I learned from this internship, boiling down to one article. It may not be much but is definitely useful.</p><p>This is my first time working at such a big tech company, and I realized that software development in companies is very different from the ones at school. It takes much longer for a code change to take effect in a big company. It first has to be reviewed and approved, then run tons of checks to ensure it can be merged into the main branch, and lastly, deployed through all different stages until it hits production. Thus, I did learn some lessons that schools doesn’t provide.</p><p>I am very grateful to have this opportunity to intern at such a prestigious company, which I believe did help me get into Bloomberg afterward. I watched the movie “The Social Network,” which tells the story of Facebook founder Mark Zuckerberg many many times, admiring him for turning a website hosted on servers in his dorm to the mega company it is today. Hence it felt unbelievable when I received the offer letter from Meta.</p><p>Seattle is such a great city to explore with friends in summer time, I had a great time. This internship will always be memorable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b80542d50ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rice MCS 2022 Spring修課心得]]></title>
            <link>https://yentim0519.medium.com/rice-mcs-2022-spring%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-9cc8575e23b8?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cc8575e23b8</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[study-abroad]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Wed, 05 Oct 2022 05:49:29 GMT</pubDate>
            <atom:updated>2022-10-05T05:49:29.202Z</atom:updated>
            <content:encoded><![CDATA[<h4>In the C world, you are God</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTiZVgD164fP7Q6PzxL-Rw.jpeg" /><figcaption>Autumn @ Rice University</figcaption></figure><h4>前言</h4><p>這學期決定選擇System當作我的Specializtion Track，於是選擇了OS和Computer Security來滿足這個track的條件。除了網路是我本來就決定要修的課以外，第四門我本來是打算選個ML相關的課程，結果最後被Alex說服，說如果沒有打算走ML相關的路，修一門ML也沒啥用，不如再修個Database Implementation，畢竟DB的知識作為任何一種SWE都是很重要的。</p><p>經過這學期，我對C語言和電腦底層的掌握度有了很大的提升，但是loading是真的重，但隨者痛苦帶來的是成長，我更害怕的是過得很爽，但感覺不到進步抑或不知道如何進步的那種痛苦，所以對於這學期的的選課算是非常滿意。</p><h4>COMP521 Operating Systems And Concurrent Programming</h4><ul><li>Language: C</li><li>Professor: Dave Johnson</li><li>Workload: 3 projects, 2 exams</li></ul><p>這學期最愛的一門課，本來看到別人分享這堂超硬而有所卻步，但聽說教得超好再加上有朋友一起，就決定修下去了，事實證明是個非常正確的決定。</p><p>之前大學上的OS課都只教概念，完全沒實作，導致當時很多東西都沒有理解。反觀，Dave這堂OS就利用非常複雜的labs讓學生能夠深刻理解OS課本中的觀念。</p><p>Lab 1是個人作業，要設計一個terminal device driver，並利用monitors去處理multi-threads synchronization。</p><p>Lab 2則為兩人一組實作一個kernel和常見的Unix system calls, 並提供multiple terminals讓users能夠執行這些system calls。Kernel包含的features有virtual addressing and memory protection，還要在one CPU core的情況下提供process concurrency，讓多個process能同時執行。Unix system calls則有Exec, Fork, Wait, Delay, Exit這些對於process的操作。</p><p>這個lab真的超複雜，光是Lab Doc就有45頁，實作過程中還一直遇到各種memory error，最後寫出來整個成就感爆炸。</p><p>Lab 3同樣是兩人一組，要實現一個File System，並提供操作檔案的Unix system calls，包含read, write, create等。雖然實作起來lines of code也很多，但觀念上卻比lab2簡單很多，所以實作時沒遇到什麼障礙。</p><p>這些作業都是跑在教授自己開發的simulator上，因此學生只需要專注在教授要我們學的觀念上，不用去處理一些非常瑣碎的部分，能感受到教授的用心。</p><p>Exams是線上限時做完，一次就佔學期成績25%，我第一次考超爛，還以爲會被當，怕爆。</p><p>Dave非常註重細節，每份lab doc都寫得很詳細，回答也非常注意遣詞用字以確保觀念上的正確性。同時，他在piazza上的回覆時間極快，因此大部分遇到的困難都可以及時得到解答，不會卡太久，是個超認真對待教學的教授。</p><h4>COMP556 Introduction To Computer Networks</h4><ul><li>Language: C, C++</li><li>Professor: T. S. Eugene Ng</li><li>Workload: 3 projects, 2 exams, 2 homework</li></ul><p>Eugene課程設計得很讚，課程內容從OSI Model底層講到高層，帶我們一步一步認識網路如何發展到今天的地步，如何解決reliability, scalibility等問題。一堂課的內容不會太多，教授語速適中，講話清晰。</p><p>Project1是實作一個簡單的Ping-Pong Client &amp; Server Program，主要是讓大家熟悉socket programming。</p><p>Project2是設計一個Reliable File Transfer Protocol，將一個檔案成功從電腦A傳到B。我們需要使用UDP的情況下，去實現TCP的Reliability，讓其能處理packets out of order, duplicate, drop, delay, and data corruptions。永遠都會記得我去Vegas玩的時候，在旅館寫這個作業寫到半夜。下午在大廳寫的時候，櫃檯還過來說我們感覺很聰明（感覺就是外國人看到幾個Asian開著電腦寫扣會有的想法 XD）。</p><p>旅行回來後的某個半夜，看到封包無論被怎麼搞，都能完美地從A傳到B時，那種感動難以言喻。</p><p>Project3則是要做出一個Intra-Domain Routing Protocols，並要求用Distance Vector和Link-state兩種方法去實現。這個作業我的參與度就不高了，感謝我的隊友Annie和Michael的照顧。</p><p>Homeworks就是兩次Exams前的複習，題目重複性很高。Exams的形式是在家裡做完上傳。</p><p>這堂課涵蓋幾乎所有計算機網路的基本知識，跟OS一樣，做完projects後對於課本上的知識會有更深的印象和理解。同時，作為一個軟體工程師，免不了會碰到和網路相關的知識，所以這堂課的內容對於未來應該是非常有幫助的。</p><h4>COMP541 Introduction To Computer Security</h4><ul><li>Language: C, Python, JavaScript, SQL</li><li>Professor: Dan S. Wallach, Nathan D. Dautenhahn</li><li>Workload: 4 projects, 3 homework</li></ul><p>這堂課教得很雜，課程Slides也很亂，但作業出得蠻好的，所以我後半段都沒在上課，只做作業。</p><p>課堂先從基礎的密碼學開始介紹，再到網路的各種攻擊及防禦手法，最後是跟OS相關的安全問題，算是很多元的介紹了資安的各種面向。</p><p>Project 1是跟選舉相關的加密。由於Dan的研究和vote securtiy有關，於是這個作業主要是想讓我們了解密碼學如何應用在投票上。</p><p>這個project算是我第一次去traverse比較複雜的codebase，由於要去找各種教授寫好的各種methods來用，因此開始熟習vscode的快捷鍵。</p><p>Project 2則是要我們去攻擊教授設計的網站，攻擊手段包括SQL injection, XSS, CSRF。寫這個作業時，上學期修過的COMP531 web application就派上用場了，否則在不了解網站運作原理的情況下，要完成可能有點吃力。</p><p>Project 3是control-flow hijacking，就是利用process在執行function時若沒有保護到process stack上的return address，就可以透過buffer overflow去改寫return address，使process去執行我們指定的部分。我自己蠻喜歡這個作業的，因為可以了解function在被執行時和stack是如何互動的。</p><p>整體來說，我覺得這堂課作為資安的入門課算是很不錯，作業跟projects都沒有到非常難，但是對於資訊安全的各個面向都能有一定的認識，而且小時候對於駭客有一定的憧憬，修完這門算是有了解到其皮毛。</p><h4>COMP530 Database System Implementation</h4><ul><li>Language: C++</li><li>Professor: Christopher M. Jermaine</li><li>Workload: 7 projects, 5 exams</li></ul><p>當初本來是想藉這堂課來練習C++，結果由於另外三堂loading太重，這堂我一個作業都沒寫，完全靠大衛凱瑞。雖說如此，透過上課內容跟考試，還是有稍稍增加我對於database底層運作的暸解。</p><p>這堂課的projects就是將database從最底層一路寫到最上層，最後要能做SQL queries。教授會給一些他寫好的部分，所以不完全算是從頭刻。每個作業可以選擇用自己前一個作業寫的部分，也可選擇教授幫你寫好的。刻完相信對於整個DB的運作會有很深的認識，可惜我啥都沒寫到…</p><h4>心得</h4><p>能夠放心地修這麼多硬課也是因為開學初就確定拿到Meta summer internship offer，運氣算是不錯。作為一個轉專業仔，我只想盡快將基本的電腦科學知識補齊，所以堅持不修廢課，雖然會有像COMP530這種handle不過來的課，但就算分數比較低，至少還是能學到東西（最後分數並沒有很低，因為大衛太屌…）。</p><p>我認為修了這些computer system的課是很重要的一個決定，因為這讓我在未來有更多除了full-stack engineer以外工作上的選擇，也許可以試著嘗試更多會觸碰到low level的職缺。</p><p>這學期除了上課的知識之外，也找了個git tutorial將常見但不熟的地方搞清楚。由於更常跟terminal打交道，於是將iTerm設置得更方便。同時，還學會了如何設定ssh公私鑰，不用每次連上學校的server都要打密碼。簡單來說，就是越來越熟悉一個軟體工程師需要的技能以及如何優化工作流程。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cc8575e23b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2022 北美SWE 暑期實習申請心得]]></title>
            <link>https://yentim0519.medium.com/2022-swe-%E6%9A%91%E6%9C%9F%E5%AF%A6%E7%BF%92%E7%94%B3%E8%AB%8B%E5%BF%83%E5%BE%97-42ba29684b9?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/42ba29684b9</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[meta]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Sun, 10 Jul 2022 22:05:52 GMT</pubDate>
            <atom:updated>2022-07-11T21:11:58.784Z</atom:updated>
            <content:encoded><![CDATA[<p>Meta@Seattle</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L3Kxstp5CoFhQhdo" /><figcaption>Photo by <a href="https://unsplash.com/@dlxmedia?utm_source=medium&amp;utm_medium=referral">dlxmedia.hu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>前言</strong></h4><p>找實習的旅程終於畫上句點，很慶幸自己能夠獲得前進Meta Seattle Office實習的機會。現在可以把心力都放在課業上，不用一直被找實習的焦慮所困擾，真d快樂。</p><h4>內推 &gt;&gt; 海投</h4><p>上學期我大概投了160家公司，拿到10幾個OA，2個面試機會。最後只透過內推拿到Meta的面試。所以我認為內堆的效果比海投好很多。</p><p>剛開學時我對於內推的重要性沒什麼概念，所以沒有很積極在找內推。那時的我認為內推不僅要做陌生開發，還要一直和內推者聯絡，成本比海投高上不少。反觀海投只需填一些基本資料和丟個履歷，每天就可以有固定的投遞數量，「感覺」上比較有投遞進度。因此，前半學期我都會每天固定海投一定數量的公司。但在經歷一整個學期的碰壁後，我認為應該<strong>及早內推</strong>，畢竟有些大公司只有秋招，錯過就來不及了，後來也發現內推其實也沒有想像中的麻煩。</p><p>我找內推的地方有兩個：</p><p><strong>1.一畝三分地</strong></p><p>一畝上不時就會有人po文說可以幫忙內推，記得時常關注一下。</p><p><strong>2. Linkedin</strong></p><p>在Linkedin上找內推，我的策略是先加一堆目標公司的員工，一次要按多一點，畢竟有些人不會接受你的邀請。過幾天有人答應我的connection邀請後，我會直接切重點，將已經寫好的內容（自介、履歷、目標職位連結）傳給對方，問對方能否幫我內推。有些人會認為要先跟內推者建立好關係，不要馬上就問對方內推的事，但我覺得不如直切重點，將省下來的社交時間拿去多找幾個人，還是會遇到好心人士願意幫忙內推。</p><h4>Meta面試時程</h4><p>12/06/2021 內推</p><p>12/08/2021 收到HR通知有面試的信</p><p>01/05/2022 Screen Interview</p><p>01/13/2022 收到有Virtual Onsite的信</p><p>01/31/2022 Virtual Onsite Interview</p><p>02/09/2022 收到確認國籍的email</p><p>02/10/2022 HR打電話來確認offer</p><h4>刷題</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eVZvtombF0l4UexG1Ugn4g.png" /><figcaption>可以看到學期中因為沒有面試加上課業繁重都沒在刷：）</figcaption></figure><p>我刷題使用的語言是Python，在來美國之前刷了150題左右，來美國後將題數提升到300題。隨著題數的增加，會發現很多題目都有共同的概念，也開始理解之前不太能理解的題目，因此建議越早開始刷題越好，以免課業和刷題難以同時兼顧。</p><p>建議刷題的時候可以將常用的方法<strong>模板化</strong>，這樣可以節省面試時因為時間或緊張各種因素導致細節寫不出來。例如BFS, DFS, Backtracking, Sliding Window, Binary Search這種常見的解法，基本上步驟都差不多，<strong>盡量每次寫都用一樣的寫法，以達到在正式面試時能夠以最快的速度寫出來，將時間花在思考題目的其他部分</strong>。</p><p>Meta幾乎都是考考古題，因此準備方式就是去Leetcode將Meta前6個月的高頻題好好練熟。我自己大概是刷熟前125題。Hard也還是有考的可能，因此時間允許的情況下還是盡量準備。</p><h4>面試過程</h4><p><strong>Phone Screen:</strong></p><ul><li>31. Next Permutation</li><li>543. Diameter of Binary Tree</li></ul><p><strong>Video Onsite:</strong></p><ul><li>346. Moving Average from Data Stream</li><li>55. Jump Game</li></ul><p>可以看出我被考的題目幾乎都是Leetcode裡Facebook(Meta)的前一百高頻題，且都是Easy和Medium的題目。最後一題Jump Game雖然不是非常前面的高頻題，但也是Leetcode中很熱門的題目。由於我忘記這題的DP作法，這題是在面試官給提示的情況下才寫出來。由於此題沒幾個步驟，面試官給提示基本就是給答案，結果我還是通過面試，再次驗證跟面試官要hints還是有機會通過。</p><h4>面試技巧</h4><blockquote>「將面試想成是和面試官一起來解題目。面試主要是展現你溝通、解題的能力。」</blockquote><blockquote>- Alex Du in RVA 1113</blockquote><ol><li>控制時間</li></ol><p>Meta的面試時間為45分鐘、2題。因此前面的Self-Introduction不要講太久，才不會導致解題時間不夠，最好是在前5分鐘自我介紹，後面兩題各20分鐘。</p><p>當看到是做過的題目，千萬不要見獵心喜，一下就把題目寫完，這樣有兩個壞處。一是如果題目偏難，你寫太快會讓他覺得你在背題目，而沒有完整的思考過程，二是如果你寫完後還有多餘的時間，面試官有可能會問你follow up questions，而你不一定答得出來，可能導致被扣分。因此，每題都控制在20分鐘剛好答出來是最佳選擇。</p><p>2. 當面試官允許才開始寫code</p><p>看到題目時，切記不要馬上開始解題。先和面試官說你要用哪些演算法，並且問他你的做法是否正確或者有無更好的解法，等面試官同意後，再開始寫下第一行code。這麼做能避免你一開始就思考錯誤，寫了一大堆code之後才發現有問題，時間卻不夠的慘烈狀況。</p><p>3. 時間和空間複雜度</p><p>講完你的演算法後，記得和面試官說解法的時間複雜度和空間複雜度。如果看到題目後，馬上就想出（背出）好幾種解法，可以先從時間複雜度最差的先講，並且近一步提出優化的解法，讓他知道你對於資料結構和演算法知識的了解程度。</p><p>4. Thinking out loud</p><p>每題的解法不太一樣，面試官不一定懂你的解法。因此在解題的過程中，將你的解法一步一步說出來，讓面試官了解你的思路和溝通能力。同時，這麼做也能讓面試官在你卡住的時候知道你哪裡想錯，並進一步給妳提示。</p><p>5. 和面試官要提示</p><p>前面已經提過，和面試官要提示是可以的。如果卡住千萬不要一直埋頭苦想，設一個停損點，例如3分鐘想不出來就和面試官要提示。如何委婉的向面試官要提示可以參考下面這支影片。</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWLBcmyNaeKc%3Fstart%3D313%26feature%3Doembed%26start%3D313&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWLBcmyNaeKc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWLBcmyNaeKc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e62687219213215c73208afd2f186d0/href">https://medium.com/media/4e62687219213215c73208afd2f186d0/href</a></iframe><p>6. 寫完後確認有無syntax error</p><p>我自己在初期做mock interview時發現自己每次寫完後都會有syntax error，有些面試的editor不會有syntax error highlighting，因此，每此我寫完題目後，都會和面試官說給我1分鐘檢查有無syntax error。</p><p>7. Dry run your code</p><p>Meta的面試不會實際run你的code，因此在最後記得用面試官給你的input或者自己提出幾個範例input，將其帶入你寫的code。我自己會在註解中寫下每個variables的初始值，並隨著dry run每一行code，動態改變它們，在檢查的同時也讓面試官清楚了解整個algorithm的運作。</p><p>8. 檢查edge cases</p><p>務必舉出幾個edge cases來檢查你的code是否都能handle。</p><h4>結語</h4><p>感謝David, Alex, Annie, Bill, Henry陪我度過這段找實習的時光，也很慶幸大家最後都有internship offer。寫下這篇文提供一個data point給大家，同時也紀錄一下這一路上學到的面試技巧，方便我面試full-time時複習。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42ba29684b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pipenv]]></title>
            <link>https://yentim0519.medium.com/python-pipenv-586c145e3652?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/586c145e3652</guid>
            <category><![CDATA[package-management]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Sat, 21 May 2022 05:14:34 GMT</pubDate>
            <atom:updated>2023-06-05T20:03:19.733Z</atom:updated>
            <content:encoded><![CDATA[<h4>Manage Python Packages and Virtual Environments Easily</h4><h4>Intro to Pipenv</h4><p>Pipenv allows developers to manage Python packages and virtual environments on Python projects, and solve some problems when using pip, virtualenv, and requirements.txt, which makes developing on python projects much more easier.</p><p>Below are three main features that pipenv provides:</p><h4>1. Dependencies Management</h4><blockquote>“Allow for deterministic builds for your Python project without gaining the responsibility of updating versions of sub-dependencies.”</blockquote><blockquote>— <a href="https://realpython.com/pipenv-guide/#dependency-resolution">Real Python</a></blockquote><p>“Deterministic builds” means building a project with exactly the same version of every dependency the developer specifies, which the developers already checked that the project can build successfully in this condition. Using different versions of dependencies might cause the building to fail.</p><p>Now let’s switch the context to the role of Pipfile and Pipfile.lock.</p><p>The <strong>Pipfile</strong> stored only the <strong>top-level dependencies</strong> your project requires, which are the ones you import in all .py files. <strong>Pipfile.lock</strong> stores the exact version of all the dependencies and their <strong>sub-dependencies</strong> to allow reproducing an environment.</p><h4>2. Create isolated environments for every python project</h4><p>It’s a pain in the ass for every project to use the local environment. If projectA requires packageX version 3.1 and projectB requires packageX version 3.2, then you have to keep uninstall and reinstall the correct version of packageXin your local environment, which is annoying. We can solve this by using Pipenv to create virtual environments respectively for every project and save each project&#39;s dependencies in these isolated environments.</p><h4>3. Dependencies Resolution</h4><p>Pipenv will <strong>automatically find sub-dependencies that fulfill the requirements of top-level dependencies, </strong>this is called “dependency resolution”. For example, if packageArequires packageC ≥ 1.0and packageB requires packageC &lt; 2.0 , then when we run “pipenv install”, it will look for packageC &lt; 2.0, ≥ 1.0.</p><p><strong>Pip doesn’t support this feature until version 20.3. </strong>The versions before will<strong> </strong>download the latest sub-dependency ( packageC )that is valid to packageAand it might not be a version that is valid to packageB (e.g. packageC 3.0 ). In this case, it will cause an error to install packageB, because it needs packageC &lt; 2.0however, we have installed packageC 3.0when we installed packageAbefore.</p><p>Thus, with pipenv, developers are freed from having to specify the version of sub-dependencies, which is packageCin our example.</p><h4>Basic Commands</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/645078d6845ec269268ce3df8a5ddaaf/href">https://medium.com/media/645078d6845ec269268ce3df8a5ddaaf/href</a></iframe><h4>Conclusion</h4><p>With Pipenv, it’s a lot more convenient for developers to make deterministic builds, manage different versions of dependencies for different projects, and free developers from managing the updates of top-level dependencies and sub-dependencies.</p><h4>Reference</h4><p><a href="https://realpython.com/pipenv-guide/">Pipenv: A Guide to the New Python Packaging Tool - Real Python</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=586c145e3652" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rice MCS 2021 Fall修課心得]]></title>
            <link>https://yentim0519.medium.com/rice-mcs-2021-fall%E4%BF%AE%E8%AA%B2%E5%BF%83%E5%BE%97-4669c24dbecb?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4669c24dbecb</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[study-abroad]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Wed, 19 Jan 2022 02:38:56 GMT</pubDate>
            <atom:updated>2022-01-19T02:47:06.844Z</atom:updated>
            <content:encoded><![CDATA[<h4>還不錯</h4><h4>前言</h4><p>本來計畫是每個月要寫一篇medium紀錄生活，結果又在各種作業、找實習、刷題中偷懶，於是決定趁寒假稍微有空（結果寫完的時候已經開學了…），對於上學期的課程還記憶猶新時，趕快紀錄一下。</p><h4>課程</h4><ul><li>COMP 533 Introduction to Database</li><li>COMP 504 Graduate Object-Oriented Programming &amp; Design</li><li>COMP 531 Web Application</li></ul><p>如果對課程內容有興趣的人，可以去看 <a href="https://medium.com/u/617acc3aea8a">I-No Liao</a>學長的這篇文章，寫得非常詳細，今年也沒有太大的變動。</p><p><a href="https://medium.com/%E5%B7%A5%E7%A8%8B%E5%B8%AB%E5%B0%8F%E5%A4%AB%E5%A6%BB/ricemcs2019fall-23fab7064148">【美國留學】RICE MCS 第一學期</a></p><p>我就是看了這篇文章，決定第一學期選擇和學長一樣的課程。因爲在做了一些調查後，我發現美國這邊Full Stack Engineer的工作機會蠻多的，因此就選擇了COMP531、COMP533這兩門和其相關的課成。同時為了補足我履歷上的不足，特別選了COMP531、COMP504這兩門Project-based的課，好讓我的履歷上有相關的projects能放上去。</p><h4>技術</h4><p>以下是我這學期學到的新技術，之前在看software engineer的job description時經常看到它們，因此有成功將其放到履歷上還蠻開心的。</p><pre><strong>Languages:</strong> JavaScript, Java, NoSQL(MongoDB), Imperative SQL, Neo4j<br><strong>Tools &amp; Frameworks:</strong> React, Node.js, Express.js, Jest, Spark Java, Maven, JUnit, Redis</pre><h4>程式觀念</h4><ol><li><em>看Documentation，不要只看Stack Overflow</em></li></ol><p>之前coding只要遇到不懂的情況，我很常去看stack overflow找答案。這麼做的問題是，縱使複製別人的code解決了現在的問題，但是自己沒有真正了解其運作原理，因此容易導致無法在未來解決相關的問題。</p><p>我從好友Alex身上學到，學習看Documentation是非常重要的。一個好的Documentation通常都寫得很清楚，也會給明確的examples。就算沒有立即解決我現在遇到的問題，在看完之後通常對於想出解法有很大的幫助。同時在看documentation時會看到很多除了目前的問題以外，此框架或者語言的其他用法，能夠更深入地理解這個框架或者語言。</p><p>結論，看documentation是很重要d。</p><p><em>2. 先設計好架構，再開始寫程式</em></p><p>對於大型專案而言，最好先設計好整體的架構，再開始寫code，避免寫到一半發現程式碼串不起來，又要去改動前面寫好的程式碼，浪費不必要的時間。</p><p>這邊我有兩個例子：</p><p>一、這學期的Web Application這堂課利用一整個學期完成一個類似Facebook這樣的Social Media網站。課堂的設計是要我們先完成前端，再完成後端，最後將其整合。由於我在設計前端的部分時，沒有去考慮後端的內容要怎麼接合，因此在整合階段時，又花了不少額外時間去將前端內容更改以順利整合。</p><p>二、在OOP Design這堂上，在某大型project中，我主動請纓當我們組的tech lead。我的工作主要是寫好Abstract和Interface Classes，並讓其他組員去implement。因此，我就畫了一個UML Diagram出來，並寫了Spec，但有些變數名稱沒有統一，導致A import B的code時發生錯誤。同時，由於我對於Java不夠熟悉，在abstract class的function裡我都用Array當input argument，結果發現很難用，最後又要大家改成ArrayList，但有些同學又已經寫好操作Array的code了，因此又得要求他改掉。設計的不好時，就會發生這樣的慘事。</p><p>因此，當要實作的案子很大或者涉及多人協作時，千萬不要認為花時間設計架構很浪費時間，這麼做反而能在後期幫你省下更多時間。</p><h4>朋友們</h4><p>由於我住在學校提供的宿舍，因此很容易跟住同一棟樓的台灣同學變得熟悉。而來Rice這邊讀書最幸運的是，我朋友大多比我強，同時也不吝嗇地傾囊相授，讓我能順利交出每個作業，並從中獲得成長。期許自己未來能提升到和他們同一水平，因此還在努力和他們學習中。</p><p>撇除技術的部分，大家感情也很好，常常一起吃飯、看NBA（罵龜龜又在雷湖人）、彈吉他，讓RVA這個宿舍除了冰冷的找工現實，也增添不少愉快的回憶。真心希望大家都能在美國找到正職，以後一起去美國的其他地方玩。</p><h4>總結</h4><p>總體來說，我對於這學期的課程很滿意。不僅學到了很多之前想學的技術，同時也成功豐富了履歷。生活上雖然單調了一點。幾乎都趕作業、刷題、找實習。但我在來美國之前早就有心理準備，所以也還能接受。</p><p>來美國唸CS後，發現自己跟有些同學相較之下，沒有那麽技術狂熱，程式寫不出來時也會很崩潰，但每次完成作業時的成就感和喜悅，是我以前在經濟系的課程裡不曾體會過。因此，不敢說我在CS方面很有天賦，但我認為它是有趣的，且我也有機會找到相關工作，薪水也不錯（前提是能找到)，所以對我而言，來美國讀CS應該是最好的選擇了吧。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4669c24dbecb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[【閱讀筆記#2】A Concise Guide to Macroeconomics]]></title>
            <link>https://yentim0519.medium.com/%E9%96%B1%E8%AE%80%E7%AD%86%E8%A8%98-2-a-concise-guide-to-macroeconomics-9e54e3a84c84?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e54e3a84c84</guid>
            <category><![CDATA[macroeconomics]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[reading]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Tue, 13 Jul 2021 12:35:20 GMT</pubDate>
            <atom:updated>2021-10-13T09:01:37.183Z</atom:updated>
            <content:encoded><![CDATA[<h4>學總體經濟學到底有沒有用啊？</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yq2_gMucuBNoVh-U" /><figcaption>Photo by <a href="https://unsplash.com/@rupixen?utm_source=medium&amp;utm_medium=referral">rupixen.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>前言</h4><p>在五股憲訓中心百無聊賴的時候，突然想來複習一下總經。總覺得可能跟投資、創業有關，之後可能有用，嗎？到底有沒有用的感想我會放在總結。</p><p>這篇文主要是統整「哈佛商學院最受歡迎的7堂總體經濟課」這本書的內容，除了複習大學學過的東西，也有解答我對於總經一直沒搞懂的問題。由於總經的細節真的很多，因此除了本書外，我有參考網路其他資料來幫助釐清觀念和脈絡。</p><p>對總體經濟學有興趣但完全不了解的讀者，建議可以花點時間看完本文，裡面對於總體經濟學的內容淺顯易懂。幾十分鐘，就能搞懂經濟系一整年課程的精華，我覺得蠻划算的。對總經有點底子的讀者可以當作一個複習，從不同角度複習已知的知識，也許會有更深一層的了解。</p><h4>我的Q&amp;A的Q</h4><ol><li>為什麼會有通貨膨漲？</li><li>為什麼物價通常要維持2％的成長率？</li><li>常聽到的美國十年公債殖利率重要在哪？</li></ol><p>上面這些問題是我一直想了解的，趁這個機會來搞清楚。解答會放在文末。</p><h4>總體經濟學是什麼？</h4><p>「以國民所得、經濟整體的投資和消費等總體性的統計數據來分析總體經濟運行規律的一個經濟學領域。」- Wikipedia</p><p>總體經濟學包含三大要素：產出、貨幣、預期心理。以下我們將透過認識這三個要素來了解總體經濟學如何影響我們的日常生活。</p><h4><strong>一、產出</strong></h4><p>一個國家的產出即其生產「貨品」和「勞務」的總量，最常用來衡量一國產出的指標為GDP（在一年期間內，一國國內所生產的全部貨品即勞務的市場價值）。</p><p><strong>國家經濟繁榮靠的是大量的產出，而非大量的貨幣。</strong>政府可以印一堆鈔票讓你變成百萬富翁，但若國內產出很少，你實際能換到的商品也不會增加。因此，能衡量一國福利的是產出而非貨幣。</p><blockquote>經濟成長和衰退的原因</blockquote><p>經濟成長的的主要來源是<strong>勞動力增加</strong>、<strong>資本增加</strong>、兩者的<strong>使用效率增加</strong>，因為這些都能<strong>增加產出</strong>。反之，則會造成經濟衰退，例如大地震摧毀大量廠房（資本減少）、致命瘟疫導致大量人口死亡（勞動力減少）等。</p><p>然而在某些情況下，即使上述三者都沒有下降，經濟依然衰退。當各總體經濟學家百思不得其解時，總體經濟學家凱因斯提出此現象由人們的「<strong>預期心理</strong>」所導致。當人民對未來悲觀時，會增加儲蓄、減少投資，而<strong>需求的減少</strong>將使產出無法達到最大，造成資產閒置。從那時開始，總體經濟學家便發現「需求」和「供給」同等重要，認為政府應透過「貨幣政策」和「財政政策」管理這些需求，以縮短經濟衰退的時間，維持經濟穩定。</p><h4><strong>二、貨幣</strong></h4><p>縱使產出比財富更加重要，但貨幣具有交易標準、價值貯藏、延後支付、交易媒介等功能，使市場運作更有效率。當今的各國政府幾乎都會印製或鑄造自己國家的貨幣，後面我們將看到國家如何透過創造貨幣來影響經濟。</p><blockquote>貨幣的價格</blockquote><p>貨幣的價格由「利率」、「匯率」、「總合物價水準」三項所構成。</p><p><strong>利率</strong>：代表「持有貨幣的代價」。因為大部分人相比於未來，更傾向現在持有貨幣。</p><pre>利率上升 → 減少目前的消費與投資 → 減緩經濟成長<br>利率下降 → 增加目前的消費與投資 → 增加經濟成長</pre><p><strong>匯率</strong>：一種通貨（流通中貨幣）以其他通貨來計算的價格。</p><pre>一國匯率貶值 → 該國東西變便宜，外國東西變貴 → 有利出口、不利進口<br>一國匯率升值 → 該國東西變貴，外國東西變便宜 → 不利出口、有利進口</pre><p><strong>總和物價水準</strong>：所有貨品及勞務的平均價格。個別貨品和勞務的價格隨時都在變動，有些上升、有些下降，但整體會有個大趨勢。若整個趨勢上漲則為通貨膨脹；趨勢下降即為通貨緊縮。</p><blockquote>貨幣數量的影響</blockquote><p>根據供需法則，貨幣的數量會影響上述的三種貨幣價格。</p><pre>貨幣供給增加 → 利率降低、匯率降低、物價上升（同樣金額的貨幣能換到的東西變少）<br>貨幣供給下降 → 利率增加、匯率增加、物價下降（同樣金額的貨幣能換到的東西變多）</pre><blockquote>名目 v.s. 實質</blockquote><p>我們在日常生活中常常只關注到名目指摽，但其實<strong>實質指標才是我們應該要關注的</strong>，下面將會介紹幾個重要指標的名目和真實之間的關係。</p><p><strong>GDP<br></strong>由於<strong>產出</strong>才能真正代表一國的經濟情勢，而GDP的計算方式會被「物價」和「產出」兩者所影響，因此應<strong>去除物價波動</strong>，<strong>只看貨品及服務數量</strong>來評斷兩年的經濟狀況，才能看出一國「真實」的經濟發展。</p><p>煮個栗子，A年和B年<strong>產出相同</strong>，但A年的物價比B年高，則A年名目GDP &gt; B年名目GDP，兩年<strong>實質GDP相同</strong>。</p><p><strong>利率<br></strong>名目利率為銀行和報紙上看得到的利率，而實質利率的公式為：</p><pre>實質利率 = 名目利率 - 預期通膨</pre><p>放貸者<strong>真正在意的是實質利率，而非名目利率</strong>。假設今天一頭牛市價100元，Ａ今天借2000元（20頭牛）給Ｂ，名目利率10％，也就是Ｂ一年後要還2200元（22頭牛）。過了一年後，通貨膨脹了5%，一頭牛如今市價105元，Ｂ還給Ａ的2200元（約20.95頭牛）如今就貶值了，因其能換到的商品及勞務變少。因此Ａ應<strong>考慮未來通膨</strong>，來訂定名目利率，才能確保一年後能拿到22頭牛，也就是真實利率10%。</p><p><strong>匯率</strong></p><pre>%△實質匯率(A貨幣/B貨幣) = %△名目匯率(A貨幣/B貨幣) - (A國通膨% - B國通膨%)</pre><p>從上述公式中，我們可以看到實質匯率會被兩國的通膨程度影響，若從事國際交易只注意名目匯率，而沒有注意到通膨的部分，可能會造成嚴重的經濟損失。</p><blockquote>中央銀行</blockquote><p>台灣和美國的央行對於「貨幣基數」擁有絕對控制權，因此能夠透過<strong>控制貨幣數量來操縱短期利率</strong>，進而影響經濟走勢，這就是所謂的「貨幣政策」。</p><pre>擴張性貨幣政策（量化寬鬆）：增加貨幣數量 → 利率下降(貨幣價格下跌） <br>緊縮性貨幣政策（量化緊縮）：減少貨幣數量 → 利率上升(貨幣價格上升）</pre><p>範例：<br>1. 如果央行認為GDP成長太慢，或失業率太高，便會利用貨幣政策降低利率，以提升消費和投資，促進經濟成長。<br>2. 若央行想以「特定匯率」為目標，該國貨幣貶值時，可以提高該國利率，因為利率上升會增加本國資產需求，同時提升對本國貨幣的需求，本國貨幣就會升值。反之，該國貨幣升值時，可以降低該國利率。</p><p>央行的目標通常是：GDP成長、低失業率、低通膨、穩定的匯率等。但這些目標常常會<strong>有取捨關係</strong>，<strong>無法同時達到</strong>。著名的菲利浦曲線就是在說明「通貨膨脹成長率」和「失業率成長率」為<strong>負相關</strong>性，兩者無法同時兼顧。</p><blockquote>貨幣供給</blockquote><pre>貨幣供給量 = 貨幣基數 × 貨幣乘數</pre><p><strong>貨幣基數</strong>：央行流通到市面上的貨幣數量<br><strong>貨幣乘數</strong>：銀行體系由一單位基礎貨幣，透過<strong>不斷重複的存款與放款過程</strong>，所創造出的貨幣供給量。 舉例，若A將10塊錢存進銀行，銀行將其中的9塊錢借給B以賺取利息，B又將9塊存進銀行，銀行將有19的存款，等於將10塊放大到19塊，此例中的貨幣乘數為1.9。</p><blockquote>貨幣政策的三項基本工具</blockquote><p><strong>貼現率<br></strong>在美國，央行有權力利用任何利率借錢給商業銀行，這個利率叫作「貼現率」。商業銀行會跟央行用貼現率借錢，再以比貼現率高的利率借錢給民眾或公司。</p><pre>央行降低貼現率 → 商業銀行多跟央行借錢 → 貨幣基數提升 → 貨幣供給上升<br>央行調升貼現率 → 商業銀行少跟央行借錢 → 貨幣基數下降 → 貨幣供給下降</pre><p><strong>法定準備率<br></strong>法定準備是央行規定商業銀行，每筆存款必須下來不能貸款出去的比率。若法定準備率為10%，有人存了100塊進銀行，銀行只能將90塊貸款出去。</p><p>法定準備率會影響到貨幣乘數，因為法定準備率越高，政府能借出的貨幣越少，能夠創造出的貨幣供給量就越小。</p><pre>法定準備率上升 → 貨幣乘數下降 → 貨幣供給下降<br>法定準備率下降 → 貨幣乘數上升 → 貨幣供給上升</pre><p><strong>公開市場操作<br></strong>央行可以透過向民間金融機構買賣「政府債券」或「其他資產」來來控制市面上的貨幣數量。</p><pre>公開市場購買 → 貨幣基數上升 → 貨幣供給上升<br>公開市場出售 → 貨幣基數下降 → 貨幣供給下降</pre><p>央行便是透過這三個手段來控制貨幣供給量，進而影響利率和實體經濟走勢。</p><h4>三、預期心理</h4><blockquote>預期心理可以驅使整個經濟向某方向移動，甚至光是預期心理本身就能成事。</blockquote><p>例如，如果大家認為一家銀行要破產了，就會紛紛去將銀行的錢領出來，導致其真的破產。</p><p>正因為大眾的預期心理會影響經濟的走向，因此許多總體經濟學家認為<strong>政府應協助醞釀對經濟有利的大眾預期心理</strong>。</p><blockquote>預期心理與通貨膨脹</blockquote><p>在往下解說之前，我們首先要知道<strong>預期通膨會影響實際通膨</strong>。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ueYf_sbrruBEBOB00An6w.png" /><figcaption>參考來源：<a href="https://www.cbc.gov.tw/tw/public/Attachment/5321422571.pdf">https://www.cbc.gov.tw/tw/public/Attachment/5321422571.pdf</a></figcaption></figure><p>所有的中央銀行都有個重要工作 — <strong>說服大眾未來的物價水準不會上升太多。</strong>以免民眾因對於通膨的預期心理造成實際通膨上升，進而提升通膨的預期心理，兩者不斷推高彼此，最終導致實際通膨劇烈上升的惡性循環。</p><p>為此，央行必須具備一定「可信度」，要讓人民知道只要通貨膨脹只要超過預定的目標通膨，央行就會積極處理，使其恢復原水準。但和通膨戰鬥是非常困難的事情，為了壓低通膨，必須減緩經濟成長速度，而這可能會使失業率上升。這也是為何大部分的總經學家都贊成央行為<strong>獨立</strong>的機關，否則政治人物可能會為了在任期間討好選民，不敢讓失業率上升而任由通膨成長，而導致未來經濟出現危機。</p><blockquote>預期心理與產出</blockquote><p>預期心理也能影響實際產出。如果大家認為未來景氣很差，便會怕工資減少或者失業而減少花費、增加儲蓄，同時減少投資，使潛在GDP（可以達到的供給）和真實GDP（實際有效需求）有所差距，並發生以下的惡性循環：</p><pre>消費者減少花費和儲蓄 → 貨品、勞務滯銷 → 廠商減產、裁員、減少新投資 → 失業率上升壓低所得 → 進一步減少需求 → 強化此惡性循環</pre><p>政府要解決以上的惡性循環有兩種方法：貨幣政策、財政政策。</p><p><strong>擴張性貨幣政策<br></strong>央行降低利率可以促進消費和投資。因為儲蓄吸引力會降低、消費者借款成本降低，增加消費；企業融資變便宜，在未來收益相同情況下，投資計畫會比原來更具吸引力。</p><p>但凱因斯提出：<strong>在非常蕭條時，擴張性貨幣政策會失去效果</strong>。</p><p>當利率已經很低時，利率再低，大眾還是會寧可持有現金，不願拿去消費和投資。這是因為對於未來的悲觀預期，如通貨緊縮（資產變便宜）、戰爭等，使民眾寧可放棄賺持有資產的少許利息，而持有貨幣。此時政府無論注入多少貨幣到市場，人們都傾向持有。這種狀況稱為「流動性陷阱」。</p><p>另一種情況是當通貨緊縮很嚴重時，名目利率就算低，真實利率還是很高（真實利率 ＝ 名目利率 − 預期通貨），因此無法有效刺激企業借款投資。</p><p>藉由適當的貨幣政策，可以阻止這種通貨緊縮的狀況。但若發生了這種程度的通貨緊縮，貨幣政策的效果很有限。為了改善大眾對於未來需求的悲觀預期，凱因斯提出了擴張性財政政策。</p><p><strong>擴張性財政政策<br></strong>凱因斯認為若政府以超出稅收的預算赤字支出來購買商品及勞務，積極創造有效需求（人們有能力並且願意購買的需求），大眾對於未來的預期會轉為樂觀，引導民眾消費和投資增加，將經濟從原來的惡性循環脫離。GDP的增加會進一步促進民眾消費和投資，使GDP繼續增加，進入一個良性循環。</p><p>擴張性財政政策在不同時期會有不同的效果，應根據當時的狀況來判斷是否使用。凱因斯在1930提出此政策時，正值經濟大蕭條，為高失業時期，有效提振當時的經濟，使凱因斯學派從此在經濟學中占有重要的一席之地。</p><pre><strong>正常時期</strong>：政府預算赤字增加 → 需求增加 → Q、P增加（實質GDP增加、通貨膨脹）<strong><br>高失業時期</strong>：政府預算赤字增加 → 需求增加 → Q增加（實質GDP增加）<br><strong>充分就業時期</strong>：政府預算赤字增加 → 需求增加 → P增加（通貨膨脹）</pre><p>縱使「擴張性財政政策」能夠解決貨幣政策無法解決的問題，但還是有限制，使其沒能如理論上強效。</p><ul><li>進口：人民對於進口商品的消費並不算在本國GDP裡。</li><li>理性預期：經濟學家李嘉圖認為若人們擁有「理性預期」，便會知道現在政府赤字支出所帶來的負債，將會在未來以提高賦稅的方式來彌補。為了應付未來的高稅額，人們將不會提高消費，而是選擇儲蓄。</li><li>排擠效應：政府赤字支出，將會使利率提高，削減私人消費和投資。由於政府支出和稅收的差額，一部分會透過「公開市場操作」，發行政府債券來籌資，而這是一種「緊縮貨幣政策」，將貨幣從市場中收回，會導致利率上升。</li></ul><p>即便以上因素使得「擴張性財政政策」的<strong>效果沒有想像中強大</strong>，但總體經濟學家還是相信總體來說會<strong>提升消費和投資的成長</strong>，因此當一國陷入經濟衰退時，大多數決策者依然會使用擴張性貨幣政策。</p><h4>總結</h4><p>讀完本文，我們認識到產出才是衡量經濟好壞的關鍵、貨幣的價格組成、央行的貨幣政策、財政政策，預期心理對於經濟的影響等概念。就能了解為何疫情下美國為什麼要QE（擴張性貨幣政策）、台灣政府之前疫情爆發時為何要發放消費券（使經濟進入良性循環）等相關的經濟政策。</p><p>由於整個經濟體實在太複雜，無法簡單用一個公式去解釋說運作原理。因此，每個總體經濟理論都會有人提出其考慮不周的地方。因此作者也在書中提到「總體經濟學是非常不準確的科學」，或有「10個經濟學家有11種意見」的說法。但我們還是可以看到很多情況都符合總體經計學裡提到的基本原則，因此了解它們幫助我們更好地提高決策的正確性。</p><p>直到最近還是會覺得總經離我的日常生活太遠，對我沒什麼幫助，但寫完這篇文章時覺得搞懂它對於商業決策是蠻重要的一件事，未來應該會有用到的時候，等我真的用到時，可能再來寫一篇文吧。</p><h4>我的Q&amp;A的A</h4><ol><li>為什麼會有通貨膨脹？</li></ol><p>經濟學家有各種解釋，但最常見的兩個理論是「需求拉動的通膨」和「成本推動的通膨」。前者為貨幣供給提升時，<strong>太多的貨幣追逐較少的商品及勞務</strong>而造成通膨；後者是因為<strong>供給面生產不足</strong>，而造成通膨，例如工資上漲、原要價格上漲、企業壟斷等。</p><p>2. 為什麼通常美國會想將通膨控制在2%？</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIu9bkpJwHWfw9fyM40fIA.png" /><figcaption>參考來源：<a href="https://talkecon.com/inflation/">https://talkecon.com/inflation/</a></figcaption></figure><p>3. 美國十年公債殖利率</p><p>美國公債由於是美國政府發行的債券，因此違約的風險很低（除非美國政府倒台，但機率很低），因此屬於避險資產，但缺點就是利息不會太高。</p><p>公債殖利率 ＝票面利息（固定） / 公債市場價格（波動）</p><p>當市場被預測為多頭時，大家會將錢從公債轉轉而投資股票這個風險較高、利息較高的標的。而公債需求下降，會導致公債價格下降，公債殖利率因此上升。所以才會有公債殖利率上升，通常代表景氣即將好轉的跡象。反之，公債殖利率下降，代表公債市價上升，人民將錢從股市轉移到債市，代表未來景氣將會變差。</p><h4>Reference</h4><ul><li><a href="https://www.cbc.gov.tw/tw/cp-731-24676-47E47-1.html">https://www.cbc.gov.tw/tw/cp-731-24676-47E47-1.html</a></li><li><a href="https://talkecon.com/inflation/">https://talkecon.com/inflation/</a></li><li><a href="https://reurl.cc/dG9lyq">https://reurl.cc/dG9lyq</a></li><li><a href="https://www.cmmedia.com.tw/home/articles/12092">https://www.cmmedia.com.tw/home/articles/12092</a></li></ul><p>總經真的超複雜，每個理論和觀念都有很多細節。若我寫的地方有誤，歡迎讀者在下面留言和我討論，以免散播錯誤的資訊給其他人，感謝～</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e54e3a84c84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LeetCode Challenge 2021/6–8]]></title>
            <link>https://yentim0519.medium.com/leetcode-challenge-2021-6-8-33243d0a4ba2?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/33243d0a4ba2</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Mon, 21 Jun 2021 17:07:35 GMT</pubDate>
            <atom:updated>2021-10-13T04:52:42.761Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lur9rrJITsFRnuIYURYkSg.png" /></figure><p>最近看到 <a href="https://medium.com/u/baf78943a5fb">Haren Lin</a> 用Gitbook來記錄LeetCode的刷題過程，覺得是個不錯的方法。Gitbook排版簡潔，分類清楚，同時支援Markdown，便於之後複習的時候拿出來看當時的解題心得和程式碼，於是我加入他的行列。</p><p>這篇除了分享我的Gitbook連結給大家之外，也是惕勵自己在出國前能夠完成在軍中設立的目標200題。鑑於有些題目搞懂要很久、自己對於程式語言的用法不夠熟悉等，90天要完成200天大約每天2題多一點，我覺得是有機會達到的。8月結束的時候，我再來總結一些心得和看我能完成多少題！</p><h4>挑戰內容</h4><ul><li>目標：刷完200題LeetCode，並盡量理解它，而非抄答案帶過</li><li>時長：2021/6/2（結訓）~ 2021/8/22 （Rice開學前一天）</li></ul><h4>完成度 （8/23更新）</h4><p>163/200 (81.5%)</p><h4>心得（8/23更新）</h4><ul><li>儘量找我能理解的方式，而不是code最乾淨的方式，因為到時候我要能在面試官面前講出我的思路，因此理解是我考量的第一順位。</li><li>遇到不會就參考別人的寫法，但會自己寫過一次，而不是懂了就直接複製貼上。透過自己寫一次可以加深理解度和複習高手有效率的code。</li><li>能夠自己寫出來的都盡量嘗試，brute force也好，真的寫不出來再參考別人的。在沒有參考的情況下，絞盡腦汁去思考可能會遇到的狀況，有些地方其實自己可以大概想到怎麼做，有些部分會卡住。最後在看別人的code時更能體會他的寫法如何解決自己想不出來的部分，如果直接抄就少了自己獨立思考的過程。</li></ul><h4>總結</h4><p>透過設立這個challenge會有一種到時候要給自己一個交代的感覺，因此會督促自己要持續有進度。本來保持每天3題，結果因為要準備出國、適應美國生活加上自己偷懶，而荒廢掉進度，有點可惜，期許之後可以找到一些更好的方法來減少過多的耍廢來提高目標完成率。</p><h4>Gitbook連結</h4><p><a href="https://app.gitbook.com/@yentim0519/s/leetcode/">https://app.gitbook.com/@yentim0519/s/leetcode/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33243d0a4ba2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Reasons I Start to Write Medium]]></title>
            <link>https://yentim0519.medium.com/the-reasons-i-start-to-write-medium-df33b32a4d41?source=rss-a8bcb40a956d------2</link>
            <guid isPermaLink="false">https://medium.com/p/df33b32a4d41</guid>
            <category><![CDATA[writing-life]]></category>
            <category><![CDATA[recording]]></category>
            <dc:creator><![CDATA[顏廷 Tim Yen]]></dc:creator>
            <pubDate>Wed, 02 Jun 2021 07:55:13 GMT</pubDate>
            <atom:updated>2021-10-13T04:53:48.160Z</atom:updated>
            <content:encoded><![CDATA[<h4>A article that records my motives of writing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q83CIBTrzyU0FXOw" /><figcaption>Photo by <a href="https://unsplash.com/@aaronburden?utm_source=medium&amp;utm_medium=referral">Aaron Burden</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>To Clarify My Thoughts and Life Values</h4><p>Through writing, I am able to organize some of the thoughts that come through my mind in a flash, but I don’t have time to think properly. Also, when some of the thoughts are related to life values, writing it down can make me clarify what my life values are, which can be guidelines while making decisions in the future.</p><p>From the reader’s comments, I will be able to see things in different perspectives, which gives me a better understanding of the topics I write.</p><h4>To Review the knowledge I‘ve learned</h4><p>These are some of the topics I am interested in writing down. I’ll update the list when I think of new ones.</p><ol><li>Book Reports</li></ol><p>Making book reports gives me a second chance to review the highlights and notes I wrote in books, which can enhance my memory of book contents. Furthermore, I can reflect the contents of the books with incidents in my life, so I can really use the knowledge or reflection of the books to live a better life.</p><p>2. Reviewing Technical Skills</p><p>By writing down the technical skills I’ve learnt, not only can I review the skills more thoroughly, I can also have a deeper understanding of it because I have to organize it to readable contexts, which is definitely helpful to my career.</p><h4>Make Contribution to the Community</h4><p>I often learned a lot from other people’s articles, so instead of writing articles only to benefit myself, I would like to make some of them public if the contents are also helpful to others.</p><h4>To Record My Growth</h4><p>We often forget how much we have grown through time. I believe writing it down will give me motion to keep grinding hard towards my goals. Moreover, I think I will be more positive by looking these records of my growth while facing struggles in the future.</p><h4>Practicing English Writing Skills</h4><p>My goal in the future is to become a software engineer in America. Thus, improving my English is essential, and writing English articles will force me to improve my grammar and vocabulary.</p><h4>Personal Branding</h4><p>Haven’t straightened out this one yet, I’ll get back to it when I have a clearer thought.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df33b32a4d41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>