• Cracks_InTheWalls@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      5 days ago

      Imagine you work at a company that sells cookies. The company signs a contract offering a customer a set variety of cookies at various prices, with a clause stating that if the customer wants another type of cookie the company makes later on, it will be priced and added to their list. This should be in the form of regular contract amendments/addendums, but it isn’t.

      Several years go by, and in the course of that several different varieties of cookies have been added by the customer. The price given to them at the time may not account for the cost of materials and labor today, or how many of those cookies not mentioned in the contract are being ordered v. how many were expected, the fact that you outsourced some of those cookies, or brought some of those cookies in-house, etc. The cookie executive asks you “When did we offer customer x cookie y at price point z?”

      Now, the company has a perfectly good database of cookies and price points for customers, but it’s very old tech and requires certain access privileges, which are very hard to give people outside of the accounting department. Accounting is never able to help with this, and the cookie executives try poorly and fail to get people like you access. But you do have years and years of cookie addition request forms, which are kept in chronological order by customer and contain a list of all types of cookies requested up to that point in time.This is where binary search helps - you can pretty quickly find the one where the cookie y was added even though there are hundreds of these forms.

      It’s not a situation that should exist - we have a god damn cookie database where you can just pop in customer x and cookie y to get price z, with an effective date - but in my crazy cookie factory it helps a ton.

      There’s other examples but they’re all pretty much variants of this thinly veiled analogy.

    • businessfish@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      20 days ago

      not the commenter you asked but i use a binary search when i’m playing a modded game that is having issues to pinpoint which mod(s) cause the issue. beats launching the game over and over to test each mod by a long shot.

      a recent example: i put together a mod list for risk of rain 2 to play with some friends, but the game crashed on launch when all the mods were installed. so i disabled half the mods (in order, alphabetically or other) and tried to launch the game again - still crashing. disabled half the remaining enabled mods, test, repeated as necessary. with only a few cycles of booting the game, i was able to determine the specific mod causing a crash on startup out of my list of 50 something mods.

      • Karjalan@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        19 days ago

        While that’s really cool and useful, it might be the way a couple of mods interact as opposed to a specific one.