Interview question

How would you set up a system that facilitates large downloads over low bandwidth networks with possibly many clients making requests from your server. Was asked this in an interview today, wasnt sure how to respond.

I mentioned fs and readline. Said id probably set up a stream where the server might somehow keep track of how much the client had recieved, but told the intervewer that I didnt really have experience doing that.

Is there a part of the curriculum that teaches this?

Yeah, it sounds like they’re looking for a higher level answer. I wouldn’t know how to answer that either. I’d say something, “I don’t really know, I’ve never worked on that type of a system. I would look forward to the challenge of learning something like that.”

Sometimes you interview for jobs that want something that you don’t have. That’s just life. Sometimes you interview for jobs that want something that you don’t have but can work with it.

But when this happens, it is a chance to learn something new. Every time you can’t answer a question, find out how.

As far as a technical explanation, perhaps someone smarter than me will pipe in. I’d be interested in hearing the explanation.

1 Like

I think that is beyond the scope of what FCC teaches.

I think your answer was ok considering you didn’t know what the answer was. And probably felt out of your depth.

However, questions like these aren’t expecting a “right answer” necessarily. The idea is to get you to think a bit and have a conversation to expose how you think about problems.

My response to questions like this is to literally think out loud.

I would start with, “Ok, let me think about this…”

Then I would start to talk out loud about the problem. Usually I start by restating it in my own words and ask them to confirm. I might ask questions like, “Can you be more specific? How large is “large” and how “low” is “low”?” or “How many clients specifically would be connected concurrently?”.

I would talk out loud as I try to understand what the actual problem is. A good start would be to just talk out loud about what actually happens when you download a file from a server and what problems there might be if you were to add the parameters from the problem into the mix.

And then once I’ve thought of 1 or 2 problems then ask if I understand it correctly. For example: “Is the concern that there would be too many connections open on one server at a time?”

If I don’t understand the problem I’m solving I’d ask if they can explain it to me. Which is a normal thing you actually have to do all the time as a developer.

Once I know for sure that I understand the problem then I’d try to think of ways to solve it. Again, talking out loud the entire time, sharing my thought process with them.

And whatever answer I come up with, I’d be sure to ask them how they think the problem should be solved and why. Because a) you might learn something. And b) you might get an opportunity to deepen the discussion, suggest alternative solutions, poke holes in each others ideas (respectfully) etc, which is ultimately what the interviewer is trying to get out of you.

1 Like

I’d start by clarifying a few things:

  1. What do you mean by “large”, and “low bandwidth” networks.
  2. What would a satisfying experience be? IE if you’re in a low bandwidth network, what would you expect the experience to be if you say tried to upload to youtube. Odds are bound to be slow, if this is unsatisfactory it might not be possible to build a satisfactory solution at all.
  3. What would be an example of a use-case of this sort of situation? I only ask because optimally an offline solution might be better, where you only upload large downloads once you on a more stable/consistent network. This should prevent the user from waiting/having-to-wait for hours to upload. Lots of “bandwidth demanding” mobile applications take this approach where they prompt you to wait for a more stable connection.

The question is very vague on purpose. It’s more to see how you approach a vague real-world problem. As one of the worst approaches is to start building things without understanding what you’re building them for.

The best answers are usually more questions where you mix in the limits of your knowledge. This way you should understand the question’s scope/detail and understand your own knowledge of solutions.

This is more of a systems engineering or software architecture problem, but probably presented more as an entry point into seeing how you deal with more vague questions, than a serious technical question.

1 Like

Everything your saying make sense, though I am reading articles like “I failed 100 technical interviews and now I work at GoogleFacebookTwitterFlix etc…” or “60+ interviews in 30 days etc…” when in reality its super rare to actually get an interview.

There are hundreds of recuriters messaging me on linkedIn for jobs with all sorts of requirements although my linkedIn profile has the title “Looking for job as a Junior React or Node.js Developer”.

For sure the more you interview, the better you would get at interviewing. FCC has a wonderful curriculum but doesn’t teach those skills. Additionally, who knows what empolyers are actually looking for, one wants java, .Net, another wants C#, jenkins, distributed systems, kubernetes, kafka, another one only cares about SQL. What should one focus on?

Their process consisted of an initial screening with a recruiter, followed by a Hacker Rank, followed by that interview with their tech lead where he asked those systems engineering questions your mentioning. The recruiter told me that the tech lead was just going to go over the hacker rank solutions I wrote, although he never touched upon them.

