You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally completed Phase 3. Took a while but glad I got it done. My Python experience was limited but AI/google/docs helped alot. I used AI as a coworker similar to a senior dev. Asking its thoughts on things and to steer me in the right direction to look. Not asking for answers point blank. It was slower but definitely helps with knowledge retention since I remember mistakes easier than solutions. A couple issues I ran into were:
Pydantic & types - mixed up type annotations with runtime values early on, and learned that StringConstraints, Field, and Annotated each have a specific job. Also learned that making a field truly optional requires both str | None and = None together. One without the other isn't enough for Pyright.
Dictionary basics - Funny enough I was using the wrong notionation to call of keys/values.
PATCH bug - After getting the tasks 1-5 done there was one test still failing. I realized it was spreading **updated_data with None values. That was silently overwriting existing fields. My fix was building a clean dict with only noNone values before merging.
Docker - This was made me stuck longer than I should’ve been. Everything looked good to me but Auth calls were still failing with 401 errors. I had to actually check the env vars on the postgres container and saw it still had default values. Restarting containers wasn’t enough. I had to actually delete/start up new containers.
Debugging - Maybe the best function in programming. Printing helped me alot with seeing data and how the code was outputting data.
Overall this was a good phase project. I feel like my programming knowledge improved somewhat and I got more experience working with APIs, OOP etc. Looking forward to the next challenging phase.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Finally completed Phase 3. Took a while but glad I got it done. My Python experience was limited but AI/google/docs helped alot. I used AI as a coworker similar to a senior dev. Asking its thoughts on things and to steer me in the right direction to look. Not asking for answers point blank. It was slower but definitely helps with knowledge retention since I remember mistakes easier than solutions. A couple issues I ran into were:
Pydantic & types - mixed up type annotations with runtime values early on, and learned that
StringConstraints,Field, andAnnotatedeach have a specific job. Also learned that making a field truly optional requires bothstr | Noneand= Nonetogether. One without the other isn't enough for Pyright.Dictionary basics - Funny enough I was using the wrong notionation to call of keys/values.
PATCH bug - After getting the tasks 1-5 done there was one test still failing. I realized it was spreading
**updated_datawithNonevalues. That was silently overwriting existing fields. My fix was building a clean dict with only noNonevalues before merging.Docker - This was made me stuck longer than I should’ve been. Everything looked good to me but Auth calls were still failing with 401 errors. I had to actually check the env vars on the postgres container and saw it still had default values. Restarting containers wasn’t enough. I had to actually delete/start up new containers.
Debugging - Maybe the best function in programming. Printing helped me alot with seeing data and how the code was outputting data.
Overall this was a good phase project. I feel like my programming knowledge improved somewhat and I got more experience working with APIs, OOP etc. Looking forward to the next challenging phase.
Beta Was this translation helpful? Give feedback.
All reactions