СОБЕСЕДОВАНИЕ В ЯНДЕКС НА ФРОНТЕНД РАЗРАБОТЧИКА 2025 (P.S ДАЛ ЖИДКОГО!)
Technical Interview Process at Yandex
Introduction to the Interview
- The speaker introduces the second stage of a technical interview for a front-end developer position at Yandex, following a successful HR screening. They mention an unusual question regarding discrepancies in their resume from the previous year.
Experience with Application Process
- Despite multiple applications through Yandex's website, the speaker was only invited for an interview after directly contacting an HR representative via Telegram. This highlights the importance of networking in job applications.
Preparation Challenges
- The speaker reflects on their poor performance during the technical interview due to limited preparation time and commitments from their main job. They express willingness to analyze tasks from this video if it receives enough likes (200).
Setting Up the Technical Interview
Initial Interaction
- The interviewer introduces themselves as a developer at Yandex and explains that they will conduct a coding session while another colleague observes. This sets a collaborative tone for the interview process.
Overview of Interview Structure
- The interviewer outlines how they will solve problems in a special environment, encouraging questions about company processes if time permits. This indicates an open communication approach during interviews.
Guidelines for Problem Solving
Independent Problem Solving
- Candidates are instructed not to use external resources like Google or ChatGPT during problem-solving, emphasizing self-reliance and independent thinking as critical skills in programming assessments.
Screen Sharing Requirement
- Candidates must share their screens while running code since output is visible only on their console, ensuring transparency in coding practices during evaluations.
Beginning Coding Tasks
First Coding Challenge Introduction
- The interviewer presents initial code that candidates need to analyze and explain its console output, focusing on understanding promises and error handling within JavaScript code structures.
Analyzing Promises
Understanding Promise Behavior
- Discussion revolves around how promises resolve values and handle errors, with emphasis on tracking variable states throughout promise chains—highlighting common pitfalls such as losing values when errors occur.
Error Handling Insights
Importance of Catch Blocks
- Candidates discuss how catch blocks function within promise chains, stressing that proper error handling is crucial for maintaining data integrity throughout asynchronous operations in JavaScript applications.
Static Methods of Promises
Exploring Promise Methods
- The conversation shifts towards static methods available on promises like
Promise.all,Promise.allSettled, andPromise.race, explaining how each method behaves differently concerning resolved values and statuses across multiple promises.
Implementing Custom Functions
Task: Creating Times Function
- A new task is introduced where candidates must implement a method called
timesthat invokes a callback function based on specified iterations—testing both logic implementation skills and understanding of closures in JavaScript functions.
Function Composition Concept
Understanding Function Composition
- Candidates are tasked with implementing function composition using mathematical functions as examples; this requires them to grasp higher-order functions' behavior by chaining multiple functions together effectively.
Asynchronous Data Fetching
Writing Get Function Logic
- A new challenge involves creating an asynchronous
getfunction that fetches data from a URL using fetch API calls while implementing retry logic upon failure—emphasizing resilience in network requests without using async/await syntax.
This structured markdown file captures key insights from the transcript while providing timestamps for easy navigation back to specific parts of the discussion or coding challenges presented during the technical interview process at Yandex.
Handling Promises and Error Management in JavaScript
Implementing Promise Rejection
- The discussion begins with the need to handle promise rejection by utilizing a
rejectfunction to propagate errors effectively.
- A suggestion is made to replace an existing function with a new one that accepts a second parameter, allowing for error checking during execution.
- The conversation shifts towards testing the backend response, emphasizing the importance of console logging for debugging purposes.
Managing Infinite Loops and Counters
- An infinite loop issue arises when trying to manage counter values within the promise structure, indicating a flaw in how counters are being decremented.
- The necessity of maintaining state across function calls is highlighted, suggesting that counters should be stored persistently rather than reset on each invocation.
- A solution is proposed where the counter can be initialized within the function scope to retain its value across recursive calls.
Debugging Techniques and Functionality Testing
- Attempts are made to test error handling functionality; however, issues persist with infinite loops occurring during execution.
- Adjustments are discussed regarding passing parameters into functions correctly to ensure proper decrementing of counters without causing recursion problems.
Filtering False Values from Objects and Arrays
Understanding Data Structures
- The task involves filtering out false values from an object or array while preserving their original structure.
- It’s noted that both arrays and objects can contain nested structures, complicating the filtering process due to potential depth levels.
Developing Recursive Solutions
- A plan emerges involving recursion: if an item is an array or object, it will be processed accordingly through recursive calls until all false values are filtered out.
- Initial checks will determine whether data types are arrays or objects before proceeding with specific filtering logic tailored for each type.
Implementation Challenges
- There’s acknowledgment of potential pitfalls in managing nested structures and ensuring that all elements are evaluated correctly without losing context.
- Discussions around strict versus loose equality highlight important distinctions in JavaScript's type coercion behavior when filtering values.
Returning Filtered Results Without Mutating Original Data
Structuring Return Values
- Emphasis is placed on returning new objects or arrays instead of mutating existing ones, which could lead to unintended side effects during processing.
- Strategies for accumulating results involve using temporary variables that adapt based on whether the input was originally an array or object.
Finalizing Logic Flow
- The final implementation must ensure consistent return types (either arrays or objects), depending on what was passed as input initially.
- Clarifications about variable scoping indicate that result variables should be declared locally within functions rather than globally to avoid conflicts.
Concluding Thoughts on Problem-Solving Approaches
Reflecting on Time Constraints
- As time runs short, there’s recognition of pressure affecting problem-solving capabilities; participants consider whether they should continue working independently or collaboratively.
Learning Outcomes and Future Steps
- Post-discussion reflections reveal insights gained from tackling complex tasks under time constraints; participants express interest in future stages of evaluation processes.