I appeared in an interview and eventually failed to impress

Syed Sirajul Islam Anik
4 min readJul 8, 2021

--

From: https://unsplash.com/photos/W3Jl3jREpDY

Recently after sharing my “Open to work” post on LinkedIn, a few of my senior colleagues and friends suggested taking part in interviews and gather knowledge. I was afraid what if I don’t pass? I will feel embarrassed. But the suggestion made me think again. So, I decided to take part. Got a call from an interviewer last week and finally, I sat for the interview that week.

They were looking for a senior software engineer. They asked me to introduce myself. So, I did and after that, the interview began.

In the beginning, I told them that I am purely a backend developer. I lack knowledge of the front end. Thus they didn’t ask me anything about that topic.

During the interview, I was asked lots of questions. I couldn’t answer a few as I didn’t try them out by myself. I clearly said sorry.

But a few of the questions he asked, I answered correctly based on my knowledge. He disagreed with a few of the points. Just sharing the questions and answers here. Just in case someone else thinks that I am wrong can point it out. Otherwise who doesn’t know the answers, may get to know about them too. BTW, I don’t want to demean anyone. Not even saying the company name where I was interviewed. BTW, in the post, I will give you the basic answers and may include some of their answers/solutions too.

What is “Laravel” CORS?

It’s definitely not Laravel CORS. The CORS is a security feature of the browsers. To comply with the feature, you have to support it through the web application. CORS has nothing to do with Laravel term. He disagreed and I don’t know if he understood my explanation or not.

What is “Laravel” CSRF then?

CSRF is actually a web application security feature. Laravel implements it by default. Laravel does not own it.

What is the “Laravel” N+1 query problem?

N+1 is also not Laravel Specific problem. It’s more of an ORM-related problem. Laravel provides solutions to mitigate the issue through eager loading.

What is “Laravel” trait?

I couldn’t answer the question as something was asked even before answering it. The trait is a Language-specific feature. Laravel uses traits based on where they need them. I couldn’t answer the question due to some other questions that were asked.

Singleton vs Repository pattern, which one is flexible?

Depends on the usage. You’re comparing incomparable things.

Name some of the Laravel Service Providers.

I intentionally didn’t answer the questions. TBH, that’s not even a question. Even though I remember a lot, it’s not worth answering the question.

I have three different databases holding different tables. When a user makes requests, I have to join across multiple database tables, return the data to the user. Which consumes lots of database connections per request and sometimes overwhelms the DB. How would you resolve the problem?

I couldn’t answer exactly. But I suggested precomputing the data. Then serve the data whenever the user requests the data. In return, I asked for the solution. So the interviewer replied with “We merged all the databases into one. Now joining across tables doesn’t require multiple connections. Then we cache the data and then serve the user.”. I guess he didn’t consider my “precompute” suggestion.

Our application scales up to 20 instances at times. If we cache the data on one instance, the next request may reach any of the left 19 containers. How would you serve the cached data that time?

In general, if your application scales and you need to put the common data in one place and share between them. You put the data somewhere central like the Redis, and serve them from the central service.

Redis is more like a tool. Can you tell me any specific service?

After asking in detail, he wanted me to answer elasticache from the amazon web service.

How would you scale the cache service?

I actually don’t know. But my common sense said that if you’re buying a service from Amazon like elasticache, the scaling is done automatically by the AWS. You don’t have to do the scaling thing if the incoming requests increase.

If you didn’t carefully look into the questions, I put quotes around Laravel. As the term is not owned by Laravel. They are independent topics.

But surely I gathered knowledge. That’s a big help from the interview. Hope it’ll help me to reach my next endeavor.

If you’re reading this and think that I am wrong, make sure to leave a comment we can discuss.

Pretty much that’s all. ❤

--

--

Syed Sirajul Islam Anik

software engineer with "Senior" tag | procrastinator | programmer | !polyglot | What else 🙄 — Open to Remote