this post was submitted on 28 Feb 2024
706 points (97.4% liked)

Programmer Humor

19564 readers
812 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
 
all 29 comments
sorted by: hot top controversial new old
[–] SlopppyEngineer@lemmy.world 46 points 8 months ago* (last edited 8 months ago) (5 children)

The car now phantom brakes for anything remotely suspicious, like a shadow from a tunnel or light fixture, causing numerous pileups behind it

[–] tryptaminev@feddit.de 18 points 8 months ago (2 children)

The rules for driving demand to keep at least enough distance to the vehicle before you, that you can safely perform an emergency break, if the vehicle should do so too.

In driving ed i learned that you need to keep at least 2seconds distance to the car in front of you, one second to react and one second to perform a similiar break maneuver like them. If your vehicle is heavier you need to increase that distance.

Whenever i drove like this the only result was people taking it as an invitation to swear in between the car in front of me and me. I want undercover cops in plain cars to just drive and record everyone violating the safe distance or takeing the space that is left as safe distance. We could resolve muncipal debt and drop the amount of deadly accidents by at least 50% this way.

[–] UndercoverUlrikHD@programming.dev 8 points 8 months ago (2 children)

Surprised to hear the rule is 2 seconds in Denmark, it's 3 in Norway

[–] tryptaminev@feddit.de 4 points 8 months ago (1 children)
[–] UndercoverUlrikHD@programming.dev 3 points 8 months ago (1 children)

Ah sorry, got it mixed up with feddit.dk I think

[–] jadero@programming.dev 3 points 8 months ago

Canada used to recommend 1 car-length for every 10 miles per hour. Along with metrification, that was changed to 2 seconds, but it's been set at 3 seconds for a long time.

I've yet to drive in traffic where even 1.5 seconds is manageable. More space than that and some slips into the gap, even if that leaves something like a loaded tractor-trailer hanging a second off their rear bumper.

[–] exocrinous@lemm.ee 5 points 8 months ago (1 children)

Cops can't solve bad driving. Fear of punishment is not an effective deterrent. We know this because we've done the psychology and looked at the numbers. Unsafe driving is an infrastructure problem. In my country, people leave enough space between cars. It's not because we have more police than yours, it's because we have safer designed roads. Every traffic accident that causes a death is an infrastructure failure.

[–] tryptaminev@feddit.de 4 points 8 months ago

It is both.

Germany often sees reckless driving compared to its neighbouring countries in similair road conditions. Lack of enforcement and small penalties do play an imporant role in that. The infrastructure is similiar, but other countries actually enforce things like speed limits much more actively. At the end of the day if bad driving equals unsafe driving, the person shouldnt drive.

[–] Clent@lemmy.world 6 points 8 months ago

No one can enter the vehicle because this is a collision. The vehicle automatically moves away from anyone that approaches it.

[–] NocturnalEngineer@lemmy.world 6 points 8 months ago (1 children)

Technically it's always hitting the road & air, so it simple just doesn't move.

[–] Hamartiogonic@sopuli.xyz 2 points 8 months ago

This has the way. A god strategy to minimize the probability of an accident is to never move at all. Someone else might still hit you though, but that’s their fault.

[–] nexussapphire@lemm.ee 1 points 8 months ago

That's nothing new, my mother's 2014 charger slows down to a complete stop if there's a crisp shadow of a bridge in the right place on the road.

[–] Graz@feddit.de 30 points 8 months ago (3 children)

The missile knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. The guidance subsystem uses deviations to generate corrective commands to drive the missile from a position where it is to a position where it isn't, and arriving at a position where it wasn't, it now is. Consequently, the position where it is, is now the position that it wasn't, and it follows that the position that it was, is now the position that it isn't. In the event that the position that it is in is not the position that it wasn't, the system has acquired a variation, the variation being the difference between where the missile is, and where it wasn't. If variation is considered to be a significant factor, it too may be corrected by the GEA. However, the missile must also know where it was. The missile guidance computer scenario works as follows. Because a variation has modified some of the information the missile has obtained, it is not sure just where it is. However, it is sure where it isn't, within reason, and it knows where it was. It now subtracts where it should be from where it wasn't, or vice-versa, and by differentiating this from the algebraic sum of where it shouldn't be, and where it was, it is able to obtain the deviation and its variation, which is called error.

[–] trashgirlfriend@lemmy.world 9 points 8 months ago

This is what mathematicians sound like to normal people

[–] And009@lemmynsfw.com 6 points 8 months ago

Hmm, attention deficiency kicking in

[–] jadero@programming.dev 4 points 8 months ago (2 children)

Add a bit of the right structure and you've got the pseudocode for dead reckoning. (I guess that was probably the point, but I'll hit the ol' post button anyway...)

[–] robojeb@lemmy.world 5 points 8 months ago

It's a copy-pasta :)

[–] nexussapphire@lemm.ee 4 points 8 months ago

Text formatting would go a long way.

[–] PhobosAnomaly@feddit.uk 27 points 8 months ago (3 children)
[–] GregorTacTac@lemm.ee 11 points 8 months ago

"Whatever you do, don't.

[–] HerbalGamer@sh.itjust.works 6 points 8 months ago

holy shit that's a cool project

[–] Mango@lemmy.world 0 points 8 months ago
[–] AVeryCleverName@lemmy.one 10 points 8 months ago

Import Driving.Self

[–] Mango@lemmy.world 4 points 8 months ago
[–] Mesa@programming.dev 3 points 8 months ago
try {
    Car.auto()
} catch (willCrashException) {
    sleep(Number.MAX_VALUE)
}
[–] CosmicCleric@lemmy.world 2 points 8 months ago

What, no null check on 'goingToHitStuff'?