this post was submitted on 30 Nov 2023
66 points (100.0% liked)

Programmer Humor

19486 readers
469 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
(page 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 11 months ago* (last edited 11 months ago) (13 children)

I thought this had to be hyperbole, so I did the math myself. I'm assuming human history is 200,000 years as google says, and we want to narrow this down to the second the bike disappeared. also that the bike instantly vanished so there's no partially existing bike.

each operation divides the time left in half, so to get from 200k years (6.311×10^12 seconds) to 1 would take ~42.58 divisions, call it 43. even if we take a minute on average to seek and decide whether the bike is there or not it would still be less than an hour of manual sorting

hell, at 60fps it would only take another 6 divisions to narrow it down to a single frame, still under an hour

edit: to use the entire hour we'd need a couple more universes worth of video time to sort through, 36.5 billion years worth to be exact. or a measly 609 million years if we need to find that single frame at 60fps

[–] [email protected] 3 points 11 months ago

I regularly bisect commits in the range of 200k (on the low end) for finding causes of bugs. It takes me minutes. Pretty crazy

[–] [email protected] 1 points 11 months ago

Just watch at 3X!

[–] [email protected] 1 points 11 months ago

Lemmy learns exponential math.

Mostly joking, thanks for doing the math.

load more comments (10 replies)
[–] [email protected] 2 points 11 months ago (1 children)

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.

[–] [email protected] -1 points 11 months ago (9 children)

If the event lasts only a moment and leaves no visual cue (e.g. an assault), then binary search is practically useless.

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.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

But you will see the event happen though.

Not with a binary search.

Edit: just collapse this thread and move on. Cosmic Cleric is an obvious troll.

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (4 children)

But you will see the event happen though.

Not with a binary search.

Yes you will.

A binary search is just what it says, it's just for searching only.

When you find that moment in time where the bike was there one moment, 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, and hopefully can identify them.

[–] [email protected] 0 points 11 months ago (1 children)

That doesn't apply to the comment you replied to.

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (1 children)

Yes, it does...

But you will see the event happen though.

Not with a binary search.

Yes you will.

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (1 children)

If the event lasts only a moment and leaves no visual cue (e.g. an assault).

How?

[–] [email protected] -1 points 11 months ago (1 children)
[–] [email protected] 0 points 11 months ago (1 children)
[–] [email protected] -1 points 11 months ago (1 children)
[–] [email protected] 0 points 11 months ago (1 children)
[–] [email protected] -1 points 11 months ago

Time does not need luck.

[–] [email protected] 0 points 11 months ago (1 children)

You either don't know what binary search is or you completely missed the context of this conversation

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (1 children)

You either don’t know what binary search is or you completely missed the context of this conversation

I'm a computer programmer. I know exactly what a binary search is. I've written binary searches before.

The search is to get you to the point where you can watch the video to see the crime happening, in hopes of indentifying the perpretrator.

[–] [email protected] 0 points 11 months ago (1 children)

Then you missed the point of this conversation

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (1 children)

Then you missed the point of this conversation

You're being intellectually dishonest, in an attempt to kill the message.

This is what was said in the origional OP pic...

You don’t watch the whole thing, he said. You use a binary search. You fast forward to halfway, see if the bike is there and, if it is, zoom to three quarters of the way through. But if it wasn’t there at the halfway mark, you rewind to a quarter of the way though. Its very quick. In fact, he had pointed out, if the CCTV footage stretched back to the dawn of humanity it would probably have taken an hour to find the moment of theft.

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (1 children)

Yes, but, as you noted in an earlier post, that isn't what you're responding to. The point of the post you stated you are responding to is: if an event occurs that leaves no change to the visual context before and after the occurrence, then binary search is ineffective.

The fact that you're wasting this much time trying to defend such a simple error is confusing. The reasonable response is, "oh, yes, in that particular case, binary search is ineffective."

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (4 children)

Yes, but, as you noted in an earlier post, that isn’t what you’re responding to.

I keep saying what I'm responding to, but you're trying to change the narrative of what I'm responding, to as a debate tactic.

Someone uses a debate tactic of mentioning an "one off" and then directing their whole conversation to that one singular point is not intellectually honest in the whole conversation being had.

The fact that you’re wasting this much time trying to defend such a simple error is confusing. The reasonable response is, “oh, yes, in that particular case, binary search is ineffective.”

And you don't think I can't tell when a bot network is using what I've said back to me for training their AI, and then repeating it right back at me?

load more comments (4 replies)
[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (2 children)

You didn't get what was talked about here. Re-read the topmost parent comment.

How do you binary search for two people arriving, one punches the other, they both leave?

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (2 children)

You didn’t get what was talked about here. Re-read the topmost parent comment.

I was responding to this ...

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.

I disagree with the "leaves no visual cue" part, as I've commented on. There's ALWAYS something caught on the video to help determine things. Maybe not enough, but never nothing.

load more comments (2 replies)
[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (2 children)

How do you binary search for two people arriving, one punches the other, they both leave?

In the same way the OP talks about it ...

You don't watch the whole thing, he said. You use a binary search. You fast forward to halfway, see if the bike is there and, if it is, zoom to three quarters of the way through. But if it wasn't there at the halfway mark, you rewind to a quarter of the way though. Its very quick. In fact, he had pointed out, if the CCTV footage stretched back to the dawn of humanity it would probably have taken an hour to find the moment of theft.

Instead of a bike, you look for the aftereffects of a fight happening (chairs knocked down, tables turned over, etc.). You can even look at how many people congregate around the location of the fight before and after the video as a 'marker' to the point of time the fight was happening/just finished.

Edit: One thing we didn't even mention, AI can also be used these days to notice subtle changes in the video. If a video is a static image of an alley, then two people walk in the alley and fight, even though they leave no traces behind, that moment of the fight is caught on the video with activity/movement. Motion sensor movement, basically.

[–] [email protected] 0 points 11 months ago (1 children)

Your adding things that would allow a binary search work, but the question was in a situation where the only evidence is the conflict itself

2 guys enter one guy punches the other guy they both leave. Nothing is moved no blood was created,

you could not use a binary search effectively to duduce when it occurred.

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (8 children)

Your adding things that would allow a binary search work, but the question was in a situation where the only evidence is the conflict itself

I'm describing the vast majority of fights that happen in the public. Also, you're trying to move the goalposts by focusing on a fight, when the discussion is about the theft of a bike.

Edit: One thing we didn’t even mention, AI can also be used these days to notice subtle changes in the video. If a video is a static image of an alley, then two people walk in the alley and fight, even though they leave no traces behind, that moment of the fight is caught on the video with activity/movement. Motion sensor movement, basically.

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (3 children)

I'm describing the vast majority of fights that happen in the public.

But the comment you replied to already addressed those fights, and bike thefts, and the vast majority of cases that you're talking about, by saying

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.

No one is moving goalposts. The parent comment said that binary search is useful in situations like bike thefts where visual cues are present, and not useful in situations where visual cues are not present.

In your hypothetical situation involving AI, the AI would use visual cues that are present, and so the situation is covered by the parent comment's second paragraph. In a situation where there are no visual cues for the AI to use, it would be covered by the third paragraph. They still aren't wrong about anything.

load more comments (3 replies)
load more comments (7 replies)
[–] [email protected] 0 points 11 months ago (1 children)

You are seriously confused. OP specifically said that you're fucked if there is no visual cue.

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (2 children)

You are seriously confused.

And you are seriously trying to kill the messenger.

OP specifically said that you’re fucked if there is no visual cue.

And I'm saying there's ALWAYS a visual clue/cue, always. Either the bike is there one minute and gone another, or a fight breaks out and trashes the place from the fight. In the vast amount of cases, there's always a visual difference.

And in this case we're talking specifically about a bike, going missing.

[–] [email protected] 0 points 11 months ago (1 children)

Ok but the text that you replied to, that you quoted, was "If the event lasts only a moment and leaves no visual cue (e.g. an assault), then binary search is practically useless." Emphasis mine. If you'd started out saying "there's ALWAYS a visual cue," then you likely wouldn't be getting dragged, but you started out arguing from this position without clarifying it, which makes it seem like you didn't know what you were talking about. You can't say that you can simply look for visual cues when the other person specified that there were none.

[–] [email protected] -1 points 11 months ago* (last edited 11 months ago) (1 children)

Ok but the text that you replied to, that you quoted, was “If the event lasts only a moment and leaves no visual cue (e.g. an assault), then binary search is practically useless.” Emphasis mine. If you’d started out saying “there’s ALWAYS a visual cue,” then you likely wouldn’t be getting dragged, but you started out arguing from this position without clarifying it, which makes it seem like you didn’t know what you were talking about.

Last time I checked, I'm allow to disagree with a comment someone made, and argue the opposite. Just because they say 'no visual cue' does not mean that is no visual cue.

You can’t say that you can simply look for visual cues when the other person specified that there were none.

Why, because you say so? Yes, I can. Of course I can.

Its called "disagreeing" with what the other person is speaking of, and countering. Its a discussion.

[–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (1 children)

Just because they say 'no visual cue' does not mean that is no visual cue.

It literally, explicitly does, because they are talking about a hypothetical situation where no visual cues are left. If no visual cues are left, then there are no visual cues to see.

Why, because you say so? Yes, I can. Of course I can.

Okay. I should have been extremely specific. You cannot rightly and correctly say that there are visual cues that could be found when the other person explicitly says that there are no visual cues to be found, because in the hypothetical situation that they've brought up, there would be no visual cues to find, and so while you are physically capable of stating the phrase "just look for the visual cues," or some variation thereof, you are incorrect in the assumption that there would be visual cues to find.

When somebody says "you can't say" followed by a statement that's incorrect, they aren't trying to tell you that you are physically incapable of saying that statement; rather, there is an implicit "correctly" or "honestly" between the "can't" and "say."

[–] [email protected] -1 points 11 months ago (3 children)

because they are talking about a hypothetical situation where no visual cues are left.

No, I am not. I'm disagreeing with that, and my comments are stating as much. I'm allowed to disagree with what someone is saying.

load more comments (3 replies)
[–] [email protected] 0 points 11 months ago (1 children)

Absolutely not true. Guy walks bye and shoots someone well offscreen. Momentary action with no visual cue before or after. Why are you arguing this useless point?

[–] [email protected] -1 points 11 months ago (1 children)

Absolutely not true. Guy walks bye and shoots someone well offscreen. Momentary action with no visual cue before or after. Why are you arguing this useless point?

The person dropping to the ground dead would be the visual cue.

[–] [email protected] 0 points 11 months ago (1 children)
[–] [email protected] -1 points 11 months ago (27 children)

If its all offscreen, then WTF are we bothing to talk about?

load more comments (27 replies)
[–] [email protected] 0 points 11 months ago (1 children)

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.

[–] [email protected] -1 points 11 months ago (1 children)

If the incident leaves no trail, you can’t know whether you can discard the left side or the right side

There's a moment where the bike is there, then another when its not. The whole video, either way, will either from the beginning up to the point of theft have the bike there, or NOT have the bike there from the point of theft to the end of the video. The marker is the removal of the bike from the video lens.

[–] [email protected] 0 points 11 months ago (1 children)

But the comment you replied to wasn't talking about bike thefts specifically, it was talking about unspecified situations that don't leave traces. You responded to someone saying that binary search doesn't work in situations that don't leave cues not by arguing against the premise (e.g. "but no such event exists, everything leaves cues"), but by telling them that you simply have to look for the cues from the hypothetical event that didn't leave any.

[–] [email protected] -1 points 11 months ago (2 children)

but by telling them that you simply have to look for the cues from the hypothetical event that didn’t leave any.

And my point is that the DID leave a clue that a binary search would pick up on, the disappearance of the bike.

load more comments (2 replies)
load more comments (8 replies)
load more comments
view more: ‹ prev next ›