公開學習第 0 階段:Python 傳奇由此開始
Learning in Public, Phase 0: Python, the legend starts
作者完成學習計劃的第 0 階段,為日後學習 AI 自動化和工作流程打好基礎,並以「CLI valid payload inspector」作為階段項目。這個簡單項目透過 CLI 接收 JSON 資料並檢查是否有效,使用 pytest 測試、Pydantic 驗證,並把錯誤記錄到日誌檔案。
Hello ladies and gentlemen!
Even after years, the old phrase has aged like a fine catchphrase. (I guess I can’t say what I want sometimes.)
Fair warning: I didn’t write this post for encouragement or to show off. (It’s not like there are that many people who would be sitting in front of their device to waste their time reading these things; tbh, I myself won’t do it.)
I am really interested in system programming, especially working with low-level software and its interactions with hardware. Then, recently, I came to love AI automation and workflows. So I thought, “Why not learn them?” So I went and made myself a timetable for the latter part to build some fundamentals (not the best, but good enough for me). Each section is divided into phases.
One of the end credits after completing a phase/week (even if it’s incomplete to a certain extent) is to post my experience of what I did and my thoughts during this process. (Yh, I am just dumping my things on others through something like a blog. Don’t take it to heart, because I definitely don’t want to take responsibility.)
Today is Sunday, so I am done with phase 0 - the absolute prerequisites for my future fundamentals. It is ugly, but somehow I learnt a lot of things, especially with the Python language. Never in my life have I been so overjoyed (probably a lie) about learning something. I don’t remember how I learnt JS and C in my early days, and I have been using them for a long time (I bet an experienced developer out there is laughing at my claim about a “long time” - it’s fair, so I don’t mind), but learning Python made me realise that I can actually understand and learn the mechanisms behind them just from reading them once. I was like “wow, am I a genius?” and then I went like “Nah, you should complete your task first”.
Jokes aside, today I am done with phase 0, ending with a project called “CLI valid payload inspector” - a simple project that just enforces my reading through this week’s readings. It is about validating JSON data that you pass to it from a CLI; it will print out whether it is valid or not. Some tests with pytest and validation with Pydantic. Of course, I handled exceptions and logged errors, or anything for that matter, in a log file. That’s pretty much it. It just forces me to search -> read docs -> improvise. I like that process a lot now that I’ve started learning.
Then there is OSTEP, which I am reading while I commute between places. I have to say, it is an engaging book, one of the best books I have ever read. Sometimes it tempts me into dedicating my AI automation reading time to it, just to read further and see what they are about to teach me. I wish we had not 24 hrs per day but maybe 48 hrs? (Don’t curse me in your hearts, okay? I am just kidding. No one would want to work/study that long even if we were aliens.)
(I'll be posting my experience every work. Dont mind if i dump my these issues. Ill repeat it again. I dont want to take responsiblity if you get a headache. just kidding. Just wanted other people to get a laugh and learn somethign after reading this (me: but there is nothing for others to learn here? ))
I wonder how others spent their week :)
來源:DEV Community · dev.to