4 ms·
I have had this experience many times when I tried to use a library where every function was tailored for a very specific concrete situation. The perfect examp
by dkarl 16y ago
I have had this experience many times when I tried to use a library where every function was tailored for a very specific concrete situation. The perfect example here is finding an extremely complicated mass of code to read a cert from a file, but no way to read a cert from any other source, not even from a buffer in memory. So if you read it from some other location, or read it from a file yourself, or constructed it yourself in memory as part of a test, you're out of luck. People who write code like that tend to be pretty incredulous and insulting when you explain what you're trying to do. "I mean, if you want to read a cert that isn't in a file, obviously I need to educate you until you stop wanting to do such a stupid thing. Not that it's stupid in itself, but you are probably solving your problem in such a dumb way that you should stop right now and start over when you understand what you're doing. If you're super-polite I might even help you." That kind of thing.
- dchest 16y agoIt is not the first time I read that there's no way to read a certificate from memory in OpenSSL, but it's not true. Here's how to do it: http://gist.github.com/574388 http://gist.github.com/574388 I agree with the opinion, though, because it took me a lot of time to figure this out.
- megrimlock 16y agoThere's a school of API design that believes you can guide users to reflect on what they are doing by deliberately excluding certain things, without explaining why they are absent. This springs from a prescriptive viewpoint that presumes the reader will inevitably arrive at the same conclusions as the author about the right way to do things. Since no one is always right, and API's are too often designed without considering what actual application usage would be like, this can be extremely frustrating. The best API's that somehow hit the sweet spot of minimal, efficient, and obvious are always extremely impressive.
- hackermom 16y agoThe good old "I really know better than you. I even know better than you what it is that you want/need to do. Do it the way I tell you to, because that's how I would do it, and that matters more than what you want/need to do."-personality so incredibly prevalent in a certain sphere of programmers we are all very familiar with, who gladly spend 5 minutes pushing you down instead of spending 20 seconds to just kindly, sociably and helpfully answer your question.
- albertzeyer 16y agoThe problem is that in many cases, there is not an answer that easy. And instead of admitting that the current design is too crippled to allow such a thing or makes such a thing pretty horrible and difficult, they try to defend the design by declaring that thing as something you don't want to do anyway normally.
- e40 16y agoPerfect recent example. Plex v9 doesn't allow one to delete a file after you watch it. v8 had the feature and LOTS of us used it. The forums are abuzz with people complaining, and the devs are just now coming around that they might implement it (though when is anyone's guess). In the mean time, the lot of us has gone back to v8.
- bborud 16y agoIf it was only that. But the OpenSSL code is genuinely bad.