4 min read

Engineering Blog #1

Engineering Blog #1
Photo by K. Mitch Hodge / Unsplash

System Design Interview - Lord of the Rings edition

Interviewer: Hi!

Please be seated. Don't forget to leave your sword at the door.

We have a no-violence policy.

If that's a problem, please complain to the king.

Candidate: ....Not an issue, at all. Will do as you say.

Interviewer: Indeed.

We need a way to tell the kingdom of Rohan we will help them, if we care. What do you think we should do?

Candidate: I am sorry, ser, I need more details. How quickly do you need to tell them...Can't you dispatch a horse rider?

Interviewer: We can.

Candidate: ......Oh right, let's see if we can do better. Can we use Shadowfax?

It knows the meaning of haste, right?



Interviewer: Good point. Let's assume no divine intervention. For the purpose of this interview, no Gandalf either.

He's an asset that's unreliably late.

Canditate: OK. How about the Eagles?

Oh, wait never mind.

How about we keep a pile of wood every 2 miles....Then......

Every time the wood is lit, the beacons signal hope.

The wood can be pre-stocked, so there's no urgency in the crisis itself, even if we have the budget to help Rohan.

I forgot to ask....Are we helping them, or are they helping us?



Interviewer: Another good question...Please assume bivalency.

Candidate: The honor is mine.

We will need both stakeholders to be aware of this arrangement, to have an effect on the outcome.

Going back to the question of hope, we need piles of wood every 2 miles.

We need 2 men at every pile, in case 1 misses the signal, while using the restroom.

Think of it as a reserve system.

Interviewer: I know what to think, young lad. I need not be reminded.

Pray, tell me - what will you do if it rains?

Candidate: Rain is unlikely, since in my mind, I wanted the piles to be on the mountain range.

Being on the mountain range, it's unlikely anyone will try to disturb the process, unless they know exactly where to look.

Security is built into the process, through obfuscation.

Since we are not on good terms with Rohan anyway, we can put the important piles in towers, and just hope that the line of sight stands true, in times of actual need.

It's not like they will answer the call.....We are overthinking this.

Plus, based on these principles, and this is my pride, my liege:

  1. Fire starting is a known technology
  2. Fire ignites quickly
  3. Sight of light, travels fast

I am sure Rohan will know our situation, very quickly.

The power of information science is that a binary signal, in an array of beacons, can travel faster than haste itself.

Interviewer: This is a very nice idea. You are hired.

The king needs talent like yours.

I ask you this - what will we do if Rohan calls for aid?

Candidate: In that case, our men at home need to be informed through documentation that the fires should not be reset - that things are going according to plan.

For us, their danger is an alarm system, not a malfunction.

We need to initiate a global incident, and page the liege.

Interviewer: But what if our king decides to not help?


Candidate: I am but a lowly peasant....the workings of the king's mind are not for me to judge.

But since you asked, your question sounds like a management or business problem.

Interviewer: .....Right.

You solved the problem in the interview itself, and have clearly shown skills faster than shadowfax.

Please take this seal of approval, and show yourself out.

Candidate: Thankee, sire.

Candidate: .....There's a bug in my solution.

There's no protocol in place for the king to tell the first tower, to start the fire.

Plus, if the range is too much, then lighting a fire won't guarantee information transfer to the eyes.

Can the human eye, even see 2 miles apart? It's too late now.....Fate has moved on. The towers have been built.

What can I do?

What can anyone do in the face of authoritative royalty?

I will look like a fool if I point this out, and I will lose my job.

For every smart person like me, I have faith another fool exists to save the day.

Glory to Gondor.