3 ms·
Ooof, I have dealt with some fun balls of mud. Had a customers app break when they used zips that contained over 65k separate files. Sent it to dev and they sa
by pixl97 2y ago
Ooof, I have dealt with some fun balls of mud.
Had a customers app break when they used zips that contained over 65k separate files. Sent it to dev and they said "Oh use this other API we have". And yes, the file 'worked' but the api didn't do what the customer needed. Got back with the developer and saw
We had two api's that did almost but not quite the same thing. Ok, it happens, maybe there was a reason for it.
We also had two different zip libraries built in. At some point a dev ran into issues with legacy zip support not working on large files and added a new library. They converted about 10% of the API, enough to cover what they were working on and stopped.
- osigurdson 2y ago>> "Oh use this other API we have" This is an interesting problem. If you insist on maximizing consistency on a large code base, then nothing can ever change. If you allow too many small deviations / good ideas that are only ever partially completed, it results in chaos. I think it is a little like entropy: some (not too much) is needed for things to progress.
- pixl97 2y agoSo this was a few years back and they've wrangled a lot of the mess in. They've went with API versioning where you can set a flag in the request of something like ver=5 and you get a static version of the api that doesn't change. If you don't set an api version you get the latest version, which may break on updates. I think for most users it's made feature observability much better.
- daemin 2y agoThe part with having multiple libraries that do the same thing is always an interesting engineering case. Usually it's the case that different libraries support different features, so trying to settle on only one library is folly. Same thing when converting all of the existing zip code to handle a new library, who knows what will break, and even though it may be required production/management rarely want to take the time to make the switch. Case in point I've been at multiple places that have had multiple JSON and XML libraries in the same product at the same time.
- eitally 2y agoI used to run supply chain tooling for a big manufacturing firm and, at one point, some dev got into a fight with a security-focused sysadmin somewhere who refused to allow the use of sftp for file transfer with trading partners (things like forecasts and order documents from suppliers)... so instead of either escalating or creating an alternative architecture, the dev unilaterally decided to leverage the fact that ports 20-21 were inadvertently open externally and use standard FTP for this. Nobody was fired and nobody really knew because it was an app supported by one person and as long as the business process didn't fail everything was "ok".
- marcosdumay 2y agoOh, I have written plenty of blatantly bad code to evade security-focused sysadmins, and yes, many of those have made security worse. But they did solve problems.