2 ms·
I've always loved the "Falsehoods Programmers Believe About Xxxx" articles. There's always that junior developer who says, "We need a Xxxx handler! That's easy,
by ryandrake 11y ago
I've always loved the "Falsehoods Programmers Believe About Xxxx" articles. There's always that junior developer who says, "We need a Xxxx handler! That's easy, I'll write it myself in an hour!" (where Xxxx is either a time, address, name, etc., something with a huge number of tricky potential edge cases). You can just watch the bugs jump into the program as he types. Then you get to testing:
Me: Try this test.
Dev: Oh, didn't think about that one, let's add that case.
Me: How about this?
Dev: What? OK OK, let's support that too.
Me: And this one...?
Dev: Wait, what? How is that even...?
The code is about 200 lines now, and we've blown the afternoon, and it still doesn't properly handle Xxxx, so I'll forward him the "Falsehoods Programmers Believe About Xxxx" article.
Dev: Oh crap, maybe I should have looked for a tried and true library that handles Xxxx....
Me: Yes, grasshopper...