DEV Community

Discussion on: Interview Question: Implement a Progress Bar

Collapse
 
steveblue profile image
Stephen Belovarich • Edited

It would make a huge difference if the time requirement was removed completely and the candidate was asked to architect a progress bar based off some sort of input value that is variable. This would actually require some level of problem solving and the interviewer could observe how the problem is solved. It is also based off a real problem, could start a discussion of event based architectural patterns like Redux, and reflects component based design patterns.

Collapse
 
healeycodes profile image
Andrew Healey

I agree! It does seem a little far removed from a real world problem. I think the time aspect is so that setTimeout/Interval is used, which introduces some basic scoping problems.

Collapse
 
steveblue profile image
Stephen Belovarich

FWIW given the conditions of the test if someone were to use setInterval I wouldn’t be that impressed. requestAnimationFrame would be way better and even more so Web Animations API. Even then the test is still hunting for a very specific answer that amounts to trivia which should be avoided in test scenarios.

Thread Thread
 
healeycodes profile image
Andrew Healey

That's a great point Steve. I went ahead and added a requestAnimationFrame version too! 😊