因為幫 Python 基礎學習的朋友,向 Fred 老師索取 Python 3 Fundamentals 的優惠碼,順便和他說明我們的情形:上完 Python Deep Dive 4 堂課和一堂 Design Patterns。
我請教他對我們的 後續 Python 進階學習,有什麼建議,以下是他的回覆,中譯是 ChatGPT 做的,有空再來檢查潤飾。
Hi Sky,
Wow, congratulations to you and your group! That’s quite a commitment and long hard work to have stuck to it for so long!
哇,恭喜你們團隊!能夠一直堅持下去真是一項不小的承諾和長時間的辛勤工作!
A next step might be to learn async programming using Python’s asyncio library. I would initially skip threading and multi-processing - asyncio is much more useful and relevant for Python (I have a YouTube video that explains the difference between these things).
下一步你可以考慮學習使用 Python 的 asyncio 庫進行非同步編程。一開始我建議略過線程和多進程,因為 asyncio 對於 Python 來說更加有用和相關(我有一個 YouTube 影片解釋這些概念的區別)。
I don’t know of any good courses on asyncio (I have been wanting to create one for a while now, just not getting the time to do it) - but I did like the book “Programmer’s Python: Async” by Mike James. Beware of older YouTube videos (or courses) on asyncio - a lot has changed fairly quickly over the last few years, and I often see quite outdated stuff that is misleading.
我不知道有哪些好的 asyncio 課程(我一直想創建一個,只是一直沒有時間去做) - 但我喜歡 Mike James 的書《Programmer’s Python: Async》。要注意一下關於 asyncio 的舊 YouTube 影片(或課程) - 在過去的幾年裡有很多變化,我經常看到相當過時且誤導的東西。
I also have a few videos on type hinting (basic intro), and dataclasses (two videos, in-depth) that you could check out.
我還有一些有關類型提示(基本介紹)和數據類(兩個影片,深入)的影片,你可以參考一下。
I am generally not a big fan of these design pattern courses - nothing wrong with design patterns per se, except that it sometimes stops developers from thinking critically about a problem and coming up with their own, sometimes far more appropriate and context specific, solutions. These design patterns sometimes are also just too academic - they’re great generalizations of certain ideas, but that’s also their weakness - they are too generalized and often make your code far more complex than it needs to be. But the ideas they demonstrate are good to know as you write your own code.
我一般不是那麼喜歡這些設計模式的課程 - 設計模式本身沒有問題,只是有時它會阻止開發者對問題進行批判性思考,並提出自己的解決方案,有時這些解決方案可能更加合適且特定於上下文。這些設計模式有時候也太學術化了 - 它們是對某些思想的很好的概括,但這也是它們的弱點 - 它們太過於泛化,往往使代碼變得比實際需要更複雜。但它們展示的思想在你編寫自己的代碼時是不錯的了解。
I would highly recommend that you actually start writing Python projects - maybe you could do that as a group - that would also expose you to using collaborative development tools such as git (and GitHub, or GitLab, both of which have totally free usage tiers). You could basically collaborate on some project. That way you get to use the Python you learned, and then start learning more things as you start adding functionality such as databases, querying external resources, looking for 3rd party libraries to help out, etc. I think you would benefit a lot from coming doing something like this - it will probably be difficult at first because you’ll suddenly be facing trying to work with other tools that may not even be Python specific, but which can be used from within Python.
我強烈建議你實際開始編寫 Python 項目 - 也許你可以作為一個團隊來做 - 這也會讓你接觸使用協作開發工具,如 git(以及 GitHub 或 GitLab,這兩者都有完全免費的使用層級)。你可以基本上共同開發一個項目。這樣你就可以使用你學到的 Python,然後在添加功能時開始學習更多東西,比如數據庫、查詢外部資源、尋找第三方庫等。我認為你會從這樣的做法中受益很多 - 起初可能會有一些困難,因為你突然要開始使用可能甚至不是 Python 特定的其他工具,但這些工具可以從 Python 中使用。
I guess it depends on your specific goals - but if it is becoming software engineers, you’ll need to move beyond just programming languages. So things like git, various databases (postgres, redis, mongoDB for example), queues (elasticMQ, RabbitMQ for example), Docker, and other tools which software engineers have to use to build an entire application - and best way to start learning them is to start using them - it’s a bit challenging at first, but you quickly become acustomed to them, as well as gaining the ability to more quickly learn new topics as you need them. As I said though, it depends on your specific goals - maybe it’s AI, in which case what I just said may not apply immediately, and you’d be better served learning about the various Python based AI libraries that are available first. Or maybe you want to write REST APIs, in which case you would want to study the Pydantic library (I have a course coming on taht shortly), asyncio, and the FastAPI framework. So, it kind of depends on where your interests lie.
我猜這取決於你的具體目標 - 但如果你的目標是成為軟件工程師,你需要超越只是編程語言。諸如 git、各種數據庫(例如 postgres、redis、mongoDB)、隊列(例如elasticMQ、RabbitMQ)、Docker 和其他軟件工程師必須使用的工具來構建整個應用程序 - 開始學習它們的最佳方式就是開始使用它們 - 起初可能有點挑戰,但你很快就會適應它們,並且獲得更快地學習新主題的能力。儘管如此,這取決於你的具體目標 - 也許是 AI,那麼我剛才說的可能不立即適用,你最好首先了解一下可用的各種基於 Python 的 AI 庫。或者也可能是你想編寫 REST API,那麼你會想學習 Pydantic 庫(我即將推出一門課程),asyncio 和 FastAPI 框架。所以,這有點取決於你的興趣所在。
Anyways, good luck on your continuing journey! - and let me know if you have more questions, or some specific set of goals/interests in mind.
無論如何,祝你在你的學習之旅上好運!如果有更多問題,或者有特定的目標/興趣,請隨時告訴我。
Best regards!
Fred.
我把上述 Fred 老師提到的主題,以影片/原始碼的方式並列在下方,方便大家查閱:
Fred 老師提及的 YouTube 影片(依提及次序):
AsyncIO
補充:老師提及的書 Mike James 的書《Programmer’s Python: Async》
https://www.amazon.com/Programmers-Python-processes-Something-Completely/dp/1871962765
提醒:本書電子版 雖然便宜許多,但它的版面是固定的(不會隨著螢幕大小改變換行處,你可以想像成 pdf 檔),不方便觀看。
type hinting (basic intro)
裡面的 type-hinting.ipynb
dataclasses (two videos, in-depth)
裡面的 dataclasses_part_1.ipynb & dataclasses_part_2.ipynb
實作是王道
開始實作,如果是團隊共同開發一個專案,還能學習到程式語言外的協作開發工具,例如 git(GitHub 或 GitLab,這兩者都有完全免費的使用層級)。然後在開始增加功能(例如資料庫、查詢外部資源、第三方函式庫等)時,學習到更多東西。
延伸閱讀:我對共同學習的一些想法
以終為始
作為一個程式設計師,你要學會的,絕不只是一種程式語言而已。
例如 git、各種資料庫(例如 postgres、redis、mongoDB)、佇列(例如 elasticMQ、RabbitMQ)、Docker,以及程式設計師必須用來建立整個應用程式的其他工具。
開始學習它們的最佳方式就是開始使用它們。
一開始有點挑戰性,但你很快就會習慣它們,並且能夠在需要時更快地學習新主題。
Pydantic
如果想編寫 REST API,最好學習 Pydantic 庫(我很快就會開設課程)、asyncio 和 FastAPI 框架。
在老師的 Pydantic 課程上線前,可以先看老師 YouTube 頻道的這兩部影片:
裡面的 pydantic.ipynb
裡面的 Migrating to Pydantic V2.ipynb
AI
如果想學 AI,最好先了解各種可用的基於 Python 的人工智慧庫。
我們曾共學過基於 Python 的人工智慧庫:
✅ 【共筆】OpenAI Python API 共學課程:進度、筆記和錄影
2️⃣ 【共筆】Mastering OpenAI Python APIs:進度、筆記和錄影
✅【共筆】fast.ai Practical Deep Learning:進度、筆記和錄影