Interview:

Q: What is express and why would you use it? is it necessary to use express?

A: It is a back end framework that helps you write server side code. No its not necessary to use express though it takes care of alot of boiler plate code for you.

Q: What is async await and why would you need it?

A: it is a way to write asyncronous code in a way that looks synchronous, I spoke about callback hell, .then, promises, try catch, Promise all, Promise race etc…

Q: Tell me about relational databases vs non-relational databases

A: I spoke about Normalization, foreign keys, Schema structure etc…

follow up; how would you use a non-relational database if you wanted it to behave like a relational database? In other words if you dont want to embed a bunch of sub documents in a document what would you do?

I told him thats an anti-pattern and explained that in noSql you would normally have:


user #1

id:1

name: John Smith

tweets: [ "hello World", "I am a react app" ]

user #2

id: 2

name: Jane Hendrix

tweets: [ "I love using node.js"]

etc...

if you really wanted to decouple and make it look like a relational database you could do:


Collection Users

user #1

id:1

name: John Smith

user #2

id: 2

name: Jane Hendrix

etc...

Collection Tweets

Tweets : [

{text: "hello World" , userId: 1},

{text: "I am a react app", userId: 1}

{text: "I love using node.js", userId: 2}

, etc... ]

or slightly less decoupled:


Collection Users

user #1

id:1

name: John Smith

tweetIDs: [ 1,2 ]

user #2

id: 2

name: Jane Hendrix

tweetIDs: [ 3 ]

etc...

Collection Tweets

Tweets : [

{text: "hello World" , id: 1},

{text: "I am a react app", id:2}

{text: "I love using node.js", id: 3}

, etc... ]

When he asked me how to facilitate a low bandwith high capacity download system , I told him what I thought but admitted that I really didnt have experience doing such things, upon which he ended the interview 20 min early.

On a positive note, another company had me go through a similar interview structure; initial screening, 2nd round basic coding (general), however, the third round was more of a React specific coding challenge. Pretty simple stuff. A variation of a todo app with some minor modifications:

Get Junior Developer Job → Get Senior Experience → Get Junior Developer Job ???

As a side point what does a QA engineer do? On Freecodecamp, the QA engineer qualification requires coding, yet I know of people with zero experience and went from zerot tech skills to completing four month bootcamps as QA engineers, some got jobs at legit companies, with great salaries, and they still don’t know how to code (maybe they know how to use postman and check responses? ). Ive discussed very simple algorithmic problems with them, and its clear that they have dont have experience working with these types of things. Are they basically paid to manually go through the UI and report what they find?

Can you recommend any bootcamps or programs where you can get real world experience, dont force you to start from level 0, teaches you how to interview, provides continued support, and most importantly, has connections in the industry?

FCC has very few issues on their repo with label “Help wanted” that don’t already have pull requests.

depends on their level and what they are required to test.
In general I would expect them to be able to code scripts and be familiar with various operating systems (all the ones my product runs on for eg as well as the ones it is developed on). They need to be able to break stuff (that means they need to read design documents and find possible weaknesses or they need to be able to think of every edge case there is and code for that test). They need to be good communicators, as they have to explain their test and the bugs they found to someone who may not be in the geographical location.

They may need to be familiar with specific unit-testing tools or other test platforms. Perhaps they would need to be familiar with hardware as well (so they can setup testing systems properly), plus they need to know about accessibility and globalization requirements so they can test for those (understanding for eg how to use screen readers).

It all depends. Are you testing the software of an airplane or the software of mobile gaming app… there is a huge range in abilities and expectations.

1 Like

It is possible that many recruiters have metrics they must meet like how many people they contact per job listing, etc. Filling quotas regardless if they even read your resume throughly.

No, from my experience, many Software QA Engineering positions deal with stress testing an app. You end up learning one or more software packages that does the testing. It is less about coding and more about using the existing packages to do the work for you.

1 Like

I’d like to expand on this a bit.

This goes for a lot of “technical jobs” and can a make or breaking point for a lot of interviews.

If you can get a lot of interviews from your resume, but aren’t able to pass the interview stage, it’s a toss up between your general communications skills and technical aspects.

If you’re failing technical tests left and right, then it’s probably technical. If you feel your at least ok, then it’s probably communication related.

Regardless, be sure to ask for feedback directly at the end of the interview if time allows. Usually there is a “do you have any questions for me?” at the end if you kept with the allotted time. It’s probably the single key point where you can get the most direct and relevant feedback possible during the interview stage.

