3 ms·
Hi everyone, so I'm the guy who wrote this article. I'm sharing a video recording of George Hotz writing some Python code. Note his reaction at 5:55 https://ww
by natemurthy 8y ago
Hi everyone, so I'm the guy who wrote this article. I'm sharing a video recording of George Hotz writing some Python code. Note his reaction at 5:55
https://www.youtube.com/watch?v=7Hlb8YX2-W8&t=355s https://www.youtube.com/watch?v=7Hlb8YX2-W8&t=355s
His outburst is an emotional manifestation of the different sources of frustration I've had working with Python that I've tried to document.
A common theme I've seen in responses is that many claim that I've mistaken Python as a weakly-typed language countering that it is indeed a strongly-typed language -- obviously an argument of semantics. I'll define a "strongly-typed" language as one where it is trivial to identify the type signature and definition of any function or variable in a program. In Python, this is non-trivial.
FYI, this article is also cross-posted on:
https://news.ycombinator.com/item?id=16337435 https://news.ycombinator.com/item?id=16337435
https://news.ycombinator.com/item?id=16371338 https://news.ycombinator.com/item?id=16371338
https://news.ycombinator.com/item?id=16411765 https://news.ycombinator.com/item?id=16411765
- p1esk 8y agoWow, I had the same error as Hotz's last night, it crashed the program after about 15 min of calculations, which then had to be rerun. I couldn't even blame myself, because that was someone else's code.
- manicdee 8y agoI have exactly the same reaction to C#, C, Forth, Pascal, Prolog, etc: regardless of the typing strength or compiler nitpickiness there will be scenarios where stuff doesn’t go as planned because I didn’t understand the problem domain sufficiently, and these errors serve to enhance my understanding of the same. Regardless of language, x -> a + 1 is not going to work if a never has a value. In many cases handling “a doesn’t have a value” is the wrong way to address the problem, because the problem should be solved as “figure out why the data collection didn’t work, and propose a strategy for handling our dataset when either a value is missing or is provably wrong.” As an example one might assume that a video feed has exactly as many frames per second as it says on the tin (eg: 24fps will have exactly 24 frames for each second of video) but in reality there will be missing frames due to data corruption, or even a mismatch in clock speeds meaning that over 100 seconds you have 2398 frames instead of 2400. How do you handle the missing two frames? The problem is there are no frames missing, it’s just that they were never there to start with, and frame 1237 of another source has no direct equivalent in the slightly-faster stream. You might alter the clock for processing, duplicate one or two frames, use interpolated frames, or otherwise process the various sources so that you get a consistent synthesised data stream with which to do further processing. Strong typing doesn’t help solve real problems.