5 ms·
The best? Here's the problem I had with my previous game project. JSON writing and parsing. I type "JSON" into your search box and get 20 libraries without muc
by babuskov 10y ago
The best?
Here's the problem I had with my previous game project. JSON writing and parsing. I type "JSON" into your search box and get 20 libraries without much difference explained. 17 of those match my license requirements. And then I have to try each one to compare.
You might say that I could just pick one at random and see if it works... I did exactly that for my previous project. 11 months into development when I had huge chunks of code depending on it, I discovered a subtle bug that only showed up on big JSON files (over 2MB) and only when the library was compiled with MSVC. The author doesn't want to debug it because he doesn't use Windows. I wanted to use use MSVC because of Steam API. So I had to either rewrite the code to use another library or give up on SteamAPI. I picked the latter.
Dumping a list of 20 libraries to solve a single problem isn't "curating".
I suggest you remove "the best" from the title as this site doesn't solve that problem.
- otabdeveloper1 10y ago> So I had to either rewrite the code to use another library or give up on SteamAPI. You could have fixed the bug yourself instead. Parsing JSON is not exactly rocket science.
- babuskov 10y agoI looked at the code... writing my own parser would be faster than fixing it. But that's beside the point. I decided to use a 3rd party library because I did not want to invest my time into that. The moment I had to even look at the source code, that was broken.
- fit2rule 10y agoSurely thats the 'cost' of using someone elses' work without paying for it/otherwise remunerating the author? Its hardly their fault you found a bug that you decided you couldn't/wouldn't fix ..
- babuskov 10y agoI'm not blaming the author. I'm just saying that picking a random library is a bad idea.
- fit2rule 10y agoBut surely, the moment you integrate the random library into your project, you assumed responsibility for it - warts and all? I just can't see the moral authority that you've granted yourself to complain about the library and the effort required to continue to maintain it, when it clearly was of advantage to you to integrate it into your project in the first place .. Don't you think it was a privilege that some stranger wrote code that you used in your project, in spite of the thorns?
- babuskov 10y ago> I just can't see the moral authority You completely took that out of the context. I wrote about it to show how risky it is to pick a random library, not to complain about the author. > But surely, the moment you integrate the random library into your project, you assumed responsibility for it. No, you don't. Your only responsibility is your project. If the library is broken, and the original author doesn't want to fix it, it's time to evaluate whether it's easier to remove it, replace it with something else or fix it yourself. You are not obliged to fix it yourself at all. I'm sorry to disappoint you, but the world doesn't work that way.
- fit2rule 10y agoAlas, you and I simply disagree. I wager that full responsibility for ones project implies the onus of fixing whatever problems you introduce into the project by importing the external dependency in the first place. Were you my junior, telling this to me as your project manager, I'd demand you fix the bug. The reason is - we already gained from your decision to advance the project by including the external work, and at the moment you included it in your project you accepted responsibility for the issue. Failing to take responsibility for this code, whether you wrote it or not, would be a major distraction from the task, and thus does not reflect positively on you as a developer...
- suby 10y agoOut of curiosity, what JSON library was that?
- babuskov 10y agoJsonBox: https://github.com/anhero/JsonBox https://github.com/anhero/JsonBox To give some credit to libhunt.com, they don't even list it :)
- sirbribri 10y agoIt's good that you opened up an issue for it, but it also looks like he was waiting for more information from you... https://github.com/anhero/JsonBox/issues/35 https://github.com/anhero/JsonBox/issues/35
- babuskov 10y agoAs you can see, I gave a link to the problematic .json file. If I were a developer of the library, this would be enough for me. I have made and maintained open source projects (see my bio on HN) and I have often got less to work with (people just explaining the problem without even giving me a data sample). He was asking me to drill it down and basically debug his program and I simply wasn't interested in doing that.
- mtanski 10y agoThat's not that much different in Java or Scala either. So many libraries that do JSON.
- mraleman 10y agoNot only that, but JSON library perf is hilariously variable.
- vram22 10y agoYour problems, if common enough, suggest a startup opportunity to address this area - on a paid basis. Testing validation / curation of various software libraries and tools for various languages, with comments and ratings about suitability for various purposes, and along different dimensions, such as code quality, performance, docs, etc. There was a company in a roughly similar area (IIRC) called SpikeSource, co-founded by (?) Kim Polese of Sun and later Marimba. Not checked recently about them.
- xixi77 10y agoI feel you, but one problem is that it is often hard to rank libraries best to worst. 20 may be a bit much, but still -- one library may be the most popular, another fastest, another correctly handles this one specific unusual case, another works well with large objects, another has more convenient interface for your case, etc. What would be ideal is if there was useful information about such things available right on the aggregator site -- Amazon style reviews wouldn't be too useful here tbh, ideally one would like to see multiple comparisons from people like you who tried or at least looked at a few of them.