Give me an example of a complex problem you solved with a simple solution. What made the problem complex?

類似題目:


When I first join Endpoint (the current company I’m with), I was tasked to improve their Front end E2E test time. The test time was around an hour give it or take, which is really slow. The previous people who built it left the company, and existing team members didn’t understand nor have time to figure it out.

Since I was new, and know nothing about their E2E infrastructure, I break the problems into several pieces. First, I need to understand how it works, so I spent time understanding it, and seeing how the test is structured. After that, I need to find the bottleneck. What made the test time so long. I noticed it had a lot of repetitive setups and teardowns, and they can all be merged into one. After I did that, things looks better. The total test time was now reduced to around 40 minutes, and then I started to look into improvement. The test pipeline only has one node that’s running. We should use a parallel strategy and send test specs to multiple nodes. I looked into our CI tool resource and figured that 6 nodes it’s the best for the current setup. Now we are down to 10 minutes ish, and I realized that the test pipeline does not use a cache. So each node needs to install the package dependencies. It should only be doing this one time, and then the rest of the node can get it from the cache. I looked into how our CI tool and Cypress cache the data, and applied it.

Now we have front-end e2e running for about 7 minutes give or take. This is huge compared to an hour. We are now able to get faster test results, get bug fixes faster and develop new features faster compared to before.


這個問題通常是會出現在技術面試裡面其中一個行為面試的小環節 如果單單看問題的話 可能會不太容易去回答 題目需要我舉出一個用簡單的方法去解決一個很復雜的問題 又加問是什麼讓這個問題變的復雜? 其實主要問的就是如何「化繁為簡 」考驗我們在碰到比較大的問題的時後 有沒有把能力把問題分成好幾個小問題 然後一一去擊破

套用:如果有前端測試方面的設計執行與經驗 可以直接套用上去 如果沒有 思路方面可以想一下自己在工作上有沒有化繁為簡的時後 大方向的去解釋每一步與最後的回報

ST: 公司產品前端測試需要花超過一個小時 之前的主要人員離職了 然後目前的團隊沒有時間去了解與優化

A: 大方面的解釋我如何把一個大問題分成很多小問題 然後一個一個去解決與優化

R: CI測試時間從一個小時縮小到7分鐘 讓軟體開發流程進度變快