Skip to content

Commit

Permalink
update note
Browse files Browse the repository at this point in the history
  • Loading branch information
nicehorse06 authored Jul 10, 2024
1 parent 71ea0e3 commit c70bd63
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 76 deletions.
77 changes: 1 addition & 76 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,82 +78,7 @@
## Distributed Systems
* Designing Data-Intensive Application
* [DDIA中文翻译](https://github.com/Vonng/ddia)

## API Design
* [API Design design](https://roadmap.sh/api-design)

## OS
* deadlock
* process thread

## Networking
* OSI的7層架構
* HTTPS
* HTTP code
* session cookie
* TCP/UDP

## Python
### 面試常見問題
1. **dict 安全取值**
- 使用 `get()` 方法,可以在鍵不存在時返回一個預設值,避免 `KeyError`

2. **裝飾器 (Decorator)**
- 函數或類別,用於在不修改原始函數代碼的情況下,添加新的功能。

3. **Context Manager (`with` 語句)**
- 用於管理資源,例如檔案操作,確保資源被正確處理(如自動關閉)。

4. **Generator**
- 使用 `yield` 產生一系列的值,可以逐一產生值而不需要一次性將所有值載入內存。

5. **GIL鎖 (Global Interpreter Lock)**
- Python 中的機制,用於限制一個 Python 解釋器在多執行緒環境中同時執行多個原生執行緒。

6. **Multi-process/thread/task 的模組**
-`multiprocessing`, `threading`, `asyncio`
- **非同步與同步的區別**:非同步操作允許程式在等待外部事件(如 I/O)完成時繼續執行,同步操作則需等待操作完成。

7. **單元測試/功能測試**
- 使用 `unittest``pytest` 模組來進行測試確保程式碼的可靠性。

8. **Python Debugger**
-`pdb`,用於逐步執行代碼以找出錯誤和問題。

9. **異常處理**
- `try`, `except`, `finally`, `raise` 用於處理和拋出異常。

10. **import 原理**
- Python 加載和初始化模組的過程,包括尋找模組路徑、編譯成位元組碼、執行模組代碼。

11. **List Comprehension**
- 簡潔的語法結構,用於從其他列表創建列表,表達式既直觀又高效。

12. **變數的「引用」與「複製」**
- 包括對變數的直接賦值(引用)和通過淺複製或深複製創建獨立副本的概念。

13. **標準庫模組(collections, itertools, functools)**
- `collections` 提供多種資料結構,`itertools` 用於創建有效的迭代器,`functools` 提供函數式編程支持。

14. WSGI (Web Server Gateway Interface) 和 ASGI (Asynchronous Server Gateway Interface)

## Linux

## DevOps

## Cloud
* AWS

## SRE

## Kubernetes

## DB
* 各種index
* SQL
* RDBMS vs noSQL
* PostgrSQL/MySQL的特性
* Redis/MongoDB 應用場景
* ACID
* CAP
* B-Tree
## Kubernetes
10 changes: 10 additions & 0 deletions backend/db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## todo
* 各種key
* SQL
* RDBMS vs noSQL
* PostgrSQL/MySQL的特性
* Redis/MongoDB 應用場景
* 正規化
* 什麼是 Transaction
* N + 1 Problem
* db Sharding ?
4 changes: 4 additions & 0 deletions backend/distributed_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
- **建議**:配置IAM來控制訪問權限,使用VPC隔離網絡環境,並部署WAF保護應用程序免受網絡攻擊。

這樣的架構可以確保你的高流量分散式系統在AWS上運行得更加高效、可靠和安全。根據具體需求,還可以使用其他AWS服務進一步優化系統,例如Elasticache進行分佈式緩存,或使用Lambda實現無服務器計算。


## ref
* [AWS 分散式雲端:全方位入門教程 | 架構、程式、應用](https://www.youtube.com/watch?v=_WCjqokBGbg)
10 changes: 10 additions & 0 deletions backend/network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Networking


## todo
* OSI的7層架構
* HTTPS
* HTTP code
* TCP/UDP
* DNS 機制
* TCP/IP 四層模型
7 changes: 7 additions & 0 deletions backend/os.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OS
## todo

* deadlock
* process thread
* race condition
* Concurrency 和 Parallel
46 changes: 46 additions & 0 deletions backend/python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Python
## 面試常見問題
1. **dict 安全取值**
- 使用 `get()` 方法,可以在鍵不存在時返回一個預設值,避免 `KeyError`

2. **裝飾器 (Decorator)**
- 函數或類別,用於在不修改原始函數代碼的情況下,添加新的功能。

3. **Context Manager (`with` 語句)**
- 用於管理資源,例如檔案操作,確保資源被正確處理(如自動關閉)。

4. **Generator**
- 使用 `yield` 產生一系列的值,可以逐一產生值而不需要一次性將所有值載入內存。

5. **GIL鎖 (Global Interpreter Lock)**
- Python 中的機制,用於限制一個 Python 解釋器在多執行緒環境中同時執行多個原生執行緒。

6. **Multi-process/thread/task 的模組**
-`multiprocessing`, `threading`, `asyncio`
- **非同步與同步的區別**:非同步操作允許程式在等待外部事件(如 I/O)完成時繼續執行,同步操作則需等待操作完成。

7. **單元測試/功能測試**
- 使用 `unittest``pytest` 模組來進行測試確保程式碼的可靠性。

8. **Python Debugger**
-`pdb`,用於逐步執行代碼以找出錯誤和問題。

9. **異常處理**
- `try`, `except`, `finally`, `raise` 用於處理和拋出異常。

10. **import 原理**
- Python 加載和初始化模組的過程,包括尋找模組路徑、編譯成位元組碼、執行模組代碼。

11. **List Comprehension**
- 簡潔的語法結構,用於從其他列表創建列表,表達式既直觀又高效。

12. **變數的「引用」與「複製」**
- 包括對變數的直接賦值(引用)和通過淺複製或深複製創建獨立副本的概念。

13. **標準庫模組(collections, itertools, functools)**
- `collections` 提供多種資料結構,`itertools` 用於創建有效的迭代器,`functools` 提供函數式編程支持。

14. WSGI (Web Server Gateway Interface) 和 ASGI (Asynchronous Server Gateway Interface)

15. *args 與 **kwargs

0 comments on commit c70bd63

Please sign in to comment.