There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Kalkaline , in Programmer tries to explain binary search to the police
@Kalkaline@leminal.space avatar

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

fsxylo ,

waves magic wand computer science!

systemglitch ,

Honestly you probably do it already without thinking about it when trying to figure out where you left off a video that you never paused.

Or if you ever had VHS tapes, or so e from of disc media… perhaps a cassette when looking for a particular part of a song.

Maybe not as methodical as perfectly breaking it down into halves of halves, but xlos enough to help you pin point what part you are looking for.

Pamasich ,
@Pamasich@kbin.social avatar

I'm pretty sure they were using sarcasm.

Kalkaline ,
@Kalkaline@leminal.space avatar

I’m pretty sure I was serious. I don’t know how people can be that clever. It seems simple once it’s explained, sure, but I wouldn’t be able to come up with that on my own without someone else giving me a problem that points me in that direction.

khannie ,
@khannie@lemmy.world avatar

Studied this in computer science algorithms class waaaaayyy back in 1996 and by golly this one stuck with me. It’s so simple and so effective.

jmcs ,

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.

acceptable_pumpkin , (edited )

Some security camera systems have this built in. They show snapshots of various times where you choose the total period, say 24 hours. Then you glance through the snapshots that are all displayed at once on the screen and click on the last one where your bike was still there. That will then “zoom in” the timeline and show another set of snapshots, though this time within a smaller total time window. Keep clicking on the last panel with the bike, and it will soon show you the clip of the bike being stolen.

Really helpful to find out when something changed.

dudinax ,

Yeah, there’s no reason it should take an hour no matter how long the tape is.

justJanne ,

If you’ve got 14 billion years, a theft takes a minute, then you need 53 recursion levels of binary search to find the moment of the theft. (14 billion years can be split into about 7.3e15 1-minute segments, 53 levels of binary search allow you to search through 9e15 segments)

That means OP assumed that it’d take 1 minute to decide whether at a certain still frame the theft had already occured or not, to compute the new offset to seek to, and the time it’d take to actually seek the tape to that point.

Not an unreasonable assumption, but a very conservative estimate. Assuming the footage is on an HDD and you’ve got an automated system for binary search, I’d actually assume it’d take 5 seconds for each step, meaning finding a 1min theft on 14 billion years of footage would take 5 minutes.

Anemia ,

According to my napkin math it would take longer than an hour if the tape was ~3.3*10^218 sec long (or three million trillion trillion… (18 trillions) …trillion years). Assuming you have only have two options to choose between but can pick which alternative in in 5 seconds (2^720) and you want to get down to a 1 minute intervall.

So i mean its not impossible to find a tape long enough though it seems unlikely that we would be so off in our estimates of the age of the universe.

ODuffer ,
@ODuffer@lemmy.world avatar

Enhance…

ReplicantBatty ,
SmoothLiquidation ,
Cannacheques ,

Covert zorb ball carrying remote control toy racecar through the HRV system

glibg10b ,

Without binary search, we would not have search engines today

CmdrShepard ,

Works the same for finding a burned out bulb on a string of Christmas lights too.

T1000 , in Programmer tries to explain binary search to the police

Sounds about right. Cops have low iqs

buzz ,
@buzz@lemmy.world avatar

Its likely just a fake story, omitting key details to make the web assembler feel better about his CSS skills.

spark947 ,

Yeah, seriously. What is even the context of this? We have no idea. The cops might have been like “We need a warrant to look at that footage you idiot.”

kablammy ,

Whoever owns the camera presumably has an interest in reducing/solving crime in the area (why else have cameras?), so they would likely be happy to make the footage available to police if asked nicely, with no warrant required.

spark947 ,

Yeah, in general, but not necessarily in that circumstance. A lot of time talking to tech people (I’m a softwar engineer) they can can be smug about this while leaving out important context.

DroneRights ,

No, I’ve been in this situation as a victim. My bike was stolen and they said it would take hours to search the CCTV. I told them about binary search, they didn’t understand.

usernamesaredifficul ,

more importantly cops don’t actually give a shit about solving crime.

In England the police primarily exist to keep noise down in middle class areas. I assume it’s even worse in America

tocopherol ,
@tocopherol@lemmy.dbzer0.com avatar

That is their primary purpose here too but it just requires more violence and subjection, Americans are extra noisy.

potterman28wxcv , in Programmer tries to explain binary search to the police

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.

Aatube ,
@Aatube@kbin.social avatar

To me it sounds like they stole the bike.

potterman28wxcv ,

Thanks indeed I misunderstood the problem

SexualPolytope ,
@SexualPolytope@lemmy.sdf.org avatar

You’re making this way more complicated than it actually is. The guy definitely can give estimates for when he parked the bike and when he found out that it was stolen. It’s not that complicated.

potterman28wxcv ,

I misunderstood the problem. I thought the thieve came on bike to steal something. I did not get that the bike itself was what got stolen.

skydivekingair , in Programmer tries to explain binary search to the police

In Artillery you call it bracketing/straddling.

khannie ,
@khannie@lemmy.world avatar

