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

Programmer Humor

25425 readers
1522 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 2 years ago
MODERATORS
 
(page 3) 50 comments
sorted by: hot top controversial new old
[–] potterman28wxcv@beehaw.org 0 points 2 years ago (2 children)

I do not get why it would work in that case. I assume the scenario is someone with a bike coming, doing theft, then leaving with the same bike.

Therefore there will be a period without bike, then a period with bike, then a period without bike again.

Let's assume there is no bike on the particular moment viewed. How do you know whether it occured before or after the theft? If you make the wrong decision, you get stuck on an endless binary search.. Unless you take note at each timestamp where you made the decision, draw a tree of timestamps, and go back the tree if your search is fruitless but that's much more complicated than what this post says.

load more comments (2 replies)
[–] rgb3x3@beehaw.org 0 points 2 years ago (1 children)

I'm realizing now that this would have been super useful when I worked in Loss Prevention way back when. Wish I had known...

load more comments (1 replies)
[–] groucho@lemmy.sdf.org 0 points 2 years ago (1 children)

The final project in my instrumentation class was to tune a PID controller for a hot/cold mixing valve. I (CS/ENG) was paired up with an engineering student and a lot of it was throwing parameters in, seeing if weird shit happened, and then turning down or up based on the result. I had a programming final and something else I was supposed to be studying for, so I just started doing a binary search with the knobs. We got the thing tuned relatively fast and my partner acted like I was a wizard.

[–] clericc@feddit.de 0 points 2 years ago (1 children)

How do you do a binary search for an open-end scale (are PID params open-end?) and three knobs at the same time when they interdepend in their influence? I need to know since i have a PID tuning on my personal projects plate

load more comments (1 replies)
[–] Mubelotix@jlai.lu 0 points 2 years ago (1 children)

It would have taken 5 minutes at most

load more comments (1 replies)
[–] Kalkaline@leminal.space 0 points 2 years ago* (last edited 2 years ago) (2 children)

God damn, whoever came up with that is clever. I would have never come up with that on my own.

load more comments (2 replies)
[–] Alph4d0g@discuss.tchncs.de 0 points 2 years ago (2 children)

I'm sure it didn't go well. If it was somehow framed in a sycophantic way where the police were led to believe it was their idea, I'm sure it would have gone better. Wait that might not be too difficult to do.

load more comments (2 replies)
[–] lingh0e@sh.itjust.works 0 points 2 years ago (1 children)

A police officer being unable to think in such a fashion is exactly why no one could solve the see-saw riddle on Brooklyn 99.

[–] Mr_Dr_Oink@lemmy.world 0 points 2 years ago (1 children)

How do you solve that? I saw a solution in the comments where it says to start with numbering all the people and butting 1234 and 5678 on the see saw, then it says if they weight the same then continue and that seems to work. But if they dont weigh the same it doesnt work and it doesnt say what to do in that case.

[–] adrian783@lemmy.world 0 points 2 years ago (1 children)

you can do it like you weight 6v6 then 3v3 then for the last weighing you weight the 2 out of 3.

or you weigh 4v4 to find out which grouping of 4 the light weight person is in, then do 2v2 and 1v1.

[–] ChairmanMeow@programming.dev 0 points 2 years ago (1 children)

You don't know if the person is lighter or heavier yet.

[–] Sagifurius@lemm.ee 0 points 2 years ago* (last edited 2 years ago) (1 children)

That's not the question. Either the scales balance, and the third is heavier or lighter, or the scales don't balance and you get both answers, but the question is purposely framed this way

[–] ChairmanMeow@programming.dev 0 points 2 years ago (1 children)

I mean that not knowing it is part of the question, and the proposed solution doesn't work without knowing if the person is heavier or lighter.

If you know if the person is heavier or lighter, the question becomes trivial.

[–] Sagifurius@lemm.ee 0 points 2 years ago (2 children)

The question is to figure out who is different, not how they are different. That takes one more step, half the time.

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