© 2019 SourceMedia. All rights reserved.
SOFTWARE-DEVELOPMENT-1.png
10 most frequently asked questions by developers answered
Scoping, event delegation, loop closure, debouncing and classical inheritance are among the topics that software developers most want to master.
SW questions.jpg
What's on the minds of developers?
Data from Global App Testing shows that JavaScript is the most popular coding language in terms of the raw volume of questions asked by developers. A Stack Overflow 2018 survey also placed JavaScript top of all other computing technologies. Almost every company today is adopting JavaScript with opportunities for developers increasing. With that in mind, Information Management asked Wojtek Olearczyk, head of engineering at Global App Testing, what the 10 most frequently asked questions by developers are, and the answers expected.
1.-What-is-Scoping.png
1. What is Scoping?
The purpose of such a question is to test the understanding of variables scoping. This code uses ‘var’, ‘const’ and ‘let’ keywords. These keywords were introduced in ECMAScript 2015. In order to answer this question correctly, the candidate needs to fully understand two vital concepts. Understand that ‘const’ and ‘let’ variables are not initialised. Unlike ‘var,’ they are hoisted. The two are in a temporal dead zone, meaning that should they be referenced before being initialised otherwise the JavaScript engine will register a ‘ReferenceError’ error. Two, ‘const’ and ‘let’ variables are block scoped while ‘var’ is function scoped, making them available in the whole process.
2.-What-is-Event-Delegation.png
2. What is Event Delegation
In some instances, event listeners will need to be attached to buttons, images or texts when an application is being built for a page to perform some action. In other words, coding will be needed to show the right tab whenever the relevant tab header is selected. Take a to-do-list for example. The candidate may be asked to implement an action to occur every time the user clicks on each item. The functionality will need to be implemented in JavaScript. It may be easy to attach an event listener on about 5 items. But, what about when the events rise to thousands? The function will then be to create separate event listeners attaching them to the DOM. The tab and the header are considered visible only if they contain the ‘active’ CSS.
3.-How-often-should-a-Data-Model-be-retrained.png
3. How often should a Data Model be retrained?
The developer wants to know if the candidate is a good data analyst and if they understand that altering business dynamics could affect the efficiency of a predictive model. Business acumen and analytical skills must be clearly understood to answer this question. The most accurate answer would be for the candidate to say they will work with the client to get the best time frame. When the company enters a new market, it will be wide to also say they would retrain a model. I would retrain the model as fast as possible in the events of emerging competition.
4.-How-should-you-use-a-Closure-within-a-Loop.png
4. How should you use a Closure within a Loop?
The developer wants to gauge the understanding of the language. Does the interviewee know when to implement a closure? Whenever an inner function gets access to variables, it’s referred to as a closure. It can be used to implement privacy and create function factories. The interviewee could be asked to write a function that loops through a list of integers. Understand that a ‘setTimeout’ function creates a function that has access to the outer scope. That is the loop containing the index ‘i’.
5.-Can-you-explain-Debouncing.png
5. Can you explain Debouncing?
Various browser events can fire several times, an event that happens within a short time span. Such events could include scrolling down a page or window resizing. If for instance, an event listener is attached to the window scroll and the user keeps scrolling down the page quickly, the event could fire thousands of times within a very short time. Serious performance issues could then occur. In any question to do with key pressing, scrolling or resizing, debouncing must be mentioned.
6.-Can-you-tell-me-about-Promises.png
6. Can you tell me about Promises?
Here, the developer is testing the understanding of the ‘promise’ object and the methods applied in JavaScript. It tells the developer whether the interviewee understands the challenges involved in synchronizing various asynchronous calls.
7.-When-is-Classical-Inheritance-important.png
7. When is Classical Inheritance important?
The answer should be never. Understand that multi-level class hierarchies are anti-pattern. From a framework base-class like ‘React.Component’ a single-level can sometimes be okay.
8.-What-is-the-difference-between-Data-Profiling-and-Data-Mining.png
8. What is the difference between Data Profiling and Data Mining?
Data mining is the analysis of datasets to identify a relationship. It is about sequencing discoveries, bulk analysis, and identifying various attributes. Data profiling, on the other hand, is the process of assessing data values in a certain dataset for logic, uniqueness and consistency. Data profiling does not identify inaccurate data but detects anomalies.
9.-What-are-the-two-most-important-Programming-Paradigms.png
9. What are the two most important Programming Paradigms?
JavaScript is a multi-paradigm language that supports procedural/imperative programming with OOP and functional programming. Understand that some languages are designed to support one paradigm while others support multiple paradigms. The imperative paradigm assumes that the computer is able to maintain through variables.
10.-Can-you-explain-what-pure-Functions are.png
10. Can you explain what pure Functions are?
Pure functions are useful for a variety of purposes including concurrency, React + Redux apps and functional programming. Pure functions are the foundation of functional programming and do not modify the states of variables outside the scope. Simply, it is a function where the return value is purely determined by the input values without incurring side effects such as object mutation. Another good answer would be; because pure functions have no side effects, they do not conflict with each other. They are also easy to reuse because they do not depend on any state of the system. Also, since input yields the same output, results can be cached.