Hacker News new | past | comments | ask | show | jobs | submit login

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.




I'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?s...


Relying 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.


And 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.


Which 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".


And 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.


The sad truth is: s/Some/Most/


which is great and you totally should. not everyone knows about those things.


I 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.


That's like saying people shouldn't read FAQs because they should rather read the documentation. These things aren't actually mutually exclusive.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: