In this article, I’ve collected some important interview questions for different types of software engineers. Since my expertise is in frontend development, I’ve separated the frontend questions into another article, where I answer each of them.
The best way to use this article is to try answering these questions in English.
為什麼你會決定成為一位軟體工程師?
I think being a software engineer gives me a great sense of accomplishment.
With your skills, you can create many interesting and useful tools that make people’s lives easier. That’s why there are so many open-source projects on GitHub. Many maintainers are willing to contribute to these projects even though they don’t get paid. I guess one of the reasons is that the sense of accomplishment gives them the motivation.
你如何確保程式碼的品質與可維護性?
The first question is: why do we need to ensure code quality and maintainability? I think it’s because we want our colleagues and future maintainers to easily understand our code.
So, first of all, I always follow consistent naming conventions, making sure that variable and function names are easy to understand. I also keep each function focused on doing only one thing.
Second, I participate in code reviews with other engineers to ensure clarity and maintain consistency across the team.
Third, I write documentation and add clear comments when necessary.
Finally, I refactor code when requirements or features change significantly, in order to prevent accumulating too much technical debt.
請說明你所在的團隊的 Gitflow 流程。
We have three core branches: develop, release, and master, and they correspond to three deployment environments: dev, stage, and production.
The dev environment is mainly for software engineers, and it gets updated most frequently. The stage environment is used by QA engineers for testing, and the production environment is for real users.
For each new feature, we create a feature branch from develop. After completing the feature, we submit a merge request and go through a code review with other engineers. Once approved, the feature branch is merged back into develop.
When we are preparing for a new release, we create a release branch from develop and let QA engineers run tests on it. If new bugs are found, we create bugfix branches from develop to fix them. Once all bugs are resolved, we update the latest release branch and let QA engineers test again.
If all tests pass, the release branch is merged into master, making the latest features available to end users.
For urgent production issues, we create hotfix branches directly from master to fix the bugs. After applying the fix, we also merge master back into develop to ensure the bug is resolved in the dev environment as well.
你如何設計一個高併發的系統?
請解釋 REST 與 GraphQL 的差異與使用情境。
請比較 SQL 和 NoSQL 資料庫的優缺點,並說明在什麼情境下會選擇使用 NoSQL 資料庫。
請說明如何設計一個可擴展的系統,並解釋水平擴展(horizontal scaling)和垂直擴展(vertical scaling)的差異。
請說明微服務架構的優點和缺點,並解釋服務間如何溝通(如同步或非同步)。
請說明為什麼資料驗證(data validation)應該同時在前端和後端進行。
請解釋認證(authentication)和授權(authorization)的區別,並說明如何使用 JSON Web Token (JWT) 實現使用者認證。
請說明你會如何為一個新功能撰寫測試計畫,包含測試案例的設計。
當發現一個 bug 時,你的處理流程是什麼?你會如何與開發團隊溝通?
請說明你會如何決定哪些測試案例適合進行自動化,並簡述自動化測試的優點和挑戰。
你如何確保 App 在不同裝置與螢幕大小上都能正常運作?
請列舉幾個在開發行動裝置應用程式時,用來優化電池消耗和記憶體使用的技巧。
請說明如何在行動裝置上處理不同尺寸的螢幕和裝置,以確保一致的 UI/UX。
請解釋 ETL 和 ELT 的區別,並說明它們各自適合在什麼情境下使用。
請說明分散式運算框架(如 Hadoop 或 Spark)是如何處理大數據的,並解釋 MapReduce 的基本概念。
請說明一個健壯的資料管道應該包含哪些組成部分,並討論如何確保資料的品質和一致性。
請舉例說明你處理過的一次安全漏洞。
你如何在 CI/CD pipeline 中導入安全檢查?
請說明如何設計一個安全的認證系統,並討論多重驗證(MFA)的重要性。
請說明一個典型的 CI/CD (持續整合/持續部署) 流程包含哪些階段,並解釋其優點。
請解釋什麼是 IaC,並與手動配置伺服器的方式進行比較,說明 IaC 的優勢。
當系統出現故障時,你會如何進行故障排除與恢復?