Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the most glaring of mistakes that you are almost never going to make. Not impossible that you could make one, but highly unlikely. Certainly not on the order of "lots".

Not true. People make these mistakes all the time.

I was literally reviewing code today where someone write Python code to write a field that didn't exist. They didn't realise because they hadn't written a test. They asked me to check if it fixed my issue, which wasted 5 minutes of my time checking, when an IDE with static types would have told them their mistake instantly.

You can pull the "well I don't make mistakes" classic, but it doesn't matter. People do make these mistakes.

I linked an empirical study showing that 15% of bugs are precisely these mistakes. If you don't think it's worth eliminating 15% of bugs then frankly I just think you have crazy priorities and I can't really fix that.



> They didn't realise because they hadn't written a test.

If someone hates future developers so much that they wouldn't write a test, why would they suddenly take care to write proper types? I've worked with those kind of people before. The reality is that they won't define any specific types either, relying on `any` (or whatever the language's equivalent is) to minimize the social footprint.

> They asked me to check if it fixed my issue

I get you work with an asshole who hates other developers, but why would they need to ask if it solves your issue when they can just run the tests you wrote to assert the issue you discovered? Well, okay, being an asshole they maybe just wanted to see what meaningless busywork they could force you to do, but then why didn't you at least run your tests rather than spending minutes hunting up and down for something that your test would have found instantly? Something doesn't quite add up here.

> when an IDE with static types would have told them their mistake instantly.

And most likely even an IDE with type inference, a la the original article. Did you even apply a type checker when faced with this problem? It would be quite ironic if you didn't.

> when an IDE with static types would have told them their mistake instantly.

As would the test, at least for any developers who don't have an intense hatred for other developers.


"hates future developers" "those kind of people" "an asshole who hates other developers" "being an asshole" "intense hatred"




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

Search: