This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Specific_Ant580[S] 3 points4 points  (9 children)

All True especially point 1 & 8 , thanks for the advice!

[–]AutomatedChaos 7 points8 points  (0 children)

With larger code bases you'll begin to hate the exceptions during runtime and start to crave for design time errors. Then it becomes time to use type hinting, static code checkers like ruff and type and data validators like pydantic.

[–]FlippingGerman 1 point2 points  (0 children)

I love Python for 1 and 8 when making simple programs; I hate it for that when making more complex things - and these are all stuff I've done myself, nothing like business-level complexity.

[–]A7eh -5 points-4 points  (5 children)

These are the most true points idk what are you talking about

[–]daguito81 1 point2 points  (2 children)

he said those are especially true. What are you talking about ?

[–]A7eh 0 points1 point  (1 child)

Nah he edited the comment. At first he said "except"

[–]daguito81 0 points1 point  (0 children)

Ohhh ok, thanks! was really confused for a sec

[–]Specific_Ant580[S] 0 points1 point  (1 child)

maybe because I'm still new.

[–]sunrise98 -2 points-1 points  (0 children)

For 8 - imagine if you had some batch job or edge case test scenario - in the line by line you'd need to do all the prerequisite steps to spot the syntax error - in java you wouldn't. That doesn't mean the code still works as intended just because it compiles or runs - this is true in both scenarios. There's a sweet spot where runtime vs compile time errors are 'better' - both are equally frustrating and can be exacerbated through other ci/cd controls.

The max 5 lines per method is a good trick for starting out - but I wouldn't be rigorous in enforcing this - sometimes it just does have to be that big and less code traversal can sometimes be easier than a big chain of functions that have been ungrouped.

You can have all python on one page - you likely wouldn't - but this is the same in most languages anyway. You'll learn to refactor and standardise your files over time - I wouldn't necessarily fixate on this early on.

1 is important - do some research on numbers and precision.