Well he asked me which method i would use. I replied that the character array method but for most tried and tested way I would use the jdk method. So I had demonstrated my algorithm thinking and coding ability but in reality i would prefer a tried and tested facility. Whats wrong in that?
Nothing is wrong in that of course. I've run into home-rolled code that should have never gone into production. IIRC it was an implementation for encoding a string, instead of using either the java.net implementation or Apache commons implementation. Well their implementation forgot to encode the all-important new-line character, so they were sending out incomplete emails, emails that, depending on the response, could generate thousands of dollars of revenue per month and therefore had already cost the company tens of thousands, before I figured out the problem. There's even a name for this anti-pattern: "not invented here" (or "re-inventing the wheel")
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Speaking of which. Take a look at this comment thread:
dev.to/jonrandy/comment/joh6
I believe it's not about the language or what the JDK offers but about the way you approach the problem.
Well he asked me which method i would use. I replied that the character array method but for most tried and tested way I would use the jdk method. So I had demonstrated my algorithm thinking and coding ability but in reality i would prefer a tried and tested facility. Whats wrong in that?
Nothing is wrong in that of course. I've run into home-rolled code that should have never gone into production. IIRC it was an implementation for encoding a string, instead of using either the java.net implementation or Apache commons implementation. Well their implementation forgot to encode the all-important new-line character, so they were sending out incomplete emails, emails that, depending on the response, could generate thousands of dollars of revenue per month and therefore had already cost the company tens of thousands, before I figured out the problem. There's even a name for this anti-pattern: "not invented here" (or "re-inventing the wheel")