Want to know what’s going wrong with your interviews? Ask how its going right then and there!

1 Like

interesting, this link is somewhat related to the original topic of this post… very cool. Thanks for that.

THe person I met doesnt do any coding.

Cant developers do that stuff already? I often question the necessity of many job titles that currently exist in tech. Although, she does work at a big company, perhaps it’s worth it for them to have specialists.

thousands of clients connecting simulatneously some of them likely to be on low bandwith networks downloading very large csv files .5-1Gig per file. what technologies would we need to facilitate that?

He asked me what would happen if you handled that on the client and the client reloaded the page while its downloading. I answered that it would probably disrupt the download, unless the server had someway to track in which location the packets were being sent and keep track of how much the client had recieved so it can know at which point to start from upon reconnection. (this is just me guessing as I have never had to build something like that). Then he started speaking about python, and amazon s3 and saying how node.js isnt the greatest for that, and that the download should only be handled on the server, which I didnt quite understand because in order to download something doesnt that imply that it needs to be sent to the client reguardless? (re: a physical exchange has to take place between the client and the server). Why/how would cloud storage change that?

perhaps he trying to hint that its not really a true download in the traditional sense of the word, like it never really has to transfer to the clients machine. (this is just me guessing)

It really depends on where you are. Sometimes a QA person may just do manual, acceptance, and regression testing. In other cases they may be writing end-to-end and other automated tests, which involve some non-trivial coding. I think the term “QA Engineer” is not well defined and is fairly open to interpretation - there is a spectrum of interpretations.

As with every non-professional job (ie. Not a medical dr and not an engineer for eg), people come in various skills and experiences. I can’t set up a virtual machine for eg (btw this used to be harder than it is now) or understand hardware and networking specs.

When I first started working I definitely knew nothing about accessibility and globalization concerns.
People who went into testing developed those skills at a different pace than I did as a regular software developer.
People who worked with compilers developed performance testing skills and tricks that I didn’t working on a graphical user interface where my concerns where writing threaded code to keep my interface from freezing up as it rendered its responses.
People who went into sales (and yes developers do that too when it is lucrative enough) developed their technical reading skills at a much faster pace than I did as well.

Sometimes the name of the job has no real meaning and sometimes it is an indication of where the person will be spending a lot of their time. (I am still for eg unsure why DevOps developer needs a whole other name than regular software dev).

If I have the skills to do something, I don’t really worry about what it is called.

Yeah, I think it’s good to have a separate set of eyes, with a different focus to look. And their job is to assure quality. Sadly, for developers, that is often an after thought - after spending days coding this, writing unit tests, etc - to then go through the specs with a fine tooth comb, testing all the edge cases. Plus, coders think of the app as code. A good QA and PO think about “how is this going to be used”.

In general, I like having QA people. Yeah, at really small company it may be tough, but if you can afford them, they probably pay for themselves.

  • why would a cloud service such as s3 help to facilitate a download system?
  • what did he mean when he said to make sure you handle the download completely on the server and not on the client?
  • why did he say node.js is not as good of a choice as python for that?
  • when sending a download doesnt the download have to physically transfer to the individual clients device? does procesessing it on a server change that in any way (re does the download not have to fully download on his device before he can view the file).

When you download a large file from the internet you have to wait until it is completed. if you cancel it beforehand or your download is interrupted most likely you get “corrupted file” and have to start over again.
although Ive seen certain things on the internet where you have an ebook for example (I cant remember if its downloaded or not or if its just handled with something like ajax) start scrolling through it and the lower halves are blurry until its scrolled into view. whats at play there?

There were certain systems torrents etc. where you could download files and continue from where you left off. I believe the other computers that had already downloaded the file were acting as the servers as well and sending pieces. Is that what the guy was referring to? so you would have many servers doing the work of a single server they would have to have a way to keep track of what portions are being sent and recieved.

so if you had a 1Gb file and say you could break it down into 10 pieces. server X is responsible for sending the first piece you could have something on the client like
{ chunkNumber: 1, isCompleted:false, isOccupied: true}
so other servers would know not to bother with that piece. This is all speculation.

ratio of interviews to job applications
1 : 100 (conversational no coding)
1:200 (actual coding interviews)

thought I did pretty well on the last two I had. one was a hacker rank and the other a react challenge. The hacker rank was pretty fun. had he gone over my solutions like they said they were going to do, Instead of asking the systems design questions I believe I would have fared better.

please define communication related.

