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

Programmer Humor

429 readers
15 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
 
top 50 comments
sorted by: hot top controversial new old
[–] teft@startrek.website 250 points 1 year ago* (last edited 1 year ago) (1 children)

Yeah, pigs don't like to be corrected. Or made to look like they don't know what they're doing.

[–] tquid@kbin.social 165 points 1 year ago (1 children)

And they absolutely hate ever doing anything about bicycle theft in particular.

[–] lars@programming.dev 22 points 1 year ago (3 children)

I reported my bike stolen in college and I got a call the next day that they had found it parked in front of a nearby church.

It was stolen on a Sunday. I guess someone didn't want to be late to service.

[–] thebuoyancyofcitrus 18 points 1 year ago

What you're entering the third act of your love story and you have to get to the church in time to break up the wedding and declare your love, what's a little bike theft? The universe will take care of it.

[–] Honytawk@lemmy.zip 7 points 1 year ago

Probably added the theft to the sins they were confessing that day as well.

[–] TheBlue22@lemmy.blahaj.zone 4 points 1 year ago

God made them do it!

[–] Pazuzu@midwest.social 112 points 1 year ago* (last edited 1 year ago) (7 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

[–] rckclmbr@lemm.ee 35 points 1 year 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

[–] psud@aussie.zone 16 points 1 year ago

History is about 10k years, the 200k years is mostly pre-history. People didn't write stuff down until they invented agriculture and needed to track trade between owners, workers, etc

Just watch at 3X!

[–] rekabis@lemmy.ca 4 points 1 year ago* (last edited 1 year ago)

Combine AI image/visual-pattern recognition and quantum computing, and this search could be completed before it was even started.

load more comments (3 replies)
[–] charonn0@startrek.website 75 points 1 year 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.

[–] DarkThoughts@kbin.social 71 points 1 year ago (3 children)

That's how I look for broken mods too. Move half of them into a temp folder, launch the game. If it works, put half of the sorted out ones back. if it doesn't work, remove another half and try again.

[–] Haus@kbin.social 7 points 1 year ago

When I want to see a broken mod, I just surf over to Reddit.

[–] MonkderZweite@feddit.ch 4 points 1 year ago (1 children)

Btw, this is why i have given up on Early Access on Steam; can't disable updates and have to fix your 100 mods then.

load more comments (1 replies)
load more comments (1 replies)
[–] frezik@midwest.social 69 points 1 year ago (1 children)

I'm a little surprised the police didn't already know about that method. Seems like they'd encounter enough CCTV footage that'd it'd be standard training.

I once again overestimate the training levels of the police.

[–] Laticauda@lemmy.ca 11 points 1 year ago

I imagine it's utilized in more "serious" investigations and they just can't be arsed for theft.

[–] TheBlue22@lemmy.blahaj.zone 67 points 1 year ago (1 children)

Police try to understand anything challenge (100% impossible) (gone sexual) (gone violent)

load more comments (1 replies)
[–] Localhorst86@feddit.de 39 points 1 year ago

"Exactly my point. We will not be investing an hour looking at the footage to pinpoint the time of theft, now get out!"

[–] rekabis@lemmy.ca 33 points 1 year ago* (last edited 1 year ago)

“This argument didn’t go down well.”

🤣🤣🤣 LMAO

What an awesome punchline, should have been on its own line for more impact.

[–] nullPointer@programming.dev 31 points 1 year ago (1 children)

just tell them there is a black man at the moment of theft, they will get on it lickety split!

[–] Cannacheques@slrpnk.net 3 points 1 year ago

Sad meme very relevant

[–] Alph4d0g@discuss.tchncs.de 31 points 1 year 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.

Na. If it's British police it's just an excuse. All they're there for after all these years of Tory cuts is to give you a reference number so you can make an insurance claim.

[–] tocopherol@lemmy.dbzer0.com 9 points 1 year ago* (last edited 1 year ago) (1 children)

You just have to say there was a weird technique the Nazi's liked to use.

They probably already know all Nazi techniques.

[–] groucho@lemmy.sdf.org 31 points 1 year 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 2 points 1 year 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

[–] groucho@lemmy.sdf.org 3 points 1 year ago

It's been ages, but we'd done rough calculations for the three controls so we roughly knew what we needed. Our teacher was big on manually tuning instead of just using formulas since he thought just running numbers "lacked artfulness."

So we grabbed a point and started searching around manually. I think we were just tuning the derivative portion at that point, trying to get a fast response without the system without it going chaotic and noisy.

[–] Kalkaline@leminal.space 29 points 1 year ago* (last edited 1 year ago) (3 children)

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

[–] jmcs@discuss.tchncs.de 25 points 1 year ago

What if you had to guess a number between 0 and 100 and the other person (or an application) only told you if the number is bigger or smaller? That's the form that's usually presented to CS students and most people end up figuring it out on their own. Then the trick is knowing how to generalize it.

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

It would have taken 5 minutes at most

[–] heimchen@discuss.tchncs.de 7 points 1 year ago

My Graphics card/ssd wouldn't be able to handle the skipping of such big files

load more comments (1 replies)
[–] HawlSera@lemm.ee 26 points 1 year ago (1 children)

Jesus fucking Christ, I know police are dumb, in fact if your IQ is too high you can actually be legally barred from employment as a police officer in the United States of america. Look it up. But fuck incompetence of these Jokers continue to tickle my asshole in a negative way

[–] cobra89 6 points 1 year ago

I fuckin hate cops as much as the next person but people love to spout this fact, but there is literally only 1 police department ever that has been documented doing this, and it was the one police department in Connecticut.

However the court did in fact rule it was legal, yes.

But the way everyone talks about it you'd think this was some super widespread policy that many departments use. And as far as I can tell there's only ever been the 1 example. It's the same case that every single article about it refers to.

[–] rgb3x3 25 points 1 year ago (2 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...

Even without algorithm knowledge it should be fairly obvious that you can just fast forward several minutes and check if the item has gone missing.

Not the most efficient solution, but beats watching the entire tape in real time.

You can now go back working there with this new secret technique.

[–] T1000@lemm.ee 24 points 1 year ago

Sounds about right. Cops have low iqs

[–] HubertManne@kbin.social 19 points 1 year ago

that dawn of humanity is only going to work if the rewind/fast forward is instantaneous.

[–] Dukeofdummies@kbin.social 15 points 1 year ago (1 children)

I mean, in the era of VHS this won't work because ultimately you're fast forwarding and rewinding. So you're gonna watch it anyway. but in the digital era I thought this would be what any Police officer did?

Like... they're not even gonna spend 10 minutes on a theft?

[–] Deceptichum@kbin.social 11 points 1 year ago

Like... they're not even gonna spend 10 minutes on a theft?

What and be responsible for paperwork?

Cops are the biggest bludges you’ll ever meet.

[–] 8000mark@discuss.tchncs.de 12 points 1 year ago

For anybody else looking for the source of this quote: https://archive.md/RyZI0

[–] andioop@programming.dev 6 points 1 year ago
[–] driving_crooner@lemmy.eco.br 4 points 1 year ago

I used to do this when having problems while rendering video in my past life.

[–] morrowind@lemmy.ml 2 points 1 year ago

That's a search algorithm, not sorting

load more comments
view more: next ›