1 hour in Java

2 years ago by adr1an to c/python

rizo 14 points 2 years ago

Time coding🤔 runtime: the other way around😜

path: 0 11844764, hotness: undefined, score: 14, children: 1
anzo 1 point 2 years ago

async enters the chat

path: 0 11844764 11849146, hotness: undefined, score: 1, children: 0
TootSweet 7 points 2 years ago

"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.
path: 0 11850315, hotness: undefined, score: 7, children: 6
taladar 4 points 2 years ago

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

path: 0 11850315 11856388, hotness: undefined, score: 4, children: 5
TootSweet 2 points 2 years ago

Examples?

path: 0 11850315 11856388 11860354, hotness: undefined, score: 2, children: 3
taladar 0 points 2 years ago

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.

path: 0 11850315 11856388 11860354 11875552, hotness: undefined, score: 0, children: 2
rimu 1 point 2 years ago

Python has (optional) types now.

path: 0 11850315 11856388 11860354 11875552 12256053, hotness: undefined, score: 1, children: 1
Nibodhika 1 point 2 years ago

Such as?

path: 0 11850315 11856388 11875301, hotness: undefined, score: 1, children: 0
ChowJeeBai 7 points 2 years ago

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

path: 0 11855231, hotness: undefined, score: 7, children: 1
sugar_in_your_tea 2 points 2 years 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."

path: 0 11855231 11862925, hotness: undefined, score: 2, children: 0
heavy 5 points 2 years ago

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

path: 0 11851583, hotness: undefined, score: 5, children: 0
marcos 3 points 2 years ago

And something between 1 and 300 minutes in Haskell.

path: 0 11845420, hotness: undefined, score: 3, children: 0
riskable 1 point 2 years ago

...and often 10 minutes in bash

path: 0 11845345, hotness: undefined, score: 1, children: 0
tobikoe 1 point 2 years ago
path: 0 11844244, hotness: undefined, score: 1, children: 0
sugar_in_your_tea -1 points 2 years ago

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.

path: 0 11862962, hotness: undefined, score: -1, children: 2
taladar 2 points 2 years ago

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

path: 0 11862962 11875538, hotness: undefined, score: 2, children: 1
sugar_in_your_tea 1 point 2 years ago

Or you're just new. This is, afterall, a Python community.

path: 0 11862962 11875538 11883210, hotness: undefined, score: 1, children: 0
python
python

@sh.itjust.works

login for more options
2303
28
1

A community for talking about the Python programming language.

go to feed...