Comment on Programmer tries to explain binary search to the police
charonn0@startrek.website 11 months ago
Part of my job is to review security footage for reported incidents.
If there is a long-lasting visual cue that the event has or has not happened yet (e.g. a window is either broken or not), then a binary search is very useful.
If the event lasts only a moment and leaves no visual cue (e.g. an assault), then binary search is practically useless.
CosmicCleric@lemmy.world 11 months ago
But you will see the event happen though.
It’s a matter of if you can identify who the perpetrator is or not, but at least that due diligence should be done by police, looking at the person doing the crime and see if they can be identified.
null@slrpnk.net 11 months ago
Not with a binary search.
CosmicCleric@lemmy.world 11 months ago
Yes you will.
A binary search is just what it says it’s for searching only.
When you find that moment in time where the bike was there and then the next moment the bike’s not there, then you view at regular or even slow-mo at those few seconds of the bike in the middle of disappearing, and see the perpetrator.
Azzu@lemm.ee 11 months ago
You didn’t get what was talked about here. Re-read the topmost parent comment.
ShrimpsIsBugs@programming.dev 11 months ago
You either don’t know what binary search is or you completely missed the context of this conversation
lustyargonian@lemm.ee 11 months ago
Binary search only works on sorted data, i.e. you know which side of the mid point is pointing towards the incident. If the incident leaves no trail, you can’t know whether you can discard the left side or the right side, making it a complicated linear search at that moment.
null@slrpnk.net 11 months ago
That doesn’t apply to the comment you replied to.
CosmicCleric@lemmy.world 11 months ago
Screw you, and your gatekeeping censoring.
I’m replied, saying the comment is not correct, and I gave reason why, which are valid reasons.
starman2112@sh.itjust.works 11 months ago
Your reasons for why they were incorrect about a binary search being useless in situations that don’t leave visual cues is that you can simply look for the visual cues lmao, that’s not valid at all
captain_aggravated@sh.itjust.works 11 months ago
Let’s use the example of a bike theft. We enter into evidence a 4-hour security cam video that shows the thief with the bike.
Scenario A: The camera can directly see the bike rack, and the bike in question is visible at the beginning of the video, and not visible at the end. Somewhere in this 4-hour video, someone walks up to the bike and takes it out of the bike rack. You can use a binary search to find the moment that happens in this video because you can pick a frame and say “Ah, this was before the theft; the bike is still there” or “ah, this was after the theft; the bike is gone.”
Scenario B: The camera can’t directly see the bike rack, but can see the doorway you have to walk through to get to the bike rack. So somewhere in 4 hours of doorway footage, someone walks through the door, then a short time later walks back through the door with the bike. A binary search won’t help here because the door looks the same at the beginning or end of the video. A simple binary search won’t work here because the door looks the same before and after.
rekabis@lemmy.ca 11 months ago
This is the explanation that CosmicCleric needs in order to understand binary search.
Because as it is, (s)he’s failing abysmally at demonstrating any understanding whatsoever of that subject.
CosmicCleric@lemmy.world 11 months ago
I’ve written binary searches before.
null@slrpnk.net 11 months ago
Nah, they’re just gonna say you can use AI or something. They’re a troll; they’re not going to budge.
CosmicCleric@lemmy.world 11 months ago
I never said it works 100% of the time. This that it would work most of the time. And I make that statement based on the fact that usually the environment changes around the event, or the event happens long enough to be detectable, if not by humans, then by AI.
Im all of my comments I’m assuming that that focal point of the crime is visible.
But even if it wasn’t, if the person stealing the bike knocks over a trash can while doing it and that’s in the camera view it would still be useable. Or if a crowd congregates around the focus point and looks around for the bike, that would also make a binary search feasible.
That’s always just been my point, that a binary surgery more often than not works because most times the environment around the event changes in some way, from subtle to extreme.
captain_aggravated@sh.itjust.works 11 months ago
You would have to be confident that said change in environment was done by the bike thief. What if that knocked over trash can was done by some unrelated bored teenager twenty minutes after the bike was stolen?
It might be better to use some software to remove any frame of video that is identical to the one before it, no motion is taking place, etc. then manually watch the much shorter video of “only when stuff happens.”
DaleGribble88@programming.dev 11 months ago
I’m just a random guy stumbling across this thread hours after the fact. I want to say that after reading many of these comments. I feel like I’m starting to get a handle on what your position is. You aren’t wrong, but you are communicating your idea horribly.
Your position seems to be “Thankfully, many crimes do leave behind lasting visual cues, so you can still do a binary search for those situations if you are clever about what to look for.”
What you’ve actually been communicating is that “If there really was no lasting visual cue, then just find a lasting visual cue anyway, then do a binary search on that and it’ll work!” - It’s all about how you choose to present, order, and emphasize your comments. Your message is more than just the words you type. I hope this message helps clarify the debate and confusion for you and anyone else who stumbles upon this long chain.
CosmicCleric@lemmy.world 11 months ago
I appreciate you responding kindly, and your thoughts, thank you.
What I’ve been attempting to communicate, and I think have been expressing that, is that “no lasting visual cue” is not right (most of the time), its incorrect, and that there’s (almost) always a visual cue, and that you can do the binary search because there is. Not maybe, but there is, lasting visual cues (most of the time).
I disagreed with the point being asserted by the comment I initially replied to. I think people are getting hung up on my very initial comment, where I implied instead of being explicive, thinking my assumption was a well known one, just based on how I see the world operate (humans are messy). But how those replied to me seem that its not well known (or just not realized).
In hidsight, I should be more explicive, but that’s a horrible way to have to communicate, like if I have to pass every comment through a lawyer before posting it. You’d think people instead of instantly attacking would just have a conversation about try to understand my assumption. That didn’t come up until WAY later in the conversation tree, and only by a single person. There was way too many comments just attacking me with every hypothetical possiblity just to try and prove me wrong, and that, was wrong of them to do. Its not conversational, its bad group think.
I was just telling my wife that the other day, its how you say that matters as much as what you say. I’m actually a well spoken person (on a good day at least). I’m honestly going to blame some of the confusion not on me, but on others with their hypotheticals, and confluencing how you scan a video, with how you search for sections of a video to scan, as adding to the confusion.
Well, I think (saying this in 3rd person) what null was trying to do (gatekeeping censorship by telling others to not read my comments and calling me a troll) is really, really wrong. and bad for Lemmy, and I would have liked to have seen more people call him out on it, but instead he was rewarded with up votes. I truly don’t believe I deserved that, or that ANYBODY deserves that, and that his comment should be moderated.
And only because you mentioned it, I don’t feel confused, I feel anger. Anger over how I’ve been treated. It was just supposed to be a friendly conversation, expressing a counterpoint, and people responded by doing things they would not do in public to another’s face.