java - My own code vs library -


this kind of unusual question developers reason want post here , hope adequate answer.

here simple example:

i wrote java function calculates distance between 2 geo points. function not more 50 lines of code. decided download source code ibm same thing when opened saw looks complicated , thousand lines of code.

what kind of people write such source code? programmers? should use source code or own?

i have noticed kind of thing lots of times , time time start wonder if me not know how program or maybe wrong?

do guys have same kind of feeling when browse throught other peoples source code?

the code found, exact same calculation? perhaps takes account edge cases didn't think of, or uses algorithm has better numerical stability, lower asymptotic complexity, or written take advantage of branch prediction or cpu caches. or over-engineered.

remember saying: "for every complex problem there solution simple, elegant, , wrong." if dealing numerical software, basic problems adding bunch of numbers can turn out surprisingly complex.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -