Software Development & Management

setTimeout tells you much about a candidate

1 min min read - October 1, 2018

For a very long time, I kept using the same set of questions while performing interviews. Even though I created it with Angular in mind, most of them have proven universal. Asking about Arrays became my favourite (as in opens way to discuss so many interesting patterns like Observables) or CORS, which allows discussing how network requests work. Anyhow, recently I started to value more and more one I kept asking about setTimeout and setInterval.

I won't bore you with the theory when it's perfectly explained on MDN.

I will just go to a short summary on why it matters:

  • it may be originally about a quirk of setInterval being "frozen" and "accumulating", but it's not the most important part
  • requires understanding how event loop works in JavaScript
  • requires understanding that JavaScript runs in one process and we can't guarantee the time of next frame
  • affects the understanding of how animations and transitions would work and how to manage them being smooth for the user
  • affects how to deal with exceptions in asynchronous operations and work against race conditions
  • opens a field for discussing what's locking and what's not locking in JavaScript (IO)
  • shows if someone ever used core language features around asynchronous behaviour without Promise or async/await syntax sugar
  • shows if a person is capable of optimising UI performance
  • shows if a person is capable of understanding why loop complexity sometimes should be taken into account (many people just says "well, the browser just hands sometimes because something takes a long time" and never try to figurle out "why?")

So what I look for in answers:

  • one process
  • queue
  • a delay argument is the minimum desired delay value
  • serializing operations (or another way to name the same thing)

Next article

Private

Let's face it: there are not enough opportunities for people with little commercial experience when at the same time there is massive undersupply of experienced developers. There is no way around it. Companies need to hire graduates and juniors and keep them as long as possible. Only that can keep the situation healthy and fair. But at the same time business is not a charity and we need people to be productive. There are many boot camps that promise you to get a job. Some of them work. I can believe someone after intensive React course can be productive for example for agencies. But that doesn't work for everyone. In most of our projects (in current and previous companies) we needed more flexibility and ability to learn than just given set of tools. There is a massive difference between being able to build a countless number of nice and performing UI using a predefined set of good tools and being able to build scalable and complex software systems. That's why React is good to find the first job that pays, but NodeJS is a way to get a well-paid job in the long run (even despite crazy React rates). Below I list things (virtues and knowledge) that if I find in graduate I vote for taking person immediately:

read more…

2 min min read - October 1, 2018

Previous article

Private

People dealing with rejection often allow their emotions to build new imaginary words. As they drew in denial or simply accept the change, they look for the guilt in others. It's very nicely explained in the book everyone should read - The subtle art of not giving a F*ck by Mark Manson .

read more…

1 min min read - September 17, 2018