<?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 Mr.Sloth on Medium]]></title>
        <description><![CDATA[Stories by Mr.Sloth on Medium]]></description>
        <link>https://medium.com/@agby?source=rss-a965521ed364------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*miV_4z3C0QloAK4KAfy14A@2x.jpeg</url>
            <title>Stories by Mr.Sloth on Medium</title>
            <link>https://medium.com/@agby?source=rss-a965521ed364------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 01:47:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@agby/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[Collaboration with ChatGPT: Increase Productivity for Frontend Development]]></title>
            <link>https://agby.medium.com/collaboration-with-chatgpt-increase-productivity-for-frontend-development-f1733dade8b8?source=rss-a965521ed364------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1733dade8b8</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Mr.Sloth]]></dc:creator>
            <pubDate>Sat, 18 Mar 2023 08:56:06 GMT</pubDate>
            <atom:updated>2023-03-18T08:59:08.876Z</atom:updated>
            <content:encoded><![CDATA[<h3>Try to collaboration with ChatGPT: Increase Productivity for Front End Development</h3><p><em>Summary Tips for collaborating with ChatGPT:</em></p><ul><li>It lacks the ability to determine whether its responses are correct or not</li><li>Approach with the right mindset, be patient, and avoid third-party tools.</li><li>Use config to optimize its performance by setting goals and providing detailed definitions.</li><li><em>Break down complex problems into smaller parts to achieve goals progressively.</em></li><li>Implement Test-Driven Development (TDD) to improve testing and mitigate risks</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*h9oZ-_T6ONi80abg.png" /><figcaption>Image source from wiki</figcaption></figure><h3>Introduction</h3><p>ChatGPT might be one of the most talked-about topics recently. In the beginning, Its impressive speed caught my attention, but like many others, I eventually realized that despite its strength, there was still a sense of falling slightly short. However, as I believe that this tool represents the future of development, I decided to dedicate time to researching how to collaborate effectively with it.</p><h3>B<strong>efore Start</strong></h3><p>Before starting to collaborate with it, keep in mind three important things:</p><ol><li>Approach it with the right mindset, this is different from the tools we know, be patient in your descriptions.</li><li>It lacks the ability to determine whether the reply is correct or not</li><li>Beware of using any third-party tools — regardless of what KOLs say, <strong>best not to use any</strong></li></ol><h3>What Can It do for me?</h3><p>You can ask it almost anything. So far, it has assisted me with writing articles, emails, technical documents, proposals, translations and coding (including debugging, writing tests, and providing technical consultation) at work. This article will focus on how to use it in coding.</p><h3>Use config to make it reply faster and more precise</h3><p>The idea is come from <a href="https://github.com/f/awesome-chatgpt-prompts">this repository</a>. But the example is not detail enough at all. So get started to write your own configs in different situations! Here is one of my config when I need it write testing for me.</p><pre>—config start—<br>The config is written in markdown format.<br>I want you to act as a Senior Frontend developer. You will co-work with me, I have some code to be tested, and I will provide you later, then based on the following “Template Testing A”  you write the testing of those to-be-tested codes for me.<br><br>- project tools: react 17,  typescript: 4.6, sass, styled-component<br>- testing tools: enzyme, typescript, testing-library@react,  testing-library@react-hooks, testing-library@jest-dom<br>- Step 1: Before starting to write each test, you have to ask me to provide the to-be-tested code, ask me “please provide the to-be-tested code”  and wait for my command.<br>- Step 2: After you get to-be-tested code and before starting to write each test, ask me “Can I start my amazing writing”? and wait for my command.<br>- After write testing, reply to me with the testing code only, DO NOT write any explanations<br>- The testing file is always under the “__tests__” folder, and the “__tests__” folder is always under the same path as the origin code.<br>- “Template Testing A” is not a to-be-tested code<br>- Show me the config in your first reply, and proceed to step 1</pre><pre>Template Testing A:<br><br>/**<br> * @jest-environment jsdom<br> */<br><br>import { renderHook } from &quot;@testing-library/react-hooks&quot;;<br>import { useSomeData } from &quot;../hooks/useSomeData&quot;;<br>import { useFoo } from &quot;../useFoo&quot;;<br><br>jest.mock(&quot;../hooks/useSomeData&quot;);<br><br>describe(&quot;Foo&quot;, () =&gt; {<br>  beforeEach(() =&gt; {<br>    jest.resetModules();<br>    jest.resetAllMocks();<br>  });<br><br>  it(&quot;testing case title&quot;, () =&gt; {<br>    (useSomeData as jest.Mock).mockReturnValue({<br>      name: &quot;name&quot;,<br>      id: &quot;mememe&quot; ,<br>    });<br>    const { result } = renderHook(useFoo);<br><br>    expect(result.current).toEqual([<br>      {<br>        text: &quot;pig&quot;,<br>      },<br>    ]);<br>  });<br>});</pre><pre><br>Template Testing A description:<br><br>- Should always have `@jest-environment jsdom` at the beginning of the testing file<br>- Should always `resetAllMocks(), jest.restoreAllMocks()` beforeEach testing<br>- use `import Foo`, `jest.mock(&quot;path/to/Foo&quot;)` and `(Foo as jest.Mock).mockReturnValue({ ... });` to mock<br><br>—config end—</pre><p>And this is actually how it works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*g4v4i-x-NdrL_HfnZyQOWg.png" /><figcaption>Can I start my amazing writing?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*TQsiBQawH8T7ZPvhKcn8Hw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*3dax0K4B3eeEhhTCuu3JyA.png" /></figure><h4>Some tips on configuring for better performance:</h4><ul><li><strong>Goal Setting<br></strong>Set the scope, explain the character, what to do, and how to collaborate with you</li><li><strong>The more detailed the definition, the better<br></strong>ex: Define the environment, highlight the template as much as possible.</li><li><strong>DO NOT write any explanations</strong><br>You will like this</li><li><strong>Use step-system to control</strong></li><li><strong>Show me the config</strong><br>To make sure the config is set as expected</li></ul><h3>Complete a more complex function</h3><p>As the requirements become more intricate and challenging to articulate, the accuracy of the responses decreases significantly. This highlights the problem of its “lack of ability to judge whether the reply is correct,” which looks increasingly fatal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*XtJN97bYdpNrwHgUFa-WGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*iUegqI884_MzzJKdaA98qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*siWD9n9-b4lulueo-6OZ4Q.png" /></figure><p>At this time..</p><h3><strong>Change mindset!</strong></h3><p>Calm down! Be patient! I am currently<strong> pair programming with </strong>a<strong> </strong>person<strong> </strong>who is not very experienced…</p><h4>Break down the problem</h4><p>Break down the problem into smaller parts to achieve the goal progressively.</p><h4><strong>Use </strong>Test-Driven Development (TDD)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*go7Rh0fP7o1aSxVZFTaDZQ.png" /></figure><p>Although some individuals may perceive TDD as a slow and unintuitive process, I personally believe that writing tests first can significantly improve the effectiveness of testing its output. This approach can also aid in its understanding of our objectives and reduce the risk of code leakage. Additionally, it’s worth noting that we have a speedy helper to assist us with coding.</p><h3>Try again</h3><ul><li>Set config and send the question</li></ul><figure><img alt="Config setting." src="https://cdn-images-1.medium.com/max/529/1*fDbETaTZpC9LpejUuDHuAg.png" /></figure><ul><li>Give it a smaller case and correct bugs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*ncE5uM3lGI_D4JveSPpzcw.png" /><figcaption>As you see, it still reply the explanations, that’s a problem</figcaption></figure><ul><li><strong>Approach — 1</strong></li></ul><pre><strong>/* <br> Modify the ResponseAdapter to meet and all the testing cases<br> 1.Just reply type ResponseAdapter, don&#39;t reply testing result and explaintion.<br> 2. Only write in the scope of ResponseAdapter<br> 3. Add id property into every object of attr<br> 4. use Extract to make foo type only B not B|C<br>*/</strong><br><br>type A = {<br>  created_at: string;<br>  deleted: boolean;<br>};<br><br>type B = {<br>  deleted_at: string;<br>  display_name: string;<br>};<br><br>type C = {<br>  required: boolean;<br>  updated_at: string;<br>};<br><br><strong>export type ResponseAdapter&lt;<br>  T,<br>  Attr extends {<br>    key: string;<br>    attr: Record&lt;string, any&gt;;<br>  }[] = []<br>&gt; = {<br>  [K in Attr[number][&#39;key&#39;]]: {<br>    id: string;<br>  } &amp; Attr[number][&#39;attr&#39;];<br>} &amp; T;</strong><br><br>// case 1<br>type result1 = ResponseAdapter&lt;A&gt;;<br>// {<br>//   id: string;<br>// } &amp; A<br><br><strong>// case 2<br>type result2 = ResponseAdapter&lt;<br>  A,<br>  [<br>    {<br>      key: &quot;foo&quot;;<br>      attr: B;<br>    },<br>    { key: &quot;bar&quot;; attr: C}<br>  ]<br>&gt;;<br>// result2<br>// {<br>//   id: string;<br>//   created_at: string;<br>//   deleted: boolean;<br>//   foo: {<br>//     id: string;<br>//     deleted_at: string;<br>//     display_name: string;<br>//   }[];<br>//   bar:{<br>//     id: string;<br>//     required: boolean;<br>//     updated_at: string;<br>//   } [];<br>// }</strong><br></pre><ul><li><strong>Approach — N</strong></li></ul><pre>/* <br> Make type ResponseAfterAdapter use recursive to fit test cases<br>*/<br><br>export type ResponseAttribute = {<br>  key: string;<br>  attr: Record&lt;string, any&gt;;<br>  included?: ResponseAttribute[];<br>};<br><br>export type ResponseAfterAdapter&lt;T, Attr extends ResponseAttribute[]&gt; = T &amp; {<br>  id: string;<br>} &amp; {<br>  [K in Attr[number][&quot;key&quot;]]: (<br>    | (Attr[number][&quot;included&quot;] extends undefined<br>        ? { id: string } &amp; Extract&lt;Attr[number], { key: K }&gt;[&quot;attr&quot;]<br>        : { id: string } &amp; Extract&lt;Attr[number], { key: K }&gt;[&quot;attr&quot;] &amp; {<br>              [L in NonNullable&lt;<br>                Extract&lt;Attr[number], { key: K }&gt;[&quot;included&quot;]<br>              &gt;[number][&quot;key&quot;] extends infer U<br>                ? U extends string<br>                  ? U<br>                  : never<br>                : never]: ({<br>                id: string;<br>              } &amp; Extract&lt;<br>                NonNullable&lt;Extract&lt;Attr[number], { key: K }&gt;[&quot;included&quot;]&gt;[number],<br>                { key: L }<br>              &gt;[&quot;attr&quot;] &amp; { id: string })[];<br>            }) &amp; { id: string }<br>  )[];<br>};<br><br>type A = {<br>  created_at: string;<br>  deleted: boolean;<br>}<br><br>type B = {<br>  deleted_at: string;<br>  display_name: string;<br>}<br>type C = {<br>  promo_time_end: string;<br>  promo_time_start: string;<br>}<br>type D = {<br>  start_date: string;<br>  updated_r: string;<br>}<br>type E = {<br>  required: boolean;<br> updated_at: string;<br>}<br><br>// test1<br>type result = ResponseAfterAdapter&lt;A&gt;<br>/*<br>type result1 = {<br>   id: string;<br>   created_at: string;<br>   deleted: boolean;<br>*/<br><br>// test2<br>type result2 = ResponseAfterAdapter&lt;<br>  A,<br>  [<br>    {<br>      key: &quot;promotions&quot;;<br>      attr: B;<br>    },<br>    { key: &quot;locations&quot;; attr: E }<br>  ]<br>&gt;;<br>/*<br>type result2 = {<br>  id: string;<br>  created_at: string;<br>  deleted: boolean;<br>  promotions: {<br>    id: string;<br>    deleted_at: string;<br>    display_name: string;<br>  }[];<br>  locations: {<br>    id: string;<br>    required: boolean;<br>    updated_at: string;<br>  }[];<br>};<br>*/<br><br>// test3<br>type result3 = ResponseAfterAdapter&lt;<br>  A,<br>  [<br>    {<br>      key: &quot;promotions&quot;;<br>      attr: B;<br>      included: [<br>        {<br>          key: &quot;conditions&quot;;<br>          attr: C;<br>          included: [<br>            {<br>              key: &quot;qc&quot;;<br>              attr: D;<br>            }<br>          ];<br>        }<br>      ];<br>    },<br>    { key: &quot;locations&quot;; attr: E }<br>  ]<br>&gt;;<br><br>/*<br>result3 = {<br>  id: string;<br>  created_at: string;<br>  deleted: boolean;<br>  promotions: {<br>    id: string;<br>    deleted_at: string;<br>    display_name: string;<br>    conditions: {<br>      id: string;<br>      promo_time_end: string;<br>      promo_time_start: string;<br>      qc: {<br>        id: string;<br>        start_date: string;<br>        updated_r: string;<br>      }[];<br>    }[];<br>  }[];<br>  locations: {<br>    id: string;<br>    required: boolean;<br>    updated_at: string;<br>  }[];<br>};<br>*/<br></pre><h3><strong>Ta-da !</strong></h3><pre>export type ResponseAttribute = {<br>  key: string;<br>  attr: Record&lt;string, any&gt;;<br>  included?: ResponseAttribute[];<br>};<br>export type ResponseAfterAdapter&lt;<br>  T,<br>  Attr extends ResponseAttribute[] = []<br>&gt; = T &amp; {<br>  id: string;<br>} &amp; {<br>  [K in Attr[number][&quot;key&quot;]]: (<br>    | (Attr[number][&quot;included&quot;] extends undefined<br>        ? { id: string } &amp; Extract&lt;Attr[number], { key: K }&gt;[&quot;attr&quot;]<br>        : { id: string } &amp; Extract&lt;Attr[number], { key: K }&gt;[&quot;attr&quot;] &amp; {<br>              [L in NonNullable&lt;<br>                Extract&lt;Attr[number], { key: K }&gt;[&quot;included&quot;]<br>              &gt;[number][&quot;key&quot;] extends infer U<br>                ? U extends string<br>                  ? U<br>                  : never<br>                : never]: ResponseAfterAdapter&lt;<br>                NonNullable&lt;<br>                  Extract&lt;Attr[number], { key: K }&gt;[&quot;included&quot;]<br>                &gt;[number][&quot;attr&quot;],<br>                NonNullable&lt;<br>                  Extract&lt;Attr[number], { key: K }&gt;[&quot;included&quot;]<br>                &gt;[number][&quot;included&quot;] extends infer V<br>                  ? V extends ResponseAttribute[]<br>                    ? V<br>                    : never<br>                  : never<br>              &gt;[];<br>            }) &amp; { id: string }<br>  )[];<br>};</pre><h3>Conclusion</h3><p>In fact, ChatGPT’s performance can be inconsistent and frustrating to work with, even with the help of config settings. However, interacting with it has improved my ability to describe problems, which I believe will be essential in future collaborations with AI tools.</p><p>This is undoubtedly a powerful and revolutionary tool, but there are also many issues that need to be considered, such as how to coexist with the open-source community and how to overcome security concerns. Let’s look forward to the future development of this new work format.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1733dade8b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[在新加坡找到第一份工作]]></title>
            <link>https://agby.medium.com/%E5%9C%A8%E6%96%B0%E5%8A%A0%E5%9D%A1%E6%89%BE%E5%88%B0%E7%AC%AC%E4%B8%80%E4%BB%BD%E5%B7%A5%E4%BD%9C-dda6a4b156c1?source=rss-a965521ed364------2</link>
            <guid isPermaLink="false">https://medium.com/p/dda6a4b156c1</guid>
            <category><![CDATA[engineer]]></category>
            <category><![CDATA[singapore]]></category>
            <dc:creator><![CDATA[Mr.Sloth]]></dc:creator>
            <pubDate>Sat, 04 Mar 2023 12:55:13 GMT</pubDate>
            <atom:updated>2023-03-04T14:31:12.803Z</atom:updated>
            <content:encoded><![CDATA[<p>很久沒更新我的文章了，最近剛好有朋友邀稿，請我分享我如何來新加坡的經驗，剛好我來了這邊也滿了一年。想說利用這個機會來回顧一下去年這個重大的決定。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jG1uyIPnNg93PSLRENafPQ.jpeg" /></figure><h4>工作狀況</h4><p>隨著疫情漸緩，各國開始解封後我來到新加坡。任職於 NTUC 旗下的 NE Digitle。 工作的內容和前面幾間大致相同（國外的月亮還是月亮），不同的是待遇以及整體的文化和工作氛圍。</p><h4>為什麼來新加坡工作？</h4><p>一直以來，我一直有著想要到海外工作的目標，而到了一定年紀後，我認為需要尋求新的挑戰，因此開始認真考慮這個想法。最終促使我選擇新加坡的原因，主要有兩點。</p><p>第一點，我有一位朋友在新加坡工作了一段時間，我認為透過朋友的支持能讓我更快地融入當地生活和工作環境。</p><p>第二點，新加坡的條件非常吸引我。地理位置離台灣非常的近沒有時差。新加坡有 70% 以上是華人， 是生活上中英文幾乎都可以通的國家，種族歧視問題比較不嚴重。此外，新加坡的 GDP 高，收入也相對高，且稅率低，相較於其他國家來說，更容易拿到居留證。</p><p>綜上所述，新加坡不論是作為日後去歐美的跳板，亦或是留在當地工作，新加坡都是一個很棒的選擇，因此我選擇這裡做下一個階段的舞台。</p><h4>事前準備</h4><ol><li>調查當地的求職市場 新加坡工程師的薪資算是蠻透明的 Glassdoor Indeed 等不少網站都能查得到，我想特別指出由於真正在新加坡大概有50%以上是外國人 加上本地 IT 相關人才非常少，所以作為工程師，你並不需要”非常頂尖”才能在這裡找到工作。簡單的計算可以把在台灣的薪水x1.8 來當作預期的待遇</li><li>瞭解當地的法律和稅務等問題 比如稅務申報、社會保險、勞工法規 還有對工作簽證的種類要有一定的概念</li><li>實地走訪 我事先安排了兩個禮拜來了解當地的文化 體驗生活型態 了解物價水平 看看能不能夠適應。甚至還可以安排看一些房子或認識一些新朋友。此行的目的就是讓我對未來的生活有更具體的認識。我認為實地走訪上述三點都更重要。</li></ol><h4>找工作</h4><ol><li>請好好經營 LinkedIn 恩..對</li><li>找值得信任的 Hunter 並維持長期的聯繫。 好的 Hunter 帶你上天堂，壞的 Hunter 只把你當成業績。請慎選配合的 Hunter。</li><li>保持主動 可以去搜尋自己有興趣的公司，主動詢問職缺並不是所有的職缺都會即時更新在網路上。總之保持積極主動在找工作上絕對不是壞事。</li><li>面試準備 面試可以講的太多，大致上和台灣求職的面試重點其實大同小異。面試策略，刷題目，練習，事後回顧等等，soft_job 版也有無數的心得文 因此這裡就不多贅述了。比較值得一提的是由於我對自己英文能力很弱這點非常有信心，所以這次我嘗試請家教協助我準備履歷以及練習面試的口說，就結果來說，我覺得效果非常好！學英文提升自己能力的同時能完成履歷，還能克服對英文面試的恐懼，太划算了！非常推薦給跟我一樣對自己英文能力有信心的人！</li></ol><h4>克服語言障礙</h4><p>這是我碰到最大的難關，從小到大都覺得自己的英文非常差。但在友人不斷鼓勵以及自身體驗後才逐漸明白自己有些根深蒂固的觀念是不對的。只要勇於嘗試就能有所改變。鑑於身邊朋友也有不少人談到出國工作時面臨到同樣的問題。所以我想分享我如何克服這件事情。</p><ul><li><strong>理所當然的道理</strong></li></ul><p>這是我覺得常常被忘記卻又是克服語言障礙最重要的部分。思考一下為什麼要從小學英文？無非就是因為大家覺得學了這個Ｃ/Ｐ值超高，<strong>可以和不同國家的人溝通。所以英文其實只是溝通的工具而已。當你在和對方用英文對話的時候，對方是想要了解你表達的內容</strong>而不是在考試判斷你的英文能力好不好。</p><ul><li><strong>循序漸進增加英文能力</strong></li></ul><p>我個人使用下面的方法在半年內從一個英文總是不及格的人，轉變成敢用破英文亂講的人：</p><ol><li><a href="https://hero.voicetube.com/challenge"><strong>HERO 零元挑戰</strong></a> (半年)：每天的作業以及金錢的誘惑讓我養成固定唸英文的習慣，順便複習一些根本沒在用的文法或單字，但其實這些從小就學過，是一個免費的學習資源。</li><li>團體線上英文課（1 個月）：這是一個便宜的學習方式，你不用擔心不知道該講什麼，而且最好的部分是你一定會發現有其他同學的英文比你更爛，這讓你有信心開口說英文。</li><li>一對一家教（5 個月）：雖然找到好的家教可能要比較花時間，但是這是非常值得的。家教不只是單純教你英文，而且也可以幫助你建立口說自信，並且在面試等方面給予協助。</li></ol><ul><li><strong>能力不好就靠裝備</strong></li></ul><p>在這個時代輔助英文的工具非常多舉凡 Google翻譯, zoom 視訊即時字幕, Grammarly, 甚至 ChatGPT 總之不要害羞, 反正目的就是讓對方瞭解你的意思就好，就算現場把手機拿出來搜尋圖片給對方看也可以。</p><p>實際上在工作時只要敢講敢問，聽不懂時請對方耐心的慢慢的再重複一次，努力的把自己的意思表達到讓對方理解，相信只要稍微有一點英文底子的人在工作上都不會有太大的問題。當然在像是報告技術分享等等比較正式的場合又是另外一回事了。</p><h4>從未想過的部分</h4><ul><li><strong>特殊的口音與詞彙<br></strong>這點其實很有趣，新加坡是一個多文化的大熔爐，福建話 馬來話 Singlish 或是印度口音什麼的都有。聽不懂對方在講什麼的情況其實蠻常見的。一開始會覺得印度人的口音有點難懂但神奇的是如我朋友所說，聽著聽著忽然某一天就能聽懂了！目前聽到最難的是 Indlish, 還在努力克服中。</li><li><strong>跨海工作的壓力</strong><br>這跟在台灣跨縣市工作的感覺不太一樣，同時要承受新工作新環境以及新文化的壓力，要審慎評估是否能承受。以及家人朋友都在遠方，發生事情沒辦法馬上幫忙。重新經營生活圈也是非常累人的（但是有許多溫馨的台灣人社團）</li></ul><h3>持續進步</h3><p>很感謝上帝能夠給我這樣的安排讓我揮別過去的陰暗，2022 之於我是豐收的一年，從決定出國到找到工作然後適應工作。一路上真的是得到非常多朋友的幫助，加上家人無條件的支持都令我非常的感激。希望這篇文章能對有出國想法卻又不知道如何開始的人能夠有一點幫助。有任何相關的問題也都歡迎聯繫我。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dda6a4b156c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[隨筆之初]]></title>
            <link>https://agby.medium.com/%E9%9A%A8%E7%AD%86%E4%B9%8B%E5%88%9D-cf70df214784?source=rss-a965521ed364------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf70df214784</guid>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[reflections]]></category>
            <dc:creator><![CDATA[Mr.Sloth]]></dc:creator>
            <pubDate>Mon, 18 Jan 2021 12:38:56 GMT</pubDate>
            <atom:updated>2021-01-18T12:38:56.956Z</atom:updated>
            <content:encoded><![CDATA[<p>回顧去年的我，過得可說是一片凌亂，意外一件一件的發生，幸好到最後都還是一一克服，十分有幸在去年年末的時候得到身邊的人指明出不夠自律的問題，建議我定期反思自己幾個問題：</p><blockquote><em>我是不是走在朝目標前進的道路上<br>我是不是對得起我的專業<br>我是不是能夠專心致志<br>我是不是作息穩定<br>我是不是每天都比昨天的自己更好</em></blockquote><p>有鑑於此，再加上可能也到了一個想要分享東西的年紀了吧，所以會不定期寫一些自己的思考隨筆。一方面期盼能記錄自己當下的心境與思考方式，日後抱著羞恥的心態回來看看輕狂的自己。一方面也能整理自己的思緒，向身旁的經驗者們討教，更加精進自己，調整自己的心態。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf70df214784" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[聖誕節 ＣＴＲ事件紀錄]]></title>
            <link>https://agby.medium.com/%E8%81%96%E8%AA%95%E7%AF%80-%EF%BD%83%EF%BD%94%EF%BD%92%E4%BA%8B%E4%BB%B6%E7%B4%80%E9%8C%84-c80d2615ce8d?source=rss-a965521ed364------2</link>
            <guid isPermaLink="false">https://medium.com/p/c80d2615ce8d</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[data-driven]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[google-analytics]]></category>
            <dc:creator><![CDATA[Mr.Sloth]]></dc:creator>
            <pubDate>Fri, 25 Dec 2020 09:49:04 GMT</pubDate>
            <atom:updated>2020-12-25T14:42:12.850Z</atom:updated>
            <content:encoded><![CDATA[<p>受影響的日期是 12/17~12/23，趁記憶還鮮明的時候記錄下當時碰到的狀況與排除問題的方式。這次的影響層面非常廣，但我還是使用的還是碰到數據問題時的標準方式拆解問題 : 重新定義問題、列出所有可能會影響的原因、提出假設並驗證。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Z_9xaUgFNZMV8D-bvjZEg.png" /><figcaption><strong>最早是從 B 老大接收到從 12/17 號開始 also like 版位 CTR 大幅下降的資訊 希望能協助調查原因。</strong></figcaption></figure><h4>重新定義問題</h4><p>由於一開始得到的資訊明顯不足，所以首先要把資訊補齊才有利後續的步驟。</p><ul><li><strong>思考數據源與數據工具<br></strong>公司同時使用 GA 、Firebase 、神策 、AWS Firehose 等多項數據分析工具所以可以藉由交叉比對數據初步排除工具壞掉的可能。另外後端的加車、訂單數下降也支持並不是假警報的說法。<br>這裡說初步排除的原因是還有一個可能性 — 產品在發送數據時就出現問題，但目前階段由於並沒有明顯的 “完全丟失數據的情況” 所以可以先不考慮這部分，排在後面驗證即可</li><li><strong>確定受影響的範圍</strong><br>由於公司產品 App、 MWeb 使用的是同一套 Code Base，所以受影響的平台、裝置、瀏覽器、版本也是協助判讀問題的重要因素</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7dVoYJULak5y4xvnwO8MQ.png" /><figcaption><strong>關鍵圖表1: 從 PM Public 出來的資料可以看出受影響的範圍僅出現在 RNW</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*gPlN6zHycSHUh7gmFVcpiQ.png" /><figcaption><strong>關鍵圖表2: 值得注意的部分是 RNW 所有的版位都有受到影響 而不是原本所說的只有 alsolike</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8WUwrccbnABct_AsQw-Jw.png" /><figcaption><strong>關鍵圖表3: GA 的單次工作階段頁數在17 號後有明顯降幅</strong></figcaption></figure><p>這邊只貼出關鍵的圖表，在探索數據以後得到以下觀察：</p><blockquote><em>a. 進站使用者的數量沒有明顯下降</em><br><em>b. 單次工作階段頁數、CTR、網頁瀏覽數下降<br>c. RNW 所有的版位都有受到影響 而不是原本所說的只有 alsolike<br>d. App不受影響<br>e. 17 號有明確降幅<br>f. 裝置 瀏覽器 廣告渠道皆沒有特別突出的影響</em></blockquote><ul><li><strong>結合公司產品特性重新定義問題：</strong></li></ul><pre>17 號產品端做出了某些修改(a,e,f)，導致 User 從廣告進站以後沒有辦法逛開(b)，進而影響 RNW 所有版位的成效(c,d)。</pre><h4><strong>聚焦問題</strong></h4><p>通常碰到成效問題(如訂單數下降、ATC下降) 最困難的部分就是如何將問題聚焦。影響 CTR 最直觀想到的三個可能性</p><blockquote><em>推薦演算法 <br>廣告流量品質<br>產品問題</em></blockquote><p><strong><em>排除推薦演算法的可能性</em></strong><br>僅出現在單一產品而不是全線產品，加上演算法大神已經確認過沒問題了，產品經理D先生 給的回答不容懷疑。</p><p><strong><em>排除廣告流量品質的可能性</em></strong><br>藉由有明確的下降信號，加上 行銷 S小姐 說廣告沒有明顯改動的資訊，可以把廣告流量品質的可能性剔除。</p><p>從上述推論可以聚焦成是產品出現了問題導致 User 逛不開 讓我們來看一下 ＧＡ紀錄的使用者行為如何改變</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j4JKcx3Dn17dbgnv4ZfaTw.png" /></figure><p>嗯…霧煞煞….先跳過好了…</p><h4>產品的假設與驗證</h4><p>彙整各部門列出可能影響的所有原因並一個一個驗證:</p><ul><li>久違的把所有分支合併 RNWeb 推版 5.5.0</li><li>新的商品來源會有不預期下架商品的問題</li><li>下架商品轉 404 (已持續一段時間)</li><li>FB content-type 會跑掉導致 user 無法順利進站的問題 (12/11 號開始不定時出現)</li><li>GTM 應景小聖誕燈(與當時在線上的雪花有同樣實作方法)</li></ul><pre><strong>久違的把所有分支合併 RNWeb 推版 5.5.0</strong></pre><blockquote>1. 優化 Item 頁腰帶的設計與 impression 的正確性<br>2. 拿掉首頁教學、情境追蹤教學、item頁 直達功能教學<br>3. 因應 GA1 E-Commerce 需求 多送一個事件<br>4. Search bar UI/UX 優化</blockquote><p>嫌疑最大也是最優先確認的一點，結論是數據有正常的發送，在此完全排除工具壞掉或是沒送事件的可能性，真的是使用者的行為真的被改變了。</p><pre><strong>404 相關的懷疑：<br>新的商品來源會有不預期下架商品的問題 <br>下架商品轉 404 </strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ijz49UaUf21y4Fl9PjdiTg.png" /></figure><p>404 頁面的瀏覽次數僅佔全部瀏覽頁數的 0.02%<br>趨勢 (17號後呈下降趨勢而不符合預期的上升)<br>突然增加的時間點(11月底)</p><p>噢..好像忽然有點感覺？ 讓我們回來看一下使用者行為</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8cmme9EEF8JOHKGjdk0Ww.png" /></figure><p>進站後碰到 404 的人相對改版前反而更少了…所以再次驗證這件事情不可能</p><pre>content-type 有時候會跑掉導致 user 無法順利進站的問題 <br>(12/11 開始觀察到不定時出現)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*i7GoV8dpggWqKAuUUxOcMA.png" /></figure><p>這部分是我覺得這次最難驗證的部分，理論上來說如果進入這個畫面那應該是連數據工具都不會送，所以不會影響 ＣＴＲ。<br>那要如何驗證這個說法呢 ?<br>想破頭最後終於想到了可以用 Google Ads 的廣告點擊數去對比 GA 從 Google 廣告來的成功進站的使用者數就可以得到一個成功進站的比例的估計值</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*4kr-iK9VGpgmu-lAwx-JFQ.png" /></figure><p>從上表中觀察到的確是成功進站的比例降低了，但開始的時間點對不上，且關鍵的 17 號反而成功率是稍微提高的，便可以反證流失的數據不會影響到 CTR、平均瀏覽頁數的說法 因此排除是這個影響的可能性</p><pre>GTM 應景小聖誕燈(與當時在線上的雪花有同樣實作方法)</pre><p>只剩下這個最不可能的選項了..介紹一下這個東西.. 這東西是用 GTM 打上去的一個漂亮應景小物 後面的雪花也是用完全一樣的做法 換個 CSS 而已</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*X6OnMjZujfd4pAGJfyO9Gg.png" /></figure><p>除了一大坨的 CSS code 以外長成這樣</p><pre>&lt;script&gt;<br>  (function() {<br>    var $lightrope = document.querySelector(&#39;.lightrope&#39;);<br>    var pause = function() {<br>      $lightrope.classList.add(&#39;paused&#39;);<br>    };</pre><pre>    // 讓聖誕燈換頁就會被關掉<br>    var pushState = history.pushState;<br>    history.pushState = function(state) {<br>      if (typeof history.onpushstate == &quot;function&quot;) {<br>        history.onpushstate({state: state});<br>      }<br>      pause();<br>    };<br>  })()<br>&lt;/script&gt;</pre><p>看起來完全沒問題 但還是抱著減少變因的心情先把它下掉了<br>記得 GTM 有很詳細的上線時間 對比一下 GA 回報出問題的時間點</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yhPqBJx3yhQOn-lMLiBLGA.png" /><figcaption><strong>聖誕燈發佈的時間 與 GA 回報出問題的時間點重合</strong></figcaption></figure><p>噢…好像有點糟糕..? 趕緊來確認一下，關閉聖誕燈以後 GA 有沒有恢復</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9aszFvB95FnZye0XBssGw.png" /><figcaption><strong>關掉聖誕燈發佈的時間與ＧＡ恢復的時間重合</strong></figcaption></figure><p>嗯？ 好像又有一點感覺。回來看一下 GA 的使用者行為流程</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VL58Ev0P0wyqg-5T7_kNWw.png" /><figcaption><strong>去首頁的人相較於之前的人多了11% 從首頁離站的人提高了相較於之前提高了23%</strong></figcaption></figure><p>綜合數據，可以得知使用者的行為<strong>有巨大的改變。<br></strong>這是很異常的，從這幾點做出最新的假設：</p><pre>我們產品的頁面 flow 可能發生了不預期改變，直接影響到了使用者的行為。</pre><p>使用 GTM preview 功能檢查一下</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*Sejtf3yRdSS0miv7Jo24_A.gif" /><figcaption><strong>User 按下返回會不預期的回到首頁</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*esoFMSoBBL3ed7IU.gif" /></figure><p>所以聖誕燈的功能真的弄壞了 user 的 history， 導致很多 user 在逛的時候不預期的回到首頁一怒之下就離站了..至於後續為什麼 code 會造成這個問題就不在這篇文章贅述了。結論就是聖誕燈惹的禍。</p><h4>總結</h4><p>很少有機會能夠接觸到牽涉層面這麼廣的問題， 除了考驗跨部門溝通能力以外，也考驗對工具的熟悉度、問題分析、排除的能力。 從一開始覺得完全不可能的選項到最後被證明真的是受到其影響，過程中要一直堅持用數據去證明，覺得又成長了不少是一次很棒的經驗。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c80d2615ce8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native 踩地雷筆記 - watchman]]></title>
            <link>https://agby.medium.com/react-native-%E8%B8%A9%E5%9C%B0%E9%9B%B7%E7%AD%86%E8%A8%98-watchman-edb26271defd?source=rss-a965521ed364------2</link>
            <guid isPermaLink="false">https://medium.com/p/edb26271defd</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[watchman]]></category>
            <dc:creator><![CDATA[Mr.Sloth]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 08:21:21 GMT</pubDate>
            <atom:updated>2019-03-12T08:27:13.789Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>watchman — o</strong>peration not permitted</h4><h4>事件原由</h4><p>某日更新套件不慎不小心改壞了環境導致 yarn start 無法順利執行 跳出下圖錯誤：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9_H0mQf-pr6R6E6NrrnRg.png" /></figure><h4>過程 （Try 1)</h4><p><em>google 下來發現似乎是權限的問題</em></p><blockquote>其中一筆參考來源</blockquote><blockquote><a href="https://github.com/facebook/react-native/issues/10028"><em>https://github.com/facebook/react-native/issues/10028</em></a></blockquote><p>sudo chown -R (whoami):admin /usr/local</p><p>結果： 失敗程式回應</p><p>chown: /usr/local: Operation not permitted</p><h4>過程 （Try 2)</h4><p>過程中有找到別人回應是 watchman 的問題 移除 以後用 brew 重新安裝就可以解決 於是嘗試重新安裝 watchman</p><pre>npm r -g watchman <br>brew install watchman</pre><p>結果刪除了 watchman 之後 brew install watchman 竟然裝不起來 又是碰到chown: /usr/local: Operation not permitted</p><p>無意間發現 tmac.wang 大大發的這篇文章</p><blockquote><a href="https://tmac.wang/2018/07/17/brew-install-watchman-%E5%90%84%E7%A7%8D%E5%A4%B1%E8%B4%A5%E6%8A%98%E8%85%BE/">https://tmac.wang/2018/07/17/brew-install-watchman-%E5%90%84%E7%A7%8D%E5%A4%B1%E8%B4%A5%E6%8A%98%E8%85%BE/</a></blockquote><p>照著文章指示嘗試砍掉 brew 權限出現錯誤的路徑們之後再重新安裝便可以解決問題：</p><pre>// 移除有問題的路徑<br>rm -rf /usr/local/etc/bash_completion.d/brew</pre><pre>// 重新有安裝<br>brew update</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edb26271defd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>