This is more of a systems engineering or software architecture problem, but probably presented more as an entry point into seeing how you deal with more vague questions, than a serious technical question.

Ok so its somewhat vague, sure but…

why did he mentioned s3 (spread out the workload over multiple servers?) , why did he say Node is not a good solution. Why did he say only on the server? doesnt the users device have to download the file, how is there a way around that? Is there something I left out/incorrect with my last reply (bittorrent analogy)

Imagine the best developer on Earth who uses actual magic to magically write their code so its perfect, bug free, and exactly what they want.

Now imagine the downside of this developer is they never understand what you tell them. This means with their magical coding skills, they never make the right thing.

They are a bad developer. A developer with poor communication skills are easier to spot during the interview phase (which is why they exist) and are similar to any other job. The difference however, is developers sometimes over focus on their technical skills, and miss out on their soft skills development.

Simply put, you could be a literal code wizard, but if you aren’t sure how to communicate, you aren’t of much use to a team, organization, or company. More realistically if you aren’t great at communicating during the interview its hard to determine if you’ll be good working on a team with others. This goes for many jobs, not just technical ones.

It could be something as simple as being too shy, or not-vocal enough.
To more serious issues like being confrontational, or seemingly difficult to work with.

None of this could be true, but like most things, its also something that can be analyzed, learned from and improved with practice.

Don’t ask me, ask the interviewer next time. If anything learning their reasoning might give insight into your own answers. Doing such would not only teach you something, but also turn the interview into more of conversation rather than just a “test”. Finally, it would show who your interviewing how you handle “being wrong”, and showing that being wrong means you’d like to learn.

If anything, if your bombing the interview, make use of the time you have to learn something.

1 Like

thanks though I dont think I bombed the interview. I was able to answer all of his questions except the last one. I did ask him what the correct answer was to the systems design question but all I got was:

Python, not Node.js
S3
Server Side

There was a language barrier, and he wanted to finish early, I did the best with what I could do. I still want to know the answer.

I’m going back to some of your previous posts here:

Q: What is express and why would you use it? is it necessary to use express?
A: It is a back end framework that helps you write server side code. No its not necessary to use express though it takes care of alot of boiler plate code for you.

Q: What is async await and why would you need it?
A: it is a way to write asyncronous code in a way that looks synchronous, I spoke about callback hell, .then, promises, try catch, Promise all, Promise race etc…

Q: Tell me about relational databases vs non-relational databases
A: I spoke about Normalization, foreign keys, Schema structure etc…

First of all, I’m just going to be blunt here, so no offense intended. Your answers are understandable if you haven’t had any professional dev experience yet, but I’d also say from your answers that you don’t yet understand what these questions are asking:

  1. The Express question is asking why you’d Express.js over something else. This requires some understanding of what it’s sitting on top of (which is Node.js) and what Node.js offers over other technologies - that is to say, its primary advantage is exactly “event-driven architecture capable of asynchronous I/O”. If you don’t know what this means, I’d suggest doing some research on that. Express.js is also something called an “unopinionated framework”. If you don’t know what that means, do some research on that as well.

  2. So it’s clear you know what async/await is, but it’s also apparent from your answer you don’t actually know why it’s used. Callbacks and promises are still also asynchronous. Again, this is something you can find out through Google.

  3. Relational vs “NoSQL” databases each have pros and cons, and your answer didn’t mention any of those. If you don’t know the difference between them well enough, I’d suggest writing an app that uses a SQL database, and then trying to interchange it with a NoSQL one.

And then back to this question you posted “How would you set up a system that facilitates large downloads over low bandwidth networks with possibly many clients making requests from your server.”

This is a system design / architecture question, that almost no one will expect an entry-level developer to know, and are more likely to be asked in senior developer roles. If you were asked this for an interview, I’d say the interviewer’s expectations were really misaligned with the recruiter’s and there was probably a breakdown in communication somewhere.

If you want to learn the answer to this question, it inevitably requires some baseline dev experience first, along with understanding of cloud services like AWS, and microservices and messaging. You can also read books like Martin Kleppmann’s Designing Data-Intensive Applications (https://smile.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321/) and Alex Xu’s System Design Interview (https://smile.amazon.com/System-Design-Interview-insiders-Second/dp/B08CMF2CQF/).

2 Likes

Most downloads over the Internet happen from servers to clients, but torrents work across a P2P (peer-to-peer) approach. If you don’t fully know the difference between client-server and P2P, that’s also something worth researching.