Technical Interview For Power And Glory

Anton V Goldberg
Geek Culture
Published in
4 min readMar 25, 2023

--

… and it’s time for another technical interview. I log into a Zoom meeting and the interviewer, a young bearded man in a t-shirt greets me.

Interviewer: We’ll start with a relatively straightforward technical question. Do you know fizzbuzz?

I: …

Interviewer: for all integers from 0 to 100 print “fizz” if the number is divisible by 3, “buzz” if it is divisible by 5, and “fizzbuzz” if it is divisible by 15. Otherwise just print the input integer.

Once of a sudden a vision of a rather different Fizz Buzz interview springs unbidden into my mind. A tribe of mighty warriors sits around a fire in a frozen land.

public class TheTribe {
List<Warrior> theGathering;

A sequence of foreigners, the agents of various noblemen and merchants, stands before the fire. They extoll the benefits of serving their masters, the values of their contract. However for a real warrior most of the words used by these people of trade mean nothing. Real warriors fight for glory. Sometimes they fight for power, but never just for money, which seems to be what the agents value and advertise the most. That’s why most of the speeches make no meaning to the tribe and elicit no response.

static class Meaning{
private static final int FOR_GLORY = 3;
private static final int FOR_POWER = 5;

public static final Meaning GLORY = new Meaning(FOR_GLORY);
public static final Meaning POWER = new Meaning(FOR_POWER);
public static final Meaning NO_MEANING = new Meaning(0);
private Meaning(int word) {}
public Meaning(){}
public static List<Meaning> translate(int word){
List<Meaning> translation = new ArrayList<>();
if(word%FOR_POWER == 0) translation.add(POWER);
if(word%FOR_GLORY == 0) translation.add(GLORY);
if(translation.isEmpty())
translation.add(NO_MEANING);
return translation;
}
}

Each warrior knows what he fights for. When he hears words that call to him, he screams his name to show that. Otherwise he says nothing: a true warrior is a man of action, not words. The tribe will go with the contract supported by most warriors.

final static String SILENCE="";
static class Warrior{
private String name;
private Meaning fightsFor;

Warrior(String name, Meaning figthsFor) {
this.name = name;
this.fightsFor = figthsFor;
}
String answerToCall(Meaning aCall){
if(isTheCallMeaningful(aCall))return name;
return SILENCE;
}
boolean isTheCallMeaningful(Meaning aCall){
return aCall == fightsFor;
}
}

Only the agents that hear some kind of response should stay. All others have no chance and no reason to stay at the camp. They must return to their masters immediately.

public TheTribe(List<Warrior> theGathering) {
this.theGathering = theGathering;
}
public boolean warParty(int call){
List<Meaning> meanings = Meaning.translate(call);
StringBuffer response = new StringBuffer();
theGathering.forEach(w -> meanings.forEach( m -> response.append(w.answerToCall(m))));
if(response.toString().trim().length()>0) {
System.out.println(response.toString().trim());
return true;
}
return false;
}

The image of the tribe, with a young warrior fizz, who fights for glory sitting next to the veteran buzz, who wants to be the next tribal warchief and is hungry for power, moves my fingers on the keyboard while the interviewer seems to be busy furiously Slacking on his phone.

 public static void main(String[] args){
List<Warrior> tribeCouncil = new ArrayList<>();
tribeCouncil.add(new Warrior("fizz",Meaning.GLORY));
tribeCouncil.add(new Warrior("buzz",Meaning.POWER));
TheTribe fizzbuzzTribe = new TheTribe(tribeCouncil);
for(int i=0;i<100;i++){
if(!fizzbuzzTribe.warParty(i))
System.out.println(i);
}
}
}

I: I am done.

Interviewer: … Our recruiters will be in touch with you.

I hear only silence.

At the start of the 2000s I worked at Amazon. Amazon was expanding with the force of a hurricane and the only way to catch up with the expansion was to hire quickly. Obviously, the only ready supply for this mass hiring effort are the college grads. However we had a problem interviewing freshly minted software engineers. With an experienced developer we could talk about projects that they’ve done, discuss requirements, limitations and their influence on the design and architecture. We could describe actual production problems and see how an engineer would go about solving them. SourceForge was wildly popular and many experienced developers contributed to open source projects. None of that was available for college grads. Asking them to solve production problems or design complex systems was also unfair and counterproductive due to their lack of experience. Then we hit on the universal approach to hiring them: just ask them to code known algorithms they were supposed to learn at the college. That way we could check several things at once: if they actually studied there, if they can write code etc. We also got a universal question to compare answers from many candidates and select the best.

What we didn’t expect was that the college grads we interviewed like that will apply the same technique while interviewing everyone. And so l33tcode (as interviewing all software engineers with whiteboard coding algorithmic puzzles devoid of business meaning) was born. These days practically everyone preparing for a FAANG interview will spend weeks if not months solving such puzzles. However the only thing these interviews select for is the ability to remember and crack them. That ability is often-times not a reflection of a candidate’s actual ability or company fit, and is a poor predictor of such. Fizzbuzz and similar l33tcode-like interview questions do nothing but waste everyone’s time and should be at the very least supplemented with the old methods for experienced programmers — interview questions that focus on what really matters for a business.

--

--