Whipping Up Tech Brilliance!

2023-10-20

Categoriestech

A thought I have been having recently has to do with finding new raw talent in tech. How do you interview somebody who doesn't have a CV or a portfolio of work to show you? How do you find the next big thing? Don't get me wrong, I am not saying that you should hire somebody without any programming knowledge, but how do you find somebody who has the potential to be a great programmer?

If you have somebody, for example, who is coming in for a summer job, or a work experience placement, how do you sound out if there is the right mindset hiding in there? I have been giving this some thought recently, and tonight I was at a tech networking event, and I was talking to somebody about this, and I have come up with a solution. It's a piece of cake!

The Cake Test

Explain to me how to make a cake.

So in this question, you are looking for a basic ability to break a process down into its component steps, and then to explain them in a logical order. This is a basic skill that is required in programming, and if they can't do this, then they are unlikely to be able to get into the mindset of a programmer.

Now make the instructions generic enough that I can make any recipe.

This is the next step, it is easy to make a set of instructions for a specific recipe, but can they make it generic enough that it can be applied to any recipe? This will show that they can think about the problem more abstractly. When programming, you are often taking processes that you have been through before, and problems that you have solved before and applying them to new problems. Taking a well-known process like cooking something, and abstracting it out to be generic is a good way to test this.

When mixing the batter, how do you know when it is mixed enough?

The concept here is if statements, or probably more accurately while loops.

1whilst(!batter.mixed) {
2    batter.mix();
3}

How can you make the baking process efficient and save time whilst doing it?

At this point, you are moving into a few different areas. Especially what I am thinking about here is multithreading or asynchronous operations. Would they put the oven on to warm up whilst they are making the batter? Would they put the cake in the oven and then start washing it up? Would they start washing up whilst the cake is in the oven? This is a good way to test their ability to think about the process as a whole, and not just the individual steps.

1function turnOnOven() {
2    return new Promise(resolve => {
3        oven.turnOn();
4        resolve();
5    });
6}
7
8function waitUntilTemperatureIsReady(targetTemperature) {
9    return new Promise(resolve => {
10        const checkTemperature = setInterval(() => {
11            if (oven.temperature > targetTemperature) {
12                clearInterval(checkTemperature);
13                resolve();
14            }
15        }, 1000);
16    });
17}
18
19async function makeCake() {
20    await turnOnOven();
21    console.log("Oven is on.");
22
23    await waitUntilTemperatureIsReady(180);
24    console.log("Oven is ready! Let's make a cake.");
25}
26
27makeCake();

How can you deal with different ingredients in the same recipe?

Maybe I'm getting really abstract here, but I think this leads into types and type guards

1function mixIngredients(ingredients: Ingredient[]) {
2    ingredients.forEach(ingredient => {
3        switch (ingredient.type) {
4            case "liquid":
5                pour(ingredient)
6                break;
7            case "powder":
8                sprinkle(ingredient)
9                break;
10            case "egg":
11                crack(ingredient)
12                break;
13        }
14}
15}

I'm sure I could expand on this, anyone who knows me knows that I love a good convoluted analogy, but I think this is a good start. Do you have any thoughts on how this could be expanded? If you have any other ideas for questions that could be asked then please let me know. As said before, I'm not asking them to write any code in this, this is specifically just to test thought processes and if they can think about some abstractions of code design, and the code examples are just to show how I would think about the problem.

I haven't even started on relational database design and how they would organise the fridge, or what stack of kitchen appliances they would use to make the cake. Maybe I might be getting a bit carried away now.

I've got another good analogy about a mechanic and change control/QA, but I'll save that for another day.