I Never Had to Reverse a String in My Career! Why do these questions still come up in Interviews?

I Never Had to Reverse a String in My Career! Why do these questions still come up in Interviews?

Are such questions relevant?

Many such questions that might not have any real use-case are often asked during the hiring process. And you might feel —

“Why should I know that? I never had to do this in my career and probably will never do.”

Let’s go back a bit in time. When you study Computer Science, you might have a feeling that many subjects are not worth learning. Why do they teach these subjects? Automata theory, Compiler design, and algorithms are a few of them.

If you are good at writing code and able to build software, why do you need to learn such subjects when most high-level languages have built-in methods for such algorithms.

Don’t reinvent the wheel

Today, most high-level languages provide features that we had a hard time implementing in low-level languages.

Let’s take the example of stacks and queues. We had to implement them in low-level languages like C, and C++. But you get these features served on a platter with languages like Java or Python.

The garbage collector takes care of all memory deallocations in all modern languages while in low-level languages you need to manage the memory yourselves.

These advances help us to build more complex systems with little code than ever. Slowly we forget about these concepts and only care about their usage.

Do we still need to know such concepts?

The answer is not binary.

Algorithms are an integral part of Computer Science. Knowledge of algorithms and design patterns helps you design software in efficient and proven ways.

But many questions that have been asked during the hiring process are tricky and it’s a matter of you knowing them or not.

I don’t think you should spend time on such tricky questions. But if you train your mind to solve complex problems and puzzles you might be able to crack such questions in no time. Solving complex problems and puzzles create patterns in your brain that provides you with new ways to look at the problem at hand and solve it.

Do low-level concepts help you with high-level languages?

In my experience, the answer is a big yes. I started my career by implementing complex mathematical models used in circuit simulators. Then I switched to embedded systems and wrote firmware that used to run in a few kilobytes of memory.

These hardwired low-level concepts and an efficient way of writing code in my mind. A few years later I switched to writing web services and web applications.

The hardwired concepts of my early career have always been the patterns I refer to even when I write high-level code. I always look at these concepts to how to write efficient and optimized code.

Wrapping Up

I think the hiring process in most places is old-fashioned and screwed-up. Probably the best way to hire is to work with the candidate for a couple of days. But this idea is far-fetched as no one has the amount of time required.

The role of www, Google, and Stack Overflow in today’s programming world can not be undermined. The problem you are seeing might have a solution on the internet. Nevertheless, you need to tailor it to your needs. We should keep this in mind in the hiring process.

Comments are closed.