Binary boom

mosiacmango ,

It’s called bracketing in electrical engineering as well for troubleshooting.

Witchfire ,
@Witchfire@lemmy.world avatar

“Hmm still no magic smoke, double the current will you Jeeves?”

khannie ,
@khannie@lemmy.world avatar

Fried electronics have such a unique "“oh fuck” smell

merc ,

The smell of the magic smoke that gets released from the electronics, preventing them from working.

CynicRaven ,

Called half splitting in troubleshooting terms when I was in the Navy.

ErrorF002 ,

Half split bracketing was the term I learned in aviation electronic school in the Navy.

sfbing ,

That’s an analogy that might appeal to the LE types.

towerful , in What's your most obscure binding?

I guess the obvious one is “holding spacebar for control key”

andrew ,
@andrew@lemmy.stuart.fun avatar

Look, my setup works for me. Can you please just add an option to reenable spacebar heating?

Crul ,

Reference: xkcd - Workflowxkcd: Workflow
https://xkcd.com/1172/Hover text: There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.

JokeDeity ,

This is me. I will find a way to make it work, it will be janky, and any update is liable up throw the entire thing into disarray.

intelati ,

That’s horrifying

DroneRights , in Programmer tries to explain binary search to the police

I was in exactly this situation. My bike was stolen, there was CCTV, they said it would take hours to go through the time during which it was stolen.

captain_aggravated ,
@captain_aggravated@sh.itjust.works avatar

“Can I have a copy of the recording?”

DroneRights ,

That’s what I said, and they said no

DarkThoughts , in Programmer tries to explain binary search to the police

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.

Weirdfish ,

This is all fine and good till it’s a conflict between two specific mods. Damn you FO4 on PS4, why you gotta be like that?

DarkThoughts ,

You would still at least figure out one of the conflicting mods and could look for updates / further information about conflicts.
Edit: On PC that is.

Zehzin ,
@Zehzin@lemmy.world avatar

Then it’s even easier, just remove one of them

Shyfer ,

You can put mods on the PS4?

Blamemeta ,

A very limited amount.

SmoothLiquidation ,

Just enough so that you could get a conflict between two of them.

ezures ,

Bethesda made mod workshop worked on the consoles, so you could share the pc made mods.

Small setback that it didn’t support script extender, so it was quite limited. Still better than no modding tho.

v4ld1z ,
@v4ld1z@lemmy.zip avatar

To add to your answer, Skyrim also supports mods on PS4/5 and there are even a couple really useful ones. Stuff like the Unofficial Skyrim Special Edition Patch exists, for example.

Weirdfish ,

I have had a much better time w Skyrim mods than FO4 on the PS4 as far as stability goes.

Weirdfish ,

I only have it on PS4, and yes there are lots of mods in the workshop. There are obviously limitations.

Every few months I try installing various mods to make what I want out of it, darker nights, flashlight mod, weapon and armour changes for a more hard core experience, etc, and end up with 15 or so mods installed.

Start a new hardcore mode, get just about past diamond city, and the game invariably starts crashing.

No idea which one or ones are causing the issue, and in the end I get annoyed and go play something else.

Haus ,
@Haus@kbin.social avatar

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

KSPAtlas ,
@KSPAtlas@sopuli.xyz avatar

Yeah, pretty great in my minecraft modding experience

EvolvedTurtle ,

I was looking for this specific comment lmao

MonkderZweite ,

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.

DarkThoughts ,

I love Steam, but the fact that you cannot permanently disable auto updates for specific titles is definitely infuriating.

Elon_Musk , in Programmer tries to explain binary search to the police
@Elon_Musk@hexbear.net avatar

What are we supposed to believe this is some sort of magical VCR?

psud ,

Most security cameras record mpegs to hard drives

HiddenLayer5 , in Programmer tries to explain binary search to the police

Pfft, didn’t even try to enhance the footage. They’re obviously not cut out for forensics work.

FALGSConaut , in Programmer tries to explain binary search to the police
@FALGSConaut@hexbear.net avatar

Their method actually does make sense, you just have to remember they aren’t cops to solve (boring) crimes like petty theft. Why get it done as efficiently as possible when you can milk it for hours of overtime? 12 hours of footage means 6+ hours of overtime even watching it at x2 speed, and it’s the kind of thing you can basically have going on in the background. Cops being willfully ignorant for their own benefit makes sense to me

mosiacmango ,

You know what’s even better than milking it for 6hrs of OT? Saying its “to hard” to the victim, going home and then lying about doing 6hrs of OT and getting paid anyway.

Cops lie about OT systemically. Its absolutely rampant. The only consequence they ever get is either a few hrs suspension without pay or fired, and most states are happy to hire them next door immediately so they can do it again.

Linssiili , in My Journey

Give kagi a try, if you haven’t yet.

andrew ,
@andrew@lemmy.stuart.fun avatar

Definitely worth the money imo. No ads is a weird experience.

lemming741 , in Programmer tries to explain binary search to the police

When troubleshooting physical systems, it’s called half-splitting

www.ecmweb.com/…/the-beauty-of-halfsplitting

Ilovethebomb ,

This is fault finding 101 for fire alarm systems.

comrade_pibb , in Programmer tries to explain binary search to the police
@comrade_pibb@hexbear.net avatar

acab

kirby ,

all cops aren’t binary-searching

iAvicenna , in Programmer tries to explain binary search to the police
@iAvicenna@lemmy.world avatar

Oh yea this is how I managed to convince our building management company to identify bicycle thieves in our communal garage.

dejected_warp_core , in Programmer tries to explain binary search to the police

This didn’t go down well.

IT consulting pro-tip: Customers would rather pay for your time and expertise, than be made to feel stupid that they didn’t think of something so simple themselves.

mwknight ,

After working in desktop support for a year after college, I realized that people just wanted their problem solved and to not feel frustrated. That realization made my job immensely easier because I pivoted from copying a file in 30 seconds and walking away to talking to them a little bit and letting them feel good after we were done. My ticket closing speed slowed down a little but people felt better and I consistently got positive feedback.

BakedGoods ,

When I started in support 15 years ago my boss said: “First you solve the person, then you solve the problem”.

He was a good dude.

bleistift2 ,

What would you recommend for solving people? Does a household base like NaOH suffice?

moody ,

Solving, not dissolving.

CompN12 ,

Customers typically stop complaining once in aqueous form.

moody ,

What about in soap form?

bleistift2 ,
Riven ,

Dude same here. I usually say stuff along the lines of ‘yea it took me forever the first time to figure it out’ or ‘it’s a common issue that a lot of people have, I’ll get it sorted in a sec for you no problem’. Make it seem like they’re not stupid, regardless of the truth and then fix it, keeps em happy and more willing to cooperate with you as well.

I also talk through what I’m doing and if they show interest I’ll teach them so they can fix it in the future, ‘ah I’ve seen this before, took me like a hour to figure it out on my computer, for me it was a chrome update that broke how downloaded files open. Here let me right click the file, and go to open with, we hit Adobe pdf and check the always open with this program button, that should do it let’s test it out. OK seems like its good to go. Let me know if you have any more issues’. If they don’t show interest then it’s no problem.

meathorse ,

Are you my kindred spirit!? :P Thats almost exactly what I do too!

My favourite is when someone apologies for not knowing something or having dumb questions. Apart from “there is never a dumb question” because there usually isn’t, I typically respond with “if everyone already knew how to do everything, I’d be out of a job” which always seems to go down well.

deweydecibel ,

Some of my favorite help desk moments are those times you get to a be teacher for someone that’s genuinely listening and happy to learn.

Taleya ,

My go to is usually ‘everything is easy if you know how to do it’

dejected_warp_core ,

Same story here, actually. I cut my teeth on internet telephony (modems) support for an ISP. People would call up furious about not being able to connect. I learned that chatting people up during a long Windows reboot did a lot to humanize their struggle and get them to calm down and loosen up. First few times were organic, then I started looking for pretenses to do this, just to bring the temperature down for the rest of the call.

deweydecibel ,

Call centers tell you to empathize but that’s not something you can teach. You can either do it or you can’t. So they give those terrible scripts, and then some of them require you to speak the scripted lines, even when you know all it does is piss the caller off.

No hears that scripted pablum at the start of call and thinks it’s genuine. No one. “I’m sorry to hear your having issues sir, but I’ll be happy to assist you.” genuinely comes off condescending at this point. They know you know it’s scripted, they know you know the representative has to say it, but they make them do it anyway.

Here’s what I found doing ISP call center work, and it worked virtually every single time: imply through tone and pointed comments you’re as frustrated as the called with how shitty the service and the hardware is. They’re never prepared for it, it always catches their anger off guard.

Don’t outright say “Yeah, Cox is absolute dog shit, and that POS gateway we make you pay for isn’t worth the cost of the the technician we’re sending out to ‘fix’ it.” You’ll get in trouble for that.

But if you’re careful and creative, you can make them appreciate you think that

xantoxis ,

Eh, it’s less intuitive than you might think, as someone who already knows how to do it.

I once had to explain this process to a software engineer who was quite senior to me. The guy wasn’t any idiot, he was a pretty competent engineer, he just didn’t know this trick.

The cops might even already know how to do it, they just don’t want to, because they’re cops.

ICastFist ,
@ICastFist@programming.dev avatar

Just yesterday, I was helping this manager set up a new system of ticket line (the kind where you get a ticket number and wait for it to be called in a panel). He complained that they didn’t have a proper printer just for these tickets, so he made the tickets in excel and printed them. To the right of the number, someone would mark the service, from a list of 6.

“Why not use a single letter prefix and print different piles of passwords? (A01, A02, A03; B01, B02, etc)”

That’ll use too much paper. We’ll also need more tickets than before

“That will use less paper, you can print 2 tickets using the same space. Also, the amount of tickets always depends on the number of people that show up, but you’ll have a better idea of which service is being needed each day”

Mr manager didn’t like the idea and moved on to another problem.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines