# Resume
## Performance tuning
### SMS logs page
### Regular expression
### JSON parser
# Android
## Architecture
[Guide to app architecture](https://developer.android.com/topic/architecture)
### UI(View)

- [Official guide](https://developer.android.com/topic/architecture/ui-layer)
- 重點
- Responsible to draw UI according to current state
- Activity/Fragment & ViewModel(state holder)
- e.g., NewsUiState & NewsItemUiState
- Activity/Fragment notify ViewModel event
- ViewModel expose UI state with observable data
- UI element + UI state => UI
- UI state should be immutable
- The pattern where the **state flows down** and the **events flow up** is called a unidirectional data flow (UDF).
- A simple way to represent loading states in a UiState class is with a boolean field
- Any work performed in a ViewModel **should be main-safe**, safe to call from the main thread. This is because the data and domain layers are responsible for moving work to a different thread.
- [Paging](https://developer.android.com/topic/libraries/architecture/paging/v3-overview)
- UI event decision tree

### Domain

- [Official guide](https://developer.android.com/topic/architecture/domain-layer)
- Is an optional layer that sits between the UI layer and the data layer
- 重點
- Benefits
- Testability
- Split responsibilities
- Avoids code duplication(reuse)
- Usecases
- e.g., FormatDateUseCase, LogOutUserUseCase, GetLatestNewsWithAuthorsUseCase, or MakeLoginRequestUseCase
- Use cases don't have their own lifecycle
- Because use cases shouldn't contain mutable data, you should create a new instance of a use case class every time you pass it as a dependency.
- Use cases from the domain layer must be main-safe
- Responsible for moving that logic to the appropriate thread
- Common tasks
- Reusable simple business logic
- Combine repositories
### Data

- [Official guide](https://developer.android.com/topic/architecture/data-layer)
- 重點
- Repository & DataSource
- NewsRepository, MoviesRepository, or PaymentsRepository
- NewsRemoteDataSource or NewsLocalDataSource
- Repositories combine different data sources and solve any potential conflicts between the data sources to update the single source of truth regularly or due to a user input event
- **(Threading)** Data sources and repositories should be main-safe, safe to call from the main thread.
- **(Lifecycle)** Instances of classes in the data layer remain in memory as long as they are reachable from a garbage collection root—usually by being referenced from other objects in your app.
- **OFFLINE FIRST**
- **(Error)** Interactions with repositories and sources of data can either succeed or throw an exception when a failure occurs.
### Recommendations
[Official recommendations](https://developer.android.com/topic/architecture/recommendations)
## Coroutine
SupervisorJob lets the coroutine handle the exception; as opposed to Job that will automatically propagate it up in the hierarchy
## Flow
### LiveData vs. StateFlow vs. SharedFlow
## Kotlin
### Sealed class
## Background work
[Official background work overview](https://developer.android.com/guide/background#long-solution)
## Bluetooth (DriveMode)
# Leetcode
[图灵星球Turing Planet](https://www.youtube.com/@turingplanet4052)
## Two Pointers
- [Youtube](https://www.youtube.com/watch?v=86GHTcY0K4I&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 同向 & 反向
- Problems
- [344. reverse string](https://leetcode.com/problems/reverse-string/)
- [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)
- [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
- [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/)
- [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/)
- [80. Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/)
- [1047. Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/)
## Binary Search
- [Youtube](https://www.youtube.com/watch?v=j2_JW3In9PE&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- For sorted array
- 每次都要縮小範圍
- 可能的答案要保留
- Problems
- {P} [1062. longest repeating substring](https://leetcode.com/problems/longest-repeating-substring/)
- [410. Split Array Largest Sum
](https://leetcode.com/problems/split-array-largest-sum/)
- {P} [1231. divide chocolate](https://leetcode.com/problems/divide-chocolate/)
- [852. Peak Index in a Mountain Array
](https://leetcode.com/problems/peak-index-in-a-mountain-array/)
- [1011. Capacity To Ship Packages Within D Days
](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/)
- [1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold](https://leetcode.com/problems/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold/)
## Linked List
- [Youtube](https://www.youtube.com/watch?v=0czlvlqg5xw&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- 2 pointers -> 不同速度 or 不同起始位置
- recursive
1. 從 sub-problem 取回結果
2. 邏輯內容
3. 回傳結果
- Problems
- [206. Reverse Linked List
](https://leetcode.com/problems/reverse-linked-list/description/)
- [237. Delete Node in a Linked List
](https://leetcode.com/problems/delete-node-in-a-linked-list/)
- [141. Linked List Cycle
](https://leetcode.com/problems/linked-list-cycle/)
- [92. Reverse Linked List II
](https://leetcode.com/problems/reverse-linked-list-ii/)
- [25. Reverse Nodes in k-Group
](https://leetcode.com/problems/reverse-nodes-in-k-group/)
- [237. Delete Node in a Linked List
](https://leetcode.com/problems/delete-node-in-a-linked-list/)
- [203. Remove Linked List Elements
](https://leetcode.com/problems/remove-linked-list-elements/description/)
## Stack
- [Youtube](https://www.youtube.com/watch?v=D_MHAZGtByY&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- stack 含義
- 所有比 x 大的數字
- 遞迴之前的狀態(call stack)
- Problems
- [739. Daily Temperatures
](https://leetcode.com/problems/daily-temperatures/)
- [735. Asteroid Collision
](https://leetcode.com/problems/asteroid-collision/)
- [20. Valid Parentheses
](https://leetcode.com/problems/valid-parentheses/)
- [496. Next Greater Element I
](https://leetcode.com/problems/next-greater-element-i/)
- [503. Next Greater Element II
](https://leetcode.com/problems/next-greater-element-ii/)
- [394. Decode String
](https://leetcode.com/problems/decode-string/)
- [636. Exclusive Time of Functions
](https://leetcode.com/problems/exclusive-time-of-functions/)
- [84. Largest Rectangle in Histogram
](https://leetcode.com/problems/largest-rectangle-in-histogram/)
## Heap
- [Youtube](https://www.youtube.com/watch?v=vIXf2M37e0k&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- max heap vs. min heap
- Kth 大/小的值 -> 87% 用 heap 解
- Problems
- [215. Kth Largest Element in an Array
](https://leetcode.com/problems/kth-largest-element-in-an-array/)
- [23. Merge k Sorted Lists
](https://leetcode.com/problems/merge-k-sorted-lists/)
- [347. Top K Frequent Elements
](https://leetcode.com/problems/top-k-frequent-elements/)
- [295. Find Median from Data Stream
](https://leetcode.com/problems/find-median-from-data-stream/)
- [767. Reorganize String
](https://leetcode.com/problems/reorganize-string/)
- [703. Kth Largest Element in a Stream
](https://leetcode.com/problems/kth-largest-element-in-a-stream/)
## HashMap
- [Youtube](https://www.youtube.com/watch?v=UtX1BPPjojc&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- 沒有順序(要順序可使用 LinkedHashMap)
- 快速查找(access by key)
- Problemes
- [1. Two Sum
](https://leetcode.com/problems/two-sum/)
- [560. Subarray Sum Equals K
](https://leetcode.com/problems/subarray-sum-equals-k/)
- [3. Longest Substring Without Repeating Characters
](https://leetcode.com/problems/longest-substring-without-repeating-characters/)
- [49. Group Anagrams
](https://leetcode.com/problems/group-anagrams/)
- [138. Copy List with Random Pointer
](https://leetcode.com/problems/copy-list-with-random-pointer/)
- [554. Brick Wall
](https://leetcode.com/problems/brick-wall/)
- [535. Encode and Decode TinyURL
](https://leetcode.com/problems/encode-and-decode-tinyurl/)
## Tree - BFS
- [Youtube](https://www.youtube.com/watch?v=jEg9AeN5a2Q&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- 類似 LinkedList
- 只有一個入口
- 分為 parent 和 child
- Problems
- [102. Binary Tree Level Order Traversal
](https://leetcode.com/problems/binary-tree-level-order-traversal/)
- [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
- [199. Binary Tree Right Side View
](https://leetcode.com/problems/binary-tree-right-side-view/)
- [101. Symmetric Tree
](https://leetcode.com/problems/symmetric-tree/)
- [103. Binary Tree Zigzag Level Order Traversal
](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)
- [111. Minimum Depth of Binary Tree
](https://leetcode.com/problems/minimum-depth-of-binary-tree/)
- [515. Find Largest Value in Each Tree Row
](https://leetcode.com/problems/find-largest-value-in-each-tree-row/)
- [429. N-ary Tree Level Order Traversal
](https://leetcode.com/problems/n-ary-tree-level-order-traversal/)
## Tree - DFS
- [Youtube](https://www.youtube.com/watch?v=5jz66VkGMCY&list=PLV5qT67glKSErHD66rKTfqerMYz9OaTOs)
- 重點
- 遞迴
- Traversal 有三種形式
- Preorder(先 print)
- Inorder(往左到底再 print)
- Postorder(往左往右都到底才 print)
- Return 方式
- Top down
- 把值透過參數的方式往下傳
- 沒有返回值
- Bottom up
- 把值從下往上傳
- 將下層回傳的值,經過計算後再往上傳
- 有返回值
- Problems
- [104. Maximum Depth of Binary Tree
](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
- [124. Binary Tree Maximum Path Sum
](https://leetcode.com/problems/binary-tree-maximum-path-sum/)
- [129. Sum Root to Leaf Numbers
](https://leetcode.com/problems/sum-root-to-leaf-numbers/)
- [98. Validate Binary Search Tree
](https://leetcode.com/problems/validate-binary-search-tree/)
- [110. Balanced Binary Tree
](https://leetcode.com/problems/balanced-binary-tree/)
- [113. Path Sum II
](https://leetcode.com/problems/path-sum-ii/)
- [236. Lowest Common Ancestor of a Binary Tree
](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)
- [450. Delete Node in a BST
](https://leetcode.com/problems/delete-node-in-a-bst/)
- [508. Most Frequent Subtree Sum
](https://leetcode.com/problems/most-frequent-subtree-sum/)
# General questions
## Self introduction
I am a 9 years experience Mobile Engineer, I say mobile it's because I also have some experience in writting Flutter(which is a cross platform development kit created by Google).
All my working experience were start-up company, so I am familiar with the pace. My first company has already dissolution, and second company is still struggling finding business model.
And right now, I am working for a company call Gogolook, we are the No. 1 caller identification app provider in Taiwan. And we just IPO in Taiwan last week.
In my current company, I am the owner of SMS feature, this means besides implement the requirement from company, I am also responsible to
- keep feature update-to-date with AOSP
- maintain an engineering backlog
- review other engineer's design and PR which related to SMS feature
I also want to mention my thesis, that I had designed and verified a Vehicle-to-Vehicle communication system built on Android devices. I want to highlight this is because I really interested in join automotive industry since I was a student. And now is the moment that vehicles are transforming to smart vehicles.
So having a opportunity in DriveMode, which was backed by Honda, one of the biggest vehicle manufacture, also one of my favorite brand, it's really a dream job to me. So I really appreciate the opportunity, to talk with you guys.
## What do you know about DriveMode
- Founded around 10 years ago
- English as official language(?)
- 2019 acquired by Honda
- Since CEO Yo Koga were also responsible for digital UX for Honda/Acura EVs worldwide, maybe DriveMode were responsible to develop the UI design by Honda?
## What do you know about this position
Bluetooth APIs and AOSP experience were listed in Nice to Have -> should be hire to customize Android Automotive OS or Google build-in?
## Why DriveMode/Volvo
### Why automotive industry
### Why Volvo
```
- Tell me about yourself
How about give me about 5 to 10 mins then I will
Can I spend about 5 to 10 mins to
go through my whole career and also the reasons of why I leave previous company
10年工作經驗
IoT、健康照護、防詐騙
Android 經驗為主,一點 flutter
I am an Software engineer with about 10 years experience
About 90% of my working experience was in Android Development
And I also have some experience in Flutter, Python, shell script
All my working experience were in Start-up company
My first company was an IoT startup, we build app with our p2p hole punching library for IP camera manufactures,
because thay want to catch up the trend of IoT, so we provide all the software they want.
And because, we're just like an out sourcing company, we don't have PRD or spec, we just build things that listed on contract. Whenever we want to propose a better approach or design(Material) to imporove thier app, PM will say we will do it only when they pay for it.
And I think this pabit/practice is harmful to my career so I decide to join a company that is building/maintaining thier own product, because this kinds of company will do anything they can to improve thier app.
Then I switch to a health care company call Health2Sync which was building an glucose log app to help diabetes control their diet. It's my fist time that I feels that my job can really benefits peoples daily life, it's really a great experience.
But the problem of this company is that the engineer team is too small, and all of us were junior to mid-level developers, and I think if can find a environment that have more senior developers, then I can improve my skills faster, and also learn how to collaborate with others(share technical design, review PR)
So right now, I am working for a company call Gogolook, we're famous for our Caller ID App, we're top 1 caller ID app in Taiwan, Thailand, Brasil and Malaysia.
We have about 10 Android developer in our team and most of us were senior developers.
We have just IPO in Taiwan last month, it's really an honor to witness this milestone as a part of the team.
I am responsible and focus on SMS(text message) and URL scan feature of the caller id app.
I just love cars since I was a child, or I mean vehicles more precisely
I can recognize amost all the brands and models in Taiwan just by looking a picture of a car's front light or rear lamp
And writting a thesis that Designed and verified a Vehicle-to-Vehicle communication system built on Android devices is also a prove that I am really a car lover
Right now, I think car or automotive industry was during a transformation, not only transforming from traditional gasoline vehicles to electric car. And also equipped more software or infotainment system, then I notice this my chance to participate in the transformation, because many brands choose to use Google's Android Automotive OS. So this is the time to join automotive industry.
And Volvo is the first one that partner with Google and use Android Auto OS, I think this really shows the ambition that want's to keeps the leading position in the industry.
And Volvo is famous for their commitment to safety, and as father, I really respect and totally agree this.
Therefore, Volvo is my first choice, so I applied
That's the whole story
- Where do you want to see yourself in next 5 years?
還沒決定IC or manager
提升技術為主
- Have you ever had problems with a colleague and how did you deal with it?
no personal
因為對方沒有遵守公司流程,影響我開發時間。回報主管,並用其他方式驗證自己開發的功能(mock)
- Tell me about a time that you made a mistake, what happened and how did you handle it?
程式有 bug,但因為是在開發時順便做了部分的 refactor 而且沒有事先告知 QA 所以 QA 也沒有測試到,所以修正後馬上發 hotfix
從那次之後,在規劃改動範圍之前也會先和 QA 確認有沒有時間多幫忙測試需求以外的改動,如果可以才會進行 refactor
- Describe a time when you were working on a project, how did you handle it?
- What are your strengths and weaknesses?
任務要有明確的目標,才能 100% 投入工作
I need a clear goal or purpose of the task, then I can 100% commit to the job.
Otherwise, I will can't stop think of e.g., is this really what our user need? can this really benefit our revenue
A clear goal or reason is enough, even though I am not agree with it, I can still do it
because I know I am not the person that responsible for making the decision.
I am
I'll become nervous when some situation happen unexpectedly, or when I need to race against time.
As an engineer, we should keep calm to take the right action for every situation.
- Do you prefer to work independently or as part of a team?
Part of a team,因為越多不同背景的人才能提供越多不同的觀點,把事情考慮得更完整
- Do you understand the importance of deadlines? Have you ever not met a deadline?
並不只會影響自己而是整個公司運作,所以如果有技術上的困難一定要第一時間反應
- What are some new trends that you think will impact the automotive industry?
汽油轉電動
非智慧轉智慧(輔助/自動駕駛)
- How would you balance running multiple projects at once?
因為同時還是只能做一件事,所以會將多個 project 的工作內容 breakdown 成 subtasks,然後和 PM 確認各個 subtask 的優先順序
如果 PM 無法排序,那就依據 project 各自的時辰來決定優先順序
- Give us an example of a time when you took initiative.
URL scan
- Tell me about a time when you solved a complex engineering issue, how did you solve it?
```
### Why DriveMode
## What do you know about Mercari
## Why Mercari
## Package expectation