Friday, November 11, 2016

External libraries.

A friend asked me to download his calculator program.  I told him there was already a calculator program that came with Windows, and he said he didn't care, his was better.  So I downloaded it, and I clicked "2+2".  And it came back "22".

I told him his program had a problem with addition.  He checked the code and he got back to me and said "Oh, no, the library I linked in for mathematical operations handles addition that way.  It's a completely legitimate and valid result."

I tried to impress upon him that 2+2 did not, in fact, equal 22, that it equalled 4, but he was not having it.  "Who am I to second-guess the person who made those libraries?  I mean, sure, I could easily fix the code for the addition function, but who knows what else it might break?"

He also pointed out that if you typed in "0+1" it would return "1", which _is_ in fact what "0+1" is, so obviously there was nothing at all wrong with his program.

Later I found out his program gave me a virus and I had to reformat my hard drive.