4 ms·
I wouldn't call it 'traps'. I would call it 'read and understand documentation before writing code' like: what is 'is' operator, or how floats behave in EVERY p
by alex-yo 10y ago
I wouldn't call it 'traps'. I would call it 'read and understand documentation before writing code' like: what is 'is' operator, or how floats behave in EVERY programming language, or why you should sanitize EVERY user input.
So, basically, I can write such a list for every language I know.
- baq 10y agowhich is great and you totally should. not everyone knows about those things.
- userbinator 10y agoI think the point of the parent comment is that they should. I'm not even a regular user of Python (or dynamic languages in general), and yet the list of things in the article doesn't seem all that surprising.
- d33 10y agoI'd argue that a good programming language should rarely force you to go back to the docs. Anyway, for a list of weird language properties, check out this tag: https://stackoverflow.com/questions/tagged/hidden-features?sort=votes&pageSize=50 https://stackoverflow.com/questions/tagged/hidden-features?s...
- blowski 10y agoRelying on developers to read and remember every bit of documentation for every bit of code is more likely to end up with insecure code compared to introducing sane defaults with an explicit, expressive API.
- SEJeff 10y agoAnd the TL;DNR being: developers can't be expected to do a good job. Some of them in fact will do a terrible job. This can be said for every industry involving people.
- guyzmo 10y agoThe sad truth is: s/Some/Most/
- afarrell 10y agoAnd the way we handle that is by designing systems to compensate for the fallibility of humans so that the human-computer system is more robust as a whole.
- hueving 10y agoWhich is why any sane industry has lots of safety involved. We don't just shrug every time someone gets electrocuted to death and say "they forgot part c page 4 of the operations manual which indicates that the off switch doesn't work on tuesdays".
- deleted 10y ago[deleted]
- hacker42 10y agoThat's like saying people shouldn't read FAQs because they should rather read the documentation. These things aren't actually mutually exclusive.