<?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 WesleyOng on Medium]]></title>
        <description><![CDATA[Stories by WesleyOng on Medium]]></description>
        <link>https://medium.com/@WeselyOng?source=rss-2642b8e7f992------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*prx7arTNtEmgFbXP1v8WbQ.jpeg</url>
            <title>Stories by WesleyOng on Medium</title>
            <link>https://medium.com/@WeselyOng?source=rss-2642b8e7f992------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:38:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@WeselyOng/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[走過了Junior工程師那幾年的職場心得]]></title>
            <link>https://medium.com/@WeselyOng/junior%E5%B7%A5%E7%A8%8B%E5%B8%AB%E7%9A%84%E8%81%B7%E5%A0%B4%E5%BF%83%E5%BE%97-9903a9563d49?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/9903a9563d49</guid>
            <category><![CDATA[職涯觀點]]></category>
            <category><![CDATA[軟體工程師]]></category>
            <category><![CDATA[職涯探索]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 03:16:30 GMT</pubDate>
            <atom:updated>2022-03-15T11:47:47.495Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S3Z-2YzkgS34H3oHyHmvPA.png" /><figcaption>一個迷茫的感覺 (清晨.林口捷運站)</figcaption></figure><p>從2013年開始工作，偶爾有人會邀請我去跟新鮮人分享一些軟體業的心得。在提問時間常常發現，其實大家會有很類似的疑惑，就寫了這篇來放著，希望能給迷惘的新鮮人一點幫助。</p><p>軟體業近年比我當時還更熱門許多，可能因為高薪、工時彈性，吸引了很多人想要轉職到軟體業。許多原本不是電腦相關科系的人、學得很認真，但偶爾會感到迷惘。我覺得我也許對這感覺是略知一二的，我校電機當年的程式設計課彷彿像是為了要讓大家都對軟體失去興趣一樣(苦笑)。</p><p>這邊分享我常聽到的問題，至於我自己的職涯、當時做決定的觀點跟想法，大家有興趣的話可以留言，我再寫一篇。</p><p>聽到的問題大概是這幾個類別</p><ul><li>如何保持學習動力與效率<br>下班已經好累，還要學習。如何克服低潮倦怠期?</li><li>轉職的過程有什麼困難嗎?</li><li>職場上跟同事合作有什麼困難嗎?</li><li>如何選擇自己感興趣的領域? 語言?<br>前端/後端/手機/devOps/Data/各式各樣，好多!!! 怎麼選</li><li>我該如何在我的領域持續精進<br>我已經選定領域，怎麼規劃我的職涯</li></ul><p>覺得很多主題甚至一題就能寫一篇，這裡先寫些簡單的，有人有興趣聽細節的話再來談</p><h3>如何保持動力</h3><p>首先，我推薦<strong>多交朋友、跟同事搞好關係</strong>，這件事情遠比看起來還更有幫助。對有些內向的人來說可能不容易或是不舒服，但絕對需要去做！</p><p>記得，職場不是孤軍奮戰，自己戰鬥太辛苦了。</p><p>同事的領域會跟你接近，所以可以跟你一起刷題、探索新技術。不要想說藏招什麼的、自己要偷偷變得比他厲害什麼的，透過正向的互助讓彼此更好。同事找到更好的工作甚至先當上主管，大方的祝福羨慕他沒關係，離職後都是你的人脈。往後職場還有十幾幾十年，想換工作的時候有其他朋友在其他公司絕對是有幫助的。</p><p>我自己會用一些制約，像是「如果……才能」(邏輯等價於「如果不…就不能」)來給自己一些小小的推力。把我的制約寫下來或是跟朋友講，可以幫助我在有點想放棄的時候多走一步。</p><h3>偶爾會進入消極狀態</h3><p>有時候覺得自己好廢，很正常。隨著學習的觸角伸得越遠，會發現更多不會的問題，但我一定也不是一無是處吧。有時候覺得同事好雷，或許吧，那把這個情緒轉換為求職的推力換公司吧。</p><p>如同前面提的，如果有幾個好同事或是同領域的好朋友的話，聊聊天也會很有幫助。處在一個正能量圈內的話，消極狀態發生的機率也會大大降低的吧。群組裡有人覺得自己很強，但工作換來換去都在抱怨新同事是白癡，這種負面氣場讓人不想接近，大家有機會也絕對不會考慮推薦他。</p><p>客觀的評價自己與別人，知道誰擅長什麼、自己擅長什麼。我不會很樂觀地說，每個人都可以努力一下就進入軟體界年薪百萬。如果時常很累、換來換去看同事們都很開心只有你不開心，那可能你不適合這個環境或是這個產業了。</p><p>累了就休息，賀爾蒙不對的時候不用勉強，好好休息吧。女性生理期大家都知道，但據說男性也有生理週期，一樣會影響賀爾蒙的樣子，也可以看看別人是如何調適生理狀態。至於心理狀態的話，我個人喜歡看動畫打電動，但我不跟人打，因為有可能打完心情不好😂我時常試著尋找高效率的休閒活動、然後盡量不去做明知有可能會導致我心情不好的事情。</p><h3>從哪裡找資料學習</h3><p>首先我推薦 Medium，去關注你擅長的語言/工具/套件，他會推薦許多最新知識給你。通車的時候看個幾篇，學新東西又練英文，我想對於面試會很有幫助的。<br>再來是官方的社群、改版文件、版本發表會。官方的新玩具都得要大致看過一下才好。</p><p>學什麼? 如果有 Mentor 的話聽聽前輩的建議是最好。Stackoverflow 看一下你的語言、別人在問什麼、你憧憬的公司希望你會什麼。學會之後可以告訴同事，也許可以產生類似讀書會的氛圍，一起變強。</p><p>還有關鍵字是 roadmap，例如我可能會去搜【2021 frontend roadmap】【2022 backend roadmap】之類的，每年都會有熱心人統整在GitHub之類的，看它的星星數判斷是否中肯，可別找到內容農場去了。不知道學什麼的時候就去看看吧，我覺得看起來超多的。</p><h3>轉職的過程有困難嗎</h3><p>有些正向動力會讓你心情很好，負面推力的話就會讓人壓力有點大。試著想著要往那個美好的地方前進吧。提離職很難、找工作很麻煩、面試很難、談薪水很難，這個真的是荊棘天堂路 😂</p><p>有些心思細膩的人提離職會焦慮很久(就是我)但我跟朋友比起來還不算嚴重。會擔心很多事情啊，專案做到一半、公司很需要我、走了同事會變辛苦、會不會在業界黑掉？其實不用想那麼多，換工作很正常。公司不會少了你就倒閉，如果會的話他就應該給你更多薪水。</p><p>對於職場初期尤其是 Junior 職位或是沒有經驗的人，我推薦跟 Hunter 合作。LinkedIn資料用心寫，他們會比較容易找上你。我想大約在年薪 150 萬 內的階段找人力顧問公司幫忙都是很有幫助的。他們會幫你談薪水、甚至也能給你準備面試的方向，不要害怕與人互動。在軟體界是不能孤軍作戰的。</p><h3>如何選擇自己喜歡的領域、語言？</h3><p>我覺得，選擇有興趣的領域很重要。語言的話，不要侷限自己。選了領域之後有需要的語言都得去學。</p><p>領域大概簡單分成大家所說的前端、後端。初期可以想像一下自己喜歡畫面或是運算邏輯，大概工作個一陣子後可以再選擇繼續深入或者轉換領域。下面是我個人聽到工作一兩年後會猶豫的深入選擇（我個人是手機領域，其他領域都是聽朋友說的可能有點出入）</p><p>（請留意寫文章的時間是2022年）</p><ul><li>前端：身邊網頁前端的朋友好像自我介紹的時候會說我做前端，接著說自己是走什麼門派的？vue ／react／node 之類的。其中的區別我並不清楚，這時候我一率推薦去看職缺JD上寫什麼。但聽起來不管以後怎樣，javascript是一定要認真學的感覺。然後熟練的人也都會略懂後端的架構。</li><li>後端：有幾個分支是純後端／SRE／DevOps／資料科學／資料工程師<br>這些可以邊工作邊思考自己喜歡哪個部分，有些公司的SRE／DevOps會直接歸給後端作。後端領域我認為網路架構、超重要的SQL、Docker、Kubernates 學好是絕對不會吃虧的。</li><li>Data/MachineLearning：我覺得這個位子近年聽起來相當夢幻，相較下它的職缺真的不多。偶爾有些人會說「機器學習不難啊我去Kaggle自學一個月就會用惹！」希望你不要這樣覺得。客觀的說這至少也是資工系中後期的選修課，要是有那麼簡單的話就當通識了。底層理論跳過只學工具確實會很快，但是需要Data Team的通常是大公司，薪資高、競爭對手多，如果跳過理論恐怕是對面試有點不利的。另外 Data 可能會分成純分析／或是架設系統，後者需要紮實的後端架構理解，前者就是很熱門的資料分析師。資料怎麼來？怎麼存？怎麼取？怎麼分析？會不會導致系統負擔什麼的，絕對不會很簡單。</li><li>手機：iOS／Android可以任選。其他也有些雙平台通吃工具，建議先看看是否你很想去的「那些」公司都使用某個套件或工具。不是只找一間參考喔，多看幾間，因為需要考慮幾年後的職涯。手機領域我建議找 App 是營利主力的公司，會讓你的履歷看起來更厲害一些，第二份工作盡量不要只是主力網頁產品的附屬。</li></ul><p>至於全端的話可能也是先看看職缺，一般來說新創公司比較會有全端工程師的需求，事情可能會比較多。新創有機會可以拚一發，或是以後可以卡位升技術主管職。知名外商或大公司比較少聽說在找全端工程師，這些公司工時穩定不加班，事情不會太多、薪水不會太少，但比較難升遷。</p><h3>互助的精神</h3><p>大家都在網路上找解法，用別人免費開發的第三方套件。所以有能力的時候就幫助別人吧，整個軟體界就是這樣演進的。</p><p>搜尋一個問題的時候，找到別人有跟你一樣的問題但是沒有解法，記得等等如果解開的話就來寫個解答。回答別人的問題也可以讓自己進步。為了要論述清晰會需要整理自己的知識，還能練習英文。這些絕對都不只是在做義工而已。</p><p>像是我為什麼要花時間分享這些心得，或是無償參加經驗分享會？我其實也沒有在經營什麼形象品牌，只是覺得這是一種回饋的方式。而且如果讓大家都能加薪加薪，整個軟體業的薪水也可以水漲船高對我也有一點幫助吧。</p><p>人緣好很重要，不要單打獨鬥 (重複第一百次)，工作也要跟別人好好相處。不要每次都給 PM 翻白眼，或者覺得同事怎麼連這都不會。在能力所及範圍給別人方便，大家互相幫忙吧！</p><p>最後，想想轉職可以加薪。工作嘛，當然是為了賺錢啊。我現在的薪水是第一份工作的五倍左右，希望具體的數字可以讓你覺得很有動力。我想我應該是很幸運的，可是如果不去買刮刮樂就絕對不會中獎對吧？</p><p>認真的人很多，走在我們前面的人也很多。如果走在我們前面的人比我們還認真的話，我們只會遠遠被甩在身後，甚至被更認真的後輩超越。</p><p>很可惜這並不是「不用那麼努力也可以喔」「逃避並不可恥」那樣的環境。如果人人都可以輕鬆進場，憑什麼薪水可以那麼高呢？深呼吸，再努力一下吧！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9903a9563d49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Metrics : FrameRate for Each Fragments]]></title>
            <link>https://medium.com/grindr-engineering/android-metrics-framerate-for-each-fragments-d311dbe909c1?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/d311dbe909c1</guid>
            <category><![CDATA[android-developers]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 03:49:53 GMT</pubDate>
            <atom:updated>2020-04-20T03:54:35.404Z</atom:updated>
            <content:encoded><![CDATA[<h3>Android Metrics : FrameRate for Each Fragments</h3><p>Frame rate, AKA Frames Per Second (FPS), is one of the most important metrics to quantify your app’s fluidity on UI performance.</p><pre>Skipped 55 frames!  The application may be doing too much work on its main thread.</pre><p>You might have seen this in your logs. If the main thread is busy, the FPS might drops. Dropping some frame seems to be not a big deal, but it’s a warning because it might becomes an ANR on a slower device.</p><p>To track frame rate for an app, <a href="https://firebase.google.com/docs/perf-mon">Firebase Performance Monitoring</a> provides a solution to trace your frame rate for each activity. The metrics will be listed in FirebaseConsole/Performance/onDevice/Rendering</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0RnVWd5U2DJkXRx1ZrjNg.png" /><figcaption>The Metrics for each Activity will be listed in Firebase console.</figcaption></figure><p>But what if I’m using a TabLayout in my HomeActivity, And it contains several Fragments? Simply telling me “HomeActivity has 50% slow rendering” does not help because it might because of one, or many, fragment in HomeActivity is slow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*SsF1WPPO1Nd64BQ4HK4HAw.png" /></figure><p>Fortunately, Fragment is a lifecycle component. We will introduce how to use FrameMetricsAggregator to collect metrics in Fragments properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DnEq6SILNYrlo4MG3ZTKYA.png" /><figcaption>Accumulated data for each Fragment</figcaption></figure><h4>So the plan is :</h4><ol><li>Create a BaseFragment, extended by interested Fragments</li><li>Create a Tracer in BaseFragment</li><li>Start and Stop the Tracer at proper timing.</li></ol><ul><li>You can get the project from here : GitHub/<a href="https://github.com/Wesley-Ong/AndroidFramerateSample">AndroidFramerateSample</a></li></ul><h4><strong>Dependency required</strong></h4><pre>// this project requires :<br>implementation &#39;org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2&#39;<br>implementation &#39;androidx.lifecycle:lifecycle-extensions:2.2.0&#39;<br>implementation &#39;androidx.lifecycle:lifecycle-runtime-ktx:2.2.0&#39;</pre><h4>1. Create a BaseFragment</h4><p>Beware that the data-collecting window is not from onCreate() to onDestroy() . It starts when Fragment is VISIBLE and terminated when Fragment is INVISIBLE. So we design an interface for tracer to know when it should Start/Stop collecting the data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/577b419c54075c992e737ca581770e51/href">https://medium.com/media/577b419c54075c992e737ca581770e51/href</a></iframe><h4>2. Create a TracerScope</h4><p>And here is the base of FragmentFramerateTracer scope.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb62af2a5447bb71a8570cd4d9b2b323/href">https://medium.com/media/eb62af2a5447bb71a8570cd4d9b2b323/href</a></iframe><p>Inside the scope, we should provide start() and stop() to collect the data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/47220a66f7022376922d65d61baf2b20/href">https://medium.com/media/47220a66f7022376922d65d61baf2b20/href</a></iframe><p>The start() is nothing but adding our activity aggregator , for details of FrameMetricsAggregator, please see <a href="https://developer.android.com/reference/androidx/core/app/FrameMetricsAggregator">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e2602f2bd45b9386d4d867b0ab7269a/href">https://medium.com/media/4e2602f2bd45b9386d4d867b0ab7269a/href</a></iframe><p>In the stop() , we call data = aggregator.stop() to get the data contains distribution.</p><p>distribution = data[FrameMetricsAggregator.<em>TOTAL_INDEX</em>] is a sparse array.<br>For example, if distribution[42] = 5 means there are 5 frames took exactly 42 ms to render. So we go through all durations from 0 to the end, and accumulate the numbers to corresponding variables. Then put it to a simple data class:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f11768be683e6f61a48fde5f7726657d/href">https://medium.com/media/f11768be683e6f61a48fde5f7726657d/href</a></iframe><h4>3. Start and Stop the Tracer</h4><p>The tracer is served, it’s time to register the tracer to BaseFragment.</p><p>Create a extension for MyBaseFragment like</p><pre>fun MyBaseFragment.registerTracer() {<br>    val tag = &quot;Tracer${this::class.<em>java</em>.<em>simpleName</em>}&quot;<br>    var tracer: FragmentFramerateTracer? = null<br>    ...<br>}</pre><p>Remember we need to :</p><ol><li>tracer.start() when Fragment is Created or no longer hiding.</li><li>tracer.stop() when Fragment is Destroyed or been hidden.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/721f7184234c43036fdd48c3aef1c248/href">https://medium.com/media/721f7184234c43036fdd48c3aef1c248/href</a></iframe><p>So we can create a onHiddenChangedListener like the piece above. And in corresponding Lifecycle stage, we not only calls tracer.start() &amp; tracer.stop , but also add/remove the onHiddenChangedListener</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5cd9599a551ef417f3bb581de7e38c04/href">https://medium.com/media/5cd9599a551ef417f3bb581de7e38c04/href</a></iframe><p>That’s it, the full extension looks like &lt;<a href="https://gist.github.com/Wesley-Ong/9c7feeca3466877b223ee9b570fa9598">THIS</a>&gt;</p><p>And now we can registerTracer() in onCreate() of MyBaseFragment</p><pre>override fun onCreate(savedInstanceState: Bundle?) {<br>    super.onCreate(savedInstanceState)<br>    <em>registerTracer</em>() // Like this<br>}</pre><h4>Everything is settled,</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/beecb84e941c3be7044b9d8bf3f035b4/href">https://medium.com/media/beecb84e941c3be7044b9d8bf3f035b4/href</a></iframe><p>Just run and see the Metrics in Logcat, here’s a sample log with some comments, hope it helps.</p><p>GitHub Project : <a href="https://github.com/Wesley-Ong/AndroidFramerateSample">https://github.com/Wesley-Ong/AndroidFramerateSample</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d311dbe909c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/grindr-engineering/android-metrics-framerate-for-each-fragments-d311dbe909c1">Android Metrics : FrameRate for Each Fragments</a> was originally published in <a href="https://medium.com/grindr-engineering">Grindr Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[台灣 Senior Android Engineer 面試心得]]></title>
            <link>https://medium.com/@WeselyOng/%E5%8F%B0%E7%81%A3-senior-android-engineer-%E9%9D%A2%E8%A9%A6%E5%BF%83%E5%BE%97-88b707369b46?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/88b707369b46</guid>
            <category><![CDATA[台灣]]></category>
            <category><![CDATA[面試]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[工程師]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 08:19:31 GMT</pubDate>
            <atom:updated>2019-08-04T06:30:56.181Z</atom:updated>
            <content:encoded><![CDATA[<h3>台灣 Android Engineer 面試心得</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*X0FytVaH2rJsH_Mh-550dg.png" /></figure><p>一直在網路上看其他人的心得，決定也來分享一下自己面試過的幾間公司。</p><p>這些心得從我還很菜到現在比較進階一路都有，但目標都是Senior。有些年份比較久了，大家做個參考就好。</p><h3>TomTom</h3><p>從LinkedIn被他們的recruiter聯繫上，是外國人需要用英文交談。HR這關需具備能正常溝通的英文能力，電話聯絡完後收到Codility線上測驗的連結，三個題目2小時的樣子，難度大概是Meduim吧。每個題目送出後有幾個測資不會直接一個Fail就判零分，合格分數是70/100。</p><p>現場面試：詳細地問了Java的基礎，比方說如何GC、一些資料結構背後的實作然後才會慢慢問進階，只懂Android不懂Java是不行的。Android也是很紮實地問了比方說何謂Handler/Looper，AIDL之類的。是好好準備都會見過的考題。</p><p>工程口試結束後換人資面試，感覺也是懂程式的。問到關於Unit Test之類的，給我感覺真的是很認真跑敏捷開發的公司，這次的面試在這兩關我都覺得獲益良多。</p><h3><strong>街口</strong></h3><p>台灣街口建制的初期，當時聽說台灣辦公室還沒有手機工程師甚至也還沒幾個工程師。</p><p>所以面試就是它們的HR從網路上找來一份大廠的筆試考題，難度不低的5選1複選題，內容從邏輯、數學運算、統計、快取、資料庫、網路架構等等的都有。感覺像是大學的期中期末考大雜燴20幾題吧，雖然答對了70-80%以上的選項。可是只要錯一個就全錯了，所以好像只有30–40分，忘記及格是幾分 直接Fail請我回家。HR問我說有沒有什麼問題想問？我當下也直接反映說我覺得拿這個來考滿沒用的。</p><p>通常，面試Fail會知道是因為自己能力不足，但是這次是只覺得莫名其妙的那種XD。這些拿來考應屆畢業生倒是比較有參考價值吧。後來聽說這份考題變成「參考用」的了，相當幽默。</p><h3><strong>PicCollage</strong></h3><p>那個時候我非常菜哈哈，雖然Android SDK熟但是演算法底子不好。</p><p>電話面試，會有HR跟Engineer搭配，線上解演算法基本題目，在很基礎的地方Fail了自己都覺得很慚愧XD</p><h3>Grindr</h3><p>初試是視訊面試實作資料結構，過關後是Pair-Programming解演算法題、系統設計跟實際操作AndroidStudio的安卓題，三個小時的內容相當紮實。</p><p>有針對我的履歷指出一些可以寫得更好的地方，不會像是有些公司的人感覺連履歷都沒仔細看，覺得相當感謝。</p><h3>Nogle</h3><p>冷氣很涼的公司，面試是演算法Easy-Medium四題選三。二面是人資部門主管詢問一些比較人格性質的問題，偏向聊聊天的感覺。</p><h3>Skyline</h3><p>辦公室在101的博弈公司，會先寫針對Android設計的筆試題（大多是問答）可能因為是中資公司，內部也有許多中國同事，去網路看Android校招題目滿有用的。</p><p>寫完題目一位面試官開始看我剛剛筆試的問答題，另一位就問了些白板演算法題，用白板筆寫一些pseudo code，中間會穿插問剛剛筆試問答題裡面的答題動機。當時是Kotlin剛出來的年代，我的程度大概到可以把Java完全翻譯成Kotlin但是還沒掌握到Kotlin的精髓。面試的人有針對這些精髓去問，我回來Google之後覺得功力增加了，相當感謝</p><h3>Facebook</h3><p>突然有一天收到信，是臉書的Recruiter問面試意願（真的是突然）根本就沒準備啊哈哈可是還是答應了＝＿＝。立刻就約隔天打電話來，問了幾題是非題，乍聽會感覺相當簡單但其實是陷阱題的。這是新加坡打來的越洋電話，全英文溝通但是越洋的微妙延遲、失真跟新加坡口音都會導致連題目都聽不清，希望以後遇到越洋的電話面試可以用網路通話。</p><p>後來解釋說面試如果上了之後，可以去美國或是英國工作。應該說是必需啦。可是我不方便出國……於是就沒有繼續了。</p><h3>Google for Pixel</h3><p>也是有一天突然收到信是Google小姐打來的，來自上海的總部。解釋說這個工作是要聘用工程師來寫Google Pixel的應用程式。絕對是卓粉的夢幻工作啊。</p><p>第一關跟臉書一樣是人資電話問答，就是一些是非題選擇題這種HR也能判斷的題目，包含資料結構、演算法best/worst case order、心算。</p><p>第二關視訊面試，可惜能力不足，演算法的時候腦筋打結就Fail了。中間有發生面試官覺得我有寫錯但其實沒有的趣事，不過說來話長，是個相當有趣的經驗。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88b707369b46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Nasty WebView Error Comes Along with sendUserActionEvent() Error]]></title>
            <link>https://medium.com/@WeselyOng/a-nasty-webview-error-comes-along-with-senduseractionevent-error-82887cdb1627?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/82887cdb1627</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Fri, 03 May 2019 08:20:32 GMT</pubDate>
            <atom:updated>2019-05-03T08:22:59.274Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EihjULCAGKID3SFA" /><figcaption>Photo by <a href="https://unsplash.com/@dlanor_s?utm_source=medium&amp;utm_medium=referral">Dlanor S</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>This seems to be a very minor and hard to triggered bug on some Samsung devices with WebView. I’ve searched for the result many hours and this is my solution.</blockquote><blockquote>E/ViewRootImpl: sendUserActionEvent() returned.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*A21F0OW1DowKtYL50vTM_w.png" /></figure><h4>Background</h4><p>Let me describe some details for someone easier to found this post.</p><ol><li>I have a WebViewActivity, containing a WebView.</li><li>I start WebViewActivity from MainActivity</li><li>The WebView been created TWICE, it just terminated itself in the first time an re-create one. This will produce the <strong>sendUserActionEven</strong> terror</li><li>After WebViewActivity finished, the MainActivity are bringing to the front. AND also terminated itself and re-create one.</li><li>Goto WebViewActivity again, everything is fine. After its finish() is still also fine.</li></ol><h4>Solution</h4><p>These are the most important right? I’ll discuss about the reason later.</p><ol><li>Create a WebView in the SplashScreenActivity (The First Activity) and set it’s <strong>visibility</strong> to <strong>View.GONE</strong></li><li>Load and init it like this. And things got back on track.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2a249491426f1f65562c6d2433497c8/href">https://medium.com/media/f2a249491426f1f65562c6d2433497c8/href</a></iframe><p><strong>Reason</strong></p><p>After I compare my logs, I found that when WebView been used first time, the <strong>WebViewFactory</strong> will be called (along with many accessibility checks such like Bluetooth, Internet, MediaPlayer,. etc)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/746950e2ea92971f509fb857e76c24b4/href">https://medium.com/media/746950e2ea92971f509fb857e76c24b4/href</a></iframe><p>When all of that happens together with maybe some FirebaseAnalytics script, they might cause some memory overflow or something. So the Activity went down suddenly?</p><p>So I came up with the idea to init the WebView when app started.</p><p>I don’t know the real reason still, it just works like a charm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82887cdb1627" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[透過VPN使用超高音質音樂Mora-簡單五步驟]]></title>
            <link>https://medium.com/@WeselyOng/%E9%80%8F%E9%81%8Evpn%E4%BD%BF%E7%94%A8%E8%B6%85%E9%AB%98%E9%9F%B3%E8%B3%AA%E9%9F%B3%E6%A8%82mora-%E7%B0%A1%E5%96%AE%E4%BA%94%E6%AD%A5%E9%A9%9F-5b7300643f8b?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b7300643f8b</guid>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Tue, 08 Jan 2019 13:17:27 GMT</pubDate>
            <atom:updated>2019-06-17T13:51:27.423Z</atom:updated>
            <content:encoded><![CDATA[<h3>在台灣透過VPN使用Mora購買正版超高音質音樂</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*Fby8WvF0S9iTnwSpP7TAww.png" /><figcaption>超高音質網站Mora</figcaption></figure><p>正版授權超高質音樂網站 <a href="https://mora.jp/">Mora.jp</a> 提供許多流行歌曲、JPOP、Anime動畫歌曲的無損flac購買，從音質已經算不錯的320kpbs到4616kpb (取樣頻率96kHz 24bit)都有。</p><p>Mora短暫出現過台版的服務，可惜不久即下架。不久後連日本官網也在2017年停止支援海外信用卡，讓許多喜歡日本音樂、動漫音樂的發燒友覺得相當可惜，也看到許多人在問是否無法再買Mora。</p><h3>可以!</h3><p>在台灣還是可以使用台灣信用卡購買的，我透過這幾個工具在2018、2019都還能購買Mora音樂，本篇就來跟大家分享我剛才(對，就是剛才)透過VPN以及Amazon Pay來購買Mora的方式。</p><h3>會用到的帳號</h3><ol><li>VPN — 我使用Tunnel Bear</li><li>Amazon.jp 帳號－請先登記一兩張可以海外消費的信用卡</li><li>Mora.jp 帳號，如果你還沒有，最好先開VPN再註冊!!</li></ol><h3>準備</h3><p><strong>購物車<br></strong>先到Mora把有興趣的音樂加入購物車，因為如果在VPN開啟後才加的話會消耗更多VPN的使用量</p><p><strong>VPN<br></strong>打開VPN連線到日本，推薦使用Tunnel Bear，他光是Chrome套件的下載人次就已超過70萬，非常受歡迎而且方便。可選擇使用<a href="https://chrome.google.com/webstore/detail/tunnelbear-vpn/omdakjcmkglenbhjadbccaookpfjihpa?utm_source=chrome-ntp-icon">Chrome擴充套件</a>或者<a href="https://www.tunnelbear.com/download">PC版</a>。只要選擇日本、按下ON就可以了。</p><p>須注意每個月有500MB的用量，每個月分享到推特再得到額外1GB。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*qfH_i5RpXxOCnob-r5gLwQ.png" /><figcaption>使用Tunnel Bear VPN 連線到日本區</figcaption></figure><h3>開始Mora結帳</h3><p>希望你在打開VPN之前已經把東西加入購物車了</p><p>1. 點進購物車<br>按 【<em>ご購入手続きへ進む</em> 】開始結帳</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*KRIwWbtFKACKAzsngb5Z0w.png" /><figcaption>點選橘色的”ご購入手続きへ進む”</figcaption></figure><p>2. 往下找到【お支払い方法の変更】<br>選擇 Amazon Pay</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*xvtzDkAMKzl4yyb0dN5BBw.png" /><figcaption>點選 Amazon Pay</figcaption></figure><p>3. 畫面會移動到上方，付費方式變成Amazon Pay<br>點下去以繼續結帳手續</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*Gg_vltIBPzk_EpTXFKOsFQ.png" /><figcaption>點選右方黃色Amazon Pay</figcaption></figure><p>4. 會跳出Amazon.jp的網址，請輸入你的帳號密碼，由於有VPN可能要等比較久，完成後會回到 Mora</p><p>5.終於來了，透過Amazon我們終於繞過了檢查信用卡的步驟<br>Mora會請你選擇你要使用的信用卡，我這兩張都是台灣的信用卡確定可以照常結帳</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*jIo4pPVlstA4N2W2oRSp3A.png" /></figure><p>再點購入確定就可以開始下載了</p><blockquote>記得一定要把VPN關掉</blockquote><p>如果沒關就開始下載，你的額度瞬間就用完了XD 超高音質的一首100MB可不是開玩笑的。</p><p>以上方法我剛剛購買還有成功(2019–06–17)<br>給喜歡日本歌曲音樂的朋友參考</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b7300643f8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Static/Non-Static fun in Kotlin class]]></title>
            <link>https://medium.com/@WeselyOng/static-non-static-fun-in-kotlin-class-777a2b3f527?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/777a2b3f527</guid>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Thu, 31 May 2018 07:47:06 GMT</pubDate>
            <atom:updated>2018-05-31T07:47:06.071Z</atom:updated>
            <content:encoded><![CDATA[<p>Since there’s no static annotation in Kotlin, we should put the function that we want to make it work as static in companion object{} :</p><pre>open class ParentClass{<br>    companion object {<br>        fun getInt(number:Int):Int{<br>            return int<br>        }<br>    }<br>}</pre><p>And call it like this</p><p>Kotlin : ParentClass.getBoolean(0)</p><p>Java : ParentClass.Companion.getBoolean(0)</p><p>If it’s a non-static function :</p><pre>open class ParentClass{<br>        fun getInt(number:Int):Int{<br>            return int<br>        }<br>}</pre><p>Calling :</p><p>Kotlin : ParentClass().getInt(0)</p><p>Java : new ParententClass().getInt(0)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=777a2b3f527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shared Element of Fragment Transition on Android/Kotlin]]></title>
            <link>https://medium.com/@WeselyOng/shared-element-of-fragment-transition-on-android-kotlin-bec0ff46232?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/bec0ff46232</guid>
            <category><![CDATA[kotlin-beginners]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Tue, 22 May 2018 09:00:33 GMT</pubDate>
            <atom:updated>2018-05-22T09:04:02.230Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BlwEZAPBiRY78w07raCoOg.png" /></figure><p>If you want to make a transition between from <strong>FragmentA</strong> to <strong>B, </strong>here are the only three steps to do:</p><ul><li>Use the same transitionName in the view pairs you want to share.</li></ul><pre>// for example <br>&lt;ImageView <br>    ...<br>    android:transitionName=&quot;@string/shared_char_mainpage&quot;<br>    tools:targetApi=&quot;lollipop&quot; /&gt;</pre><ul><li>In <strong>FragmentA,</strong> call this to invoke the transition :</li></ul><pre><em>activity</em>!!.<em>supportFragmentManager</em>.beginTransaction()<br>        .replace(R.id.<em>containerMainPage</em>, frag)<br>        .<strong>addSharedElement</strong>(ivChar, ivChar.<em>transitionName</em>)<br>        .commitAllowingStateLoss() // or commit()</pre><ul><li>Override the <strong>onCreate</strong>() of <strong>FragmentB</strong>.</li></ul><pre>override fun <strong>onCreate</strong>(savedInstanceState: Bundle?) {<br>    if (Build.VERSION.<em>SDK_INT </em>&gt;= Build.VERSION_CODES.<em>LOLLIPOP</em>) {<br>        <em>sharedElementEnterTransition </em>= TransitionInflater<br>            .from(context).inflateTransition(<br>                android.R.transition.<em>move // you can change this<br>            </em>)<br>    }<br>    super.onCreate(savedInstanceState)<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bec0ff46232" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Snowflake Effect on Android using Kotlin]]></title>
            <link>https://medium.com/@WeselyOng/a-snowflake-effect-on-android-using-kotlin-a0298c6b858a?source=rss-2642b8e7f992------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0298c6b858a</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-animations]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[snow]]></category>
            <dc:creator><![CDATA[WesleyOng]]></dc:creator>
            <pubDate>Fri, 18 May 2018 13:29:00 GMT</pubDate>
            <atom:updated>2018-05-18T14:36:22.811Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve just made an snowing effect on Android with random <strong>position</strong>, calculated <strong>speeds and size </strong>from random ‘<em>distance</em>’ values, and different <strong>rotating speed.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9bYqvhDW2II%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9bYqvhDW2II&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9bYqvhDW2II%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/ce0f1bbb070eb0fb625eeabd6972091f/href">https://medium.com/media/ce0f1bbb070eb0fb625eeabd6972091f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdBx4_j390OE&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FdBx4_j390OE&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2aa5d6cbc1b81b7435053a062679f4d/href">https://medium.com/media/e2aa5d6cbc1b81b7435053a062679f4d/href</a></iframe><p>Preview : <a href="https://i.imgur.com/e5lI3ir.mp4">https://i.imgur.com/e5lI3ir.mp4</a></p><h4>Get Screen size</h4><p>Screen size in necessary, use this <strong>after</strong> setContentView()</p><pre>windowManager.defaultDisplay.getRealSize(point)        <br>screenW = point.x        <br>screenH = point.y</pre><h4>Define “<strong>Snow”</strong> Class</h4><p>Interesting part is here, define different value for different effects. When init {}the valuedistance simulated the different falling speed:</p><blockquote>Close : Snowflake looks clear and big, falling fast.<br>Far : Snowflake looks small and not so clear , falling slow.</blockquote><p>This is my base concept during the setup. And to avoid <strong>synchronized </strong>snowflake, I add a randomParam to make them different from other. You can see how these params make different in update() .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d50447d78dce072ddde5914c9a819088/href">https://medium.com/media/d50447d78dce072ddde5914c9a819088/href</a></iframe><h4>Animate Up !!</h4><p>After Snow is set, I creat a Listcontains 200 Snowflake and use a handler to update the position every 20 ms.</p><pre>// setup runnable and postDelay<br>        r = Runnable {<br>            for (snow: Snow in snowList)<br>                snow.update()<br>            bgHandler.postDelayed(r, 10)<br>        }<br>        bgHandler.post(r)</pre><h3><strong>Full Sample Code</strong></h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70b242cb9b6b947d3038943ca8799b41/href">https://medium.com/media/70b242cb9b6b947d3038943ca8799b41/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0298c6b858a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>