Tuesday, September 18, 2018
This is why I tend towards writing my own code libraries
Six years ago I had the need to fetch an image via HTTP as part of testing “Project: Lumbergh.”
At the time,
I thought You know what?
Why don't I use
It's supposedly easy to use.
It'll save me the hour or so it'll take me to write the code to connect to the server,
send the request and read the reply.
It still took about an hour, mainly to figure out how to use the darned library. But it worked.
And then I went to test on Solaris (which is what production runs on) and well …
r2839 | spc | 2012-07-11 14:22:27 -0400 (Wed, 11 Jul 2012) | 8 lines
It's amazing what isn't installed on Solaris.
And yes, I do use curl for testing. Easy (if insanely large) library to use to snarf down web requests.
I had to download
libcurl and check it into the repository because it's not on Solaris.
And then I had to figure out the special
./configure options to get it compiled under Solaris.
And then I had to wait for
make to run
(and on Solaris,
this is a S—L——O———W————P—————P——————R———————O————————C—————————E——————————S—————————————S).
And then I had to figure out how to integrate this into the build system for Solaris.
And for something that was supposed to be “easy to use” turned out to be not so easy. Nor quick. And has been a thorn in my side these past six years.
Seven years ago I wrote a Lua module to generate hashes. Instead of pulling the code from various RFCs, I thought I would link to OpenSSL, since it already included the code for the various hashes, and who knows—it might even be optimized.
This only took a few moments to implement and was rather easy.
Until Apple decided to deprecate the use of OpenSSL on Mac OS-X and later remove OpenSSL in their latest offerings.
I use said Lua module at work.
We mostly develop under Mac OS-X.
This has become a thorn in my side over the past few years. The issue came up two weeks ago when my fellow cow-orker TS, decided to update his Mac OS-X laptop and the build broke. And it came up today because my other fellow cow-orker TS-II (same initials—go figure) did some update or other on his Mac OS-X laptop and the build broke, but in a different way (wow—to think that each version of Mac OS-X is a special snowflake).
Two libraries, used to avoid the whole “Not Invented Here Syndrome” and to speed up development.
In both cases, it has not speed up development. It has slowed down development as I've had to find more and more ways to keep using these infernal libraries.
I guess I'll spend a few hours ripping out
libcurl and OpenSSL and replacing it with code I've written to speed things up around here.