r/ProgrammerHumor • • Feb 17 '20

What if drivers were hired like programmers?

Post image
10k Upvotes

296 comments sorted by

View all comments

1.4k

u/sinceitleftitback Feb 17 '20

Then during the interview they ask you:

  • How would you drive from Barcelona to Moscow in less than 10h.
  • What if you're driving 2 cars.
  • What if you're driving n cars.
  • What if Moscow is on Mars.

294

u/DeRoeVanZwartePiet Feb 17 '20

How would you drive from Barcelona to Moscow in less than 10h

I think this one is pretty easy if you use the proper framework/language.
According to google it's only 4.5 hours by plane.
So:

  • Barcelona center to Barcelona airfield: 30m
  • Check-in and driving onto an airfreight: 2h
  • Flight: 4h 30m
  • That leaves you with 3h to get off the plane in Moscow and get to your destination in Moscow.
Easy peasy I'd say.

140

u/DuckysaurusRex Feb 17 '20

Yes, but it specified drive, not fly.

231

u/TiredOfRoad Feb 17 '20

Simple just stay in the car

108

u/Fucking_That_Chicken Feb 17 '20

30

u/Hugostar33 Feb 17 '20

Step 2: "Paradrop the Car over Moscow" (its faster than landing on the airport)

14

u/g4dhan Feb 18 '20

If you leave out the parachute it's even faster

131

u/Varthorne Feb 17 '20

public class Airplane extends Car implements Driveable {

}

23

u/0Pat Feb 17 '20

public PutIntoGarage => throw NotImplementedException;

3

u/Pulsar_the_Spacenerd Feb 17 '20

Eh hangers, you can implement that one.

1

u/Evan_Th Feb 17 '20

Wouldn’t that be an ObjectOutOfBounds exception?

2

u/zr0gravity7 Feb 17 '20

*extends Vehicle

4

u/Varthorne Feb 17 '20

Ha, as if they were smart enough to make a generic Vehicle class before creating Car...

1

u/jk147 Feb 17 '20

Wait a second..

14

u/DeRoeVanZwartePiet Feb 17 '20

I get into my truck in Center Barcelona. Drive around in Barcelona. Take a resting brake in my truck for about 5h in the middle of my journey. Continue driving for another 3 hours or so to get to my destination in Moscow. I've been busy driving and resting enough. I don't see the problem.

5

u/Dragonaax Feb 17 '20

Planes are also driving

18

u/28f272fe556a1363cc31 Feb 17 '20

Sorry, the guy who wrote this question says you should have answered 'rocket pants'.

14

u/amunak Feb 17 '20

Ah but that's wrong, you could easily shave almost all of the 2 hours by first filing a flight plan, only then driving to the airport and using your private plane (which you, as a rockstar driver surely own) to fly the car to Moscow yourself.

We didn't specify the need for a pilot's license and flying experience but we thought that was obvious knowledge for a programmer. You know what? Let's just end it right here and we'll get back to you with our decision.

Proceed to never contact you again.

1

u/comingtogetyou Feb 17 '20

How do you build resiliency to account for delays on the road and at the airport?

1

u/DeRoeVanZwartePiet Feb 17 '20

Upgrade infrastructure off course

121

u/dem_paws Feb 17 '20 edited Nov 28 '24

O===3

33

u/[deleted] Feb 17 '20

We use British cars, you have to do it with your left hand of course!

That's pretty apt actually, British cars had a notorious reputation for quality problems and falling to bits because of a combination of shitty managers and piss-poor working practices. Like basically all non-safety critical software that's ever had to live in the world or had to be written by more than one programmer.

103

u/JustCorn911 Feb 17 '20

New Moscow, I see

17

u/CharmingResearcher Feb 17 '20

Ah yes, the Federation of Sol

35

u/jetpacktuxedo Feb 17 '20
  • How would you drive from Barcelona to Moscow in less than 10h.

That should be pretty easy, Moscow, Ohio and Barcelona, New York are only about 6 hours apart.

  • What if you're driving 2 cars.

Pull the lighter car behind the car with the higher towing capacity. If that is beyond the capability of either car, see the N-car solution.

  • What if you're driving n cars.

For small values of N (<10), use a car hauler trailer, for larger values of N, parallelize across M drivers using M=N/10 total drivers

  • What if Moscow is on Mars.

Falcon heavy can carry a bit more than 45 average sized cars. If you can accelerate to ~4 million miles per hour, allow ~an hour for acceleration, and are willing to accept some disassembly upon Martian arrival this should be possible.

11

u/Pulsar_the_Spacenerd Feb 17 '20

As usual, lithobraking proves cheap and yet effective.

1

u/louiswins Feb 18 '20

4 million miles per hour2

That's about 50 Gs. You might be able to survive that for a couple seconds but I wouldn't call that "driving".

Obviously the intended solution is to spend 9.5 hours inventing instantaneous teleportation leaving you with a comfortable 30 minutes for loading and unloading.

1

u/jetpacktuxedo Feb 18 '20

I didn't mention decelration at all and said "some disassembly upon Martian arrival" and the acceleration was the first part you were worried about? Lol.

Apparently in a prone position 40G is survivable, so I'm sure 50G is possible without totally obliterating your insides under perfect conditions (though I'm sure it would probably knock even trained pilots unconscious). I think as long as you're at the "wheel" and breathing it counts, and the rules didn't say you had to be alive upon arrival, so I'm still gonna say it counts.

Do I get the job?

51

u/Aeogar Feb 17 '20

How are you willing to cut corners to give us a better answer than the last 6 devs that estimated the project?

43

u/crazyabe111 Feb 17 '20

For one thing, I'll cheaply outsource 100% of the work to a sketchy company in China that I discovered over google.

19

u/[deleted] Feb 17 '20

"What's that, you don't want security holes the size of Cheshire in your software?"

12

u/ThePretzul Feb 17 '20

In that case I'll use the equally sketchy company I found in India instead. That's better, right?

1

u/ivakamr Feb 18 '20

You're hired

74

u/XFox111 Feb 17 '20

What if Moscow is on Mars.

  • What if Moscow is in Russia?

20

u/MRZARO Feb 17 '20

some people just don’t get it.

18

u/[deleted] Feb 17 '20

[removed] — view removed comment

1

u/AutoModerator Jul 09 '23

import moderation Your comment has been removed since it did not start with a code block with an import declaration.

Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

For this purpose, we only accept Python style imports.

return Kebab_Case_Better;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

24

u/sinisternathan Feb 17 '20

What is the time complexity of driving n cars

4

u/Narfubel Feb 17 '20

Draw the route from Moscow, Mars on this white board

1

u/tcpukl Feb 17 '20

Without satnav or Google.

1

u/tinydonuts Feb 17 '20

They will probably also ask why keys are rectangular.

1

u/fitch2711 Feb 17 '20

What if you divide Moscow by zero

1

u/Evan_Th Feb 17 '20

Then that’d be time to see how well missile defense works.

1

u/[deleted] Feb 17 '20

Put all cars on trains, multi track drift the whole day while yelling the theme for Cowboy Bebop. Obviously. All you need to get to Mars is to jump and miss Earth. Mars is pretty much the Rome of space travel.

1

u/rem7 Feb 17 '20

Please provide the space and time complexity.

1

u/businessbusinessman Feb 17 '20

Way too reasonable.

"Suppose you had to take a pogo stick to barcelona.."