this post was submitted on 18 Aug 2024
1 points (100.0% liked)

Python

1921 readers
1 users here now

A community for talking about the Python programming language.

founded 1 year ago
MODERATORS
 
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 2 months ago* (last edited 2 months ago) (1 children)

Rust:

2 days, most of it fighting the compiler.

I did a POC in Rust vs Python. Rust took longer to write, would be harder to maintain by our team, and with numba, the performance difference was small. So we went with Python.

[–] [email protected] 0 points 2 months ago

If you are fighting the compiler you are probably trying to write unidiomatic code (maybe Python-like code?).

[–] [email protected] 0 points 2 months ago (1 children)

...and 5 min in chatgpt. Only you spend 3 days making it work because you never understood coding in the first place.

[–] [email protected] 0 points 2 months ago

And honestly, even if you do understand coding, you'll probably spend more time testing the code than it would've taken to write and test it yourself.

We had an applicant use AI in an interview, and they made the same mistake twice in 5 minutes, because that's the code the model spat out. This was someone with several years of experience (I think they even ran a team for a couple years), so they certainly understood coding, they just trusted their tools too much. We even gave them a softball question, "How confident are you that your code is correct? What would you need to feel more confident?," and their answer was, "I'm 100% confident that it's correct" when they should have answered, "I'd need to write some unit tests."

[–] [email protected] 0 points 2 months ago

I love C and Assembly as much as the next guy, but implementation time to the optimal solution matters.

[–] [email protected] 0 points 2 months ago (1 children)

"Hardware cycles are cheap. Wetware cycles are expensive."

  • Paraphrased from something I once heard Jacob Kaplan-Moss say but don't remember his exact wording at PyCon many moons ago.
[–] [email protected] 0 points 2 months ago (1 children)

Then why do Python people insist on having the programmer do so much stuff instead of letting a compiler do it?

[–] [email protected] 0 points 2 months ago (1 children)
[–] [email protected] 0 points 2 months ago (1 children)

Verifying that your different pieces of code actually work together. With a static type system and similar compiler features you can lighten the mental load a lot compared to languages like Python where you need to keep it all in your head.

[–] [email protected] 0 points 1 month ago

Python has (optional) types now.

[–] [email protected] 0 points 2 months ago

And something between 1 and 300 minutes in Haskell.

[–] [email protected] 0 points 2 months ago

Time coding🤔 runtime: the other way around😜