From dd8a3591122b698bd24bda4b32a038fe798de4af Mon Sep 17 00:00:00 2001 From: dzmitry varabei Date: Tue, 17 Feb 2026 22:48:20 +0100 Subject: [PATCH] =?UTF-8?q?docs:=20revise=20CoreJS=20Interview=20#2=20?= =?UTF-8?q?=E2=80=94=20focus=20on=20Stage=202,=20remove=20duplicates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor interview to fit 45-90 min target (was 170+ min). - Remove 12 theoretical sections: Stage 1 topics (OOP, Classes, Prototypes, Modules, Callbacks/IIFE), non-JS topics (Methodologies, Testing, Web Security), and legacy content (XMLHttpRequest, user agent parsing) - Expand under-represented Stage 2 topics: TypeScript (utility types and type guards now required), Async/Event Loop (from 2 bullets to full section), Functional Programming (new section replacing Functional Patterns) - Remove 8 coding tasks: 3 duplicates with Interview #1 (Array.flat, Array.reduce, String.repeat), 5 redundant/trivial - Add 2 new coding tasks: Debounce, EventEmitter - Add interviewer guidance: "pick 1-2 tasks", time estimates, curriculum context notes - Preserve old version as interview-corejs-legacy.md - Add detailed changelog with justification: interview-corejs-changelog.md Co-Authored-By: Claude Opus 4.6 --- tasks/interview-corejs-changelog.md | 324 ++++++++++++++++++++++++++++ tasks/interview-corejs-legacy.md | 190 ++++++++++++++++ tasks/interview-corejs.md | 186 ++++++---------- 3 files changed, 583 insertions(+), 117 deletions(-) create mode 100644 tasks/interview-corejs-changelog.md create mode 100644 tasks/interview-corejs-legacy.md diff --git a/tasks/interview-corejs-changelog.md b/tasks/interview-corejs-changelog.md new file mode 100644 index 000000000..5bb42703e --- /dev/null +++ b/tasks/interview-corejs-changelog.md @@ -0,0 +1,324 @@ +# CoreJS Interview #2: Список изменений и обоснование + +Этот документ объясняет каждое изменение в списке вопросов CoreJS Interview #2 с обоснованием на основе программы Stage 1 / Stage 2, содержания Interview #1 и практических ограничений по времени. + +> Предыдущая версия: [interview-corejs-legacy.md](./interview-corejs-legacy.md) +> Текущая версия: [interview-corejs.md](./interview-corejs.md) + +--- + +## Проблема + +Предыдущая версия содержала **18 теоретических секций** и **15 coding-задач**. Ментор, который попытался покрыть всё, потратил **более 4 часов** — это значительно превышает целевые **45-90 минут**. + +**Корневые причины:** + +1. **Нет инструкций для интервьюеров.** Документ читался как чеклист — менторы чувствовали себя обязанными спросить всё. +2. **Темы Stage 1 в интервью Stage 2.** OOP, Classes, Prototypes, Modules, Callbacks/IIFE — всё это изучается в Stage 1 и уже покрыто [Interview #1](./interview-basic-coreJS.md). +3. **Не-JS темы.** Methodologies, Testing — важно, но это не "CoreJS". +4. **Дублирующие coding-задачи.** `Array.flat`, `Array.reduce`, `String.repeat` присутствуют слово в слово в обоих интервью. +5. **Недопредставленность ключевых тем.** TypeScript (19 часов в Stage 2) и Async/Event Loop (14 часов) получили тот же вес, что и Testing (2 часа). + +--- + +## Бюджет времени: до и после + +### До (legacy-версия) + +| Блок | Секций | Мин. время | +| -------------------- | ------------- | ------------ | +| JS Topics (8 секций) | 8 | ~50 мин | +| Browser (4 секции) | 4 | ~25 мин | +| TypeScript | 1 | ~15 мин | +| Design Patterns | 1 | ~10 мин | +| Methodologies | 1 | ~8 мин | +| Testing | 1 | ~8 мин | +| Web Protocols | 1 | ~8 мин | +| Web Security | 1 | ~8 мин | +| Coding tasks (15!) | 2-3 выбранные | ~40 мин | +| **Итого** | | **~170 мин** | + +Даже при стратегическом выборе тщательному интервьюеру нужно ~3 часа. + +### После (новая версия) + +| Блок | Секций | Ожид. время | +| --------------------------------------- | -------------- | ----------- | +| TypeScript | 1 (10 пунктов) | ~15 мин | +| Async & Event Loop | 4 подсекции | ~15 мин | +| Functional Programming | 1 (5 пунктов) | ~8 мин | +| Design Patterns | 1 (4 пункта) | ~8 мин | +| Browser (Page Lifecycle, Fetch, Timers) | 3 | ~8 мин | +| Error Handling | 1 (3 пункта) | ~5 мин | +| Coding tasks (7, выбрать 1-2) | 1-2 выбранные | ~20 мин | +| **Итого** | | **~75 мин** | + +Это укладывается в целевые **45-90 минут**. + +--- + +## Удалённые темы (с обоснованием) + +### 1. Modules in JavaScript — УДАЛЕНО + +**Было:** Назначение модулей, типы (AMD/ES6/CommonJS/UMD), синтаксис экспортов, динамические импорты. + +**Почему удалено:** + +- **Материал Stage 1.** Модули изучаются в Stage 1, неделя 8 (2-3 часа). Это не тема Stage 2. +- **AMD и UMD — legacy.** Студенты никогда не сталкиваются с ними на практике. Все проекты Stage 2 используют ES6 modules. +- **Подразумевается по умолчанию.** Каждый проект Stage 2 использует модули — если студент не умеет пользоваться `import`/`export`, он бы не добрался до Interview #2. +- Секция TypeScript сохраняет пункт "модульная система в TypeScript", покрывая актуальный для Stage 2 аспект. + +--- + +### 2. Functional Patterns (callbacks, IIFE) — УДАЛЕНО, заменено на "Functional Programming" + +**Было:** Callbacks и IIFE, callback hell, каррирование и частичное применение. + +**Почему удалено/заменено:** + +- **Callbacks и IIFE — темы Stage 1.** Callbacks изучаются в Stage 1 неделя 2 (функции) и неделя 4 (события). IIFE — legacy-паттерн, практически полностью заменённый ES6 modules. +- **Уже есть в Interview #1.** Interview #1 покрывает замыкания, scope и `this` — фундамент, на котором строятся callbacks. +- **Callback hell — переходная тема.** Она мотивирует изучение промисов, но к Stage 2 студенты уже используют async/await. +- **Каррирование остаётся** — но перенесено в новую секцию "Functional Programming" вместе с чистыми функциями, HOF и композицией (всё из Stage 2, неделя 4, 10 часов). + +**Что заменило:** Полноценная секция "Functional Programming", отражающая реальный 10-часовой модуль Stage 2: чистые функции, побочные эффекты, функции высшего порядка, каррирование, композиция, иммутабельность. + +--- + +### 3. Object-Oriented Programming (OOP) — УДАЛЕНО + +**Было:** Ключевое слово `new`, функции-конструкторы, публичные/приватные/статические члены. + +**Почему удалено:** + +- **Полностью материал Stage 1.** Основы ООП изучаются в Stage 1, неделя 11 (6 часов). +- **Interview #1 уже покрывает фундамент.** `this`, `call`/`apply`/`bind`, замыкания (механизмы, лежащие в основе ООП) — всё это есть в Interview #1. +- **В Stage 2 ООП реализуется через TypeScript-классы** — что покрыто в секции TypeScript. +- Функции-конструкторы в современном коде пишут крайне редко. Студенты используют синтаксис `class` во всех проектах Stage 2. + +--- + +### 4. ECMAScript Classes — УДАЛЕНО + +**Было:** Объявление классов, отличия class от функций-конструкторов, `super()`. + +**Почему удалено:** + +- **Материал Stage 1.** Классы изучаются в Stage 1, неделя 11 (6 часов, вместе с прототипами). +- **Дублирует секцию OOP** — обе спрашивали об одних и тех же концепциях с разных сторон. +- **В Stage 2 классы используются через TypeScript.** Секция TypeScript покрывает работу с классами более релевантно (модификаторы доступа через TS, дженерики с классами и т.д.). + +--- + +### 5. Prototypal Inheritance — УДАЛЕНО + +**Было:** `__proto__`, `prototype`, `Object.create`. + +**Почему удалено:** + +- **Материал Stage 1.** Прототипы изучаются в Stage 1, неделя 11 (6 часов: способ Крокфорда, ES5, ES2015). +- **Три секции Stage 1 в интервью Stage 2.** OOP + Classes + Prototypes вместе отнимали ~15-20 минут интервью на темы, которые студенты изучили месяцы назад, ещё до начала Stage 2. +- **Полифил `Object.create` остаётся** как coding-задача — это хороший тест понимания прототипов без необходимости в отдельной теоретической секции. + +--- + +### 6. ECMAScript Advanced Data Types (Set/Map/WeakSet/WeakMap) — УДАЛЕНО как отдельная секция + +**Было:** `Set/Map` и `WeakSet/WeakMap` (секция из одного пункта). + +**Почему удалено как отдельная секция:** + +- **Set/Map — материал Stage 1** (неделя 2, ES6+). +- **WeakSet/WeakMap лучше обсуждать в контексте** — они теперь упоминаются в подсекции Garbage Collection раздела "Async Programming & Event Loop", где их назначение (предотвращение утечек памяти) выглядит логичнее. +- Секция из одного пункта была слишком поверхностной, чтобы оценить что-то осмысленное. + +--- + +### 7. ECMAScript Advanced — УДАЛЕНО, заменено расширенной секцией "Async Programming & Event Loop" + +**Было:** Два пункта: "Промисы, async/await и event loop" + "Основы сборки мусора." + +**Почему заменено:** + +- **Катастрофическая недопредставленность.** Это 14+ часов программы Stage 2 (10ч async + 4ч Event Loop), сжатые в 2 пункта. +- **Event Loop заслуживает отдельной секции.** Это выделенный 4-часовой модуль в Stage 2, неделя 4. Понимание микрозадач vs макрозадач — одна из важнейших концепций JS. +- **Promise API расширился.** Студенты изучают `Promise.all`, `.race`, `.allSettled`, `.any` — ни один из которых не был упомянут. + +**Что заменило:** "Async Programming & Event Loop" — структурированная секция с подразделами Event Loop, Promises, Async/Await и опциональным Garbage Collection. Теперь она корректно отражает 14 часов программы. + +--- + +### 8. Global object window — УДАЛЕНО + +**Было:** Location и history API, парсинг user agent, определение платформы/браузера. + +**Почему удалено:** + +- **Парсинг user agent — устаревшая практика.** MDN прямо рекомендует не использовать его. Современный подход — feature detection. Эта тема никогда не преподавалась в программе. +- **History API** релевантен для SPA-роутинга (Stage 2, неделя 3), но это узкая деталь реализации, а не концептуальная тема, стоящая 5-10 минут интервью. +- **Недостаточно материала** для осмысленной дискуссии — студенты либо знают `window.location`, либо нет. + +--- + +### 9. Network requests (XMLHttpRequest) — УПРОЩЕНО + +**Было:** "Использование Fetch и понимание XMLHTTPRequest." + +**Что изменилось:** XMLHttpRequest удалён. Fetch API сохранён в секции "JavaScript in Browser". Добавлены концепции RESTful API. + +**Почему:** + +- **XMLHttpRequest — legacy.** Студенты используют исключительно Fetch во всех проектах Stage 2. +- **RESTful API** (Stage 2, неделя 6, 2 часа) более релевантны и ранее были недопредставлены в отдельной секции "Web Communication Protocols". + +--- + +### 10. Software Development Methodologies — УДАЛЕНО + +**Было:** Agile, Scrum, Kanban, Waterfall, техники оценки проектов. + +**Почему удалено:** + +- **Это не CoreJS.** Интервью называется "CoreJS Interview" — оно должно оценивать знания JavaScript/TypeScript. +- **Оценка проектов никогда не преподавалась.** Этой темы нет в программе вообще. +- **Waterfall упоминается только для контраста** в модуле Stage 2 (неделя 10, 4 часа). Студенты не изучают его как методологию. +- **Scrum/Kanban оцениваются в другом месте.** Tandem-проект (TEAMWORK.md) напрямую оценивает навыки управления проектами через практику, а не через вопросы на интервью. +- **Поверхностные ответы.** С 4 часами теории и без практического опыта (Tandem-проект проходит после интервью) студенты могут только пересказывать определения. + +--- + +### 11. Testing — УДАЛЕНО + +**Было:** Виды тестирования (Integration, E2E, Performance), Test Pyramid, TDD, BDD. + +**Почему удалено:** + +- **Это не CoreJS.** Тестирование — это практика разработки ПО, а не тема языка JS. +- **Всего 2 часа теории** во всей программе Stage 2 (неделя 8). Самый маленький модуль. +- **Нет практического опыта.** Студенты не пишут тесты в своих проектах Stage 2. Ответы будут исключительно теоретическими — пересказ определений TDD vs BDD без малейшего опыта применения. +- **Низкое отношение сигнал/шум.** Студент, который заучил "в Test Pyramid юнит-тесты внизу", не продемонстрировал никаких навыков JS. + +--- + +### 12. Web Communication Protocols — УДАЛЕНО как отдельная секция + +**Было:** HTTP vs HTTPS, методы/заголовки/коды ответов HTTP, RESTful API. + +**Почему удалено:** + +- **Основы HTTP — материал Stage 1.** Методы HTTP, коды ответов, заголовки — всё это изучается в Stage 1, неделя 10 (7 часов). Это должно проверяться в Interview #1. +- **RESTful API сохранены** — перенесены в подсекцию "Network Requests" раздела "JavaScript in Browser", где они естественно сочетаются с Fetch API. +- **HTTPS** — это единственная концепция (шифрование при передаче), которая не требует времени на интервью. Студенты, которые использовали `fetch('https://...')`, понимают разницу. + +--- + +### 13. Common Web-Security Knowledge — УДАЛЕНО + +**Было:** CORS, XSS, OWASP Top 10, JWT, OAuth. + +**Почему удалено:** + +- **Слишком обширная тема для 3-5 минут.** Один только OWASP Top 10 включает 10 категорий уязвимостей. Ментор, потративший 3 минуты, услышит "XSS — это cross-site scripting" — это проверяет словарный запас, а не понимание. +- **Нет практической глубины.** Студенты изучают 4 часа теории безопасности (Stage 2, неделя 5), но никогда не реализуют меры безопасности. Они не могут объяснить, как предотвратить XSS, потому что им никогда не приходилось это делать. +- **CORS — это знание HTTP** — уже неявно покрыто через использование Fetch API в проектах (Async Race). Студенты, которые отлаживали ошибки CORS, понимают это на практике. +- **JWT/OAuth — темы аутентификации** — релевантны для бэкенд-разработчиков, но студенты Stage 2 создают фронтенд SPA без реализации аутентификации. +- **Лучше оценивать через code review.** Осведомлённость о безопасности лучше оценивается при просмотре реального кода студента (санитизирует ли он ввод? обрабатывает ли ошибки?), чем вопросом "Что такое XSS?" + +--- + +## Изменённые темы + +### TypeScript — РАСШИРЕН + +**Было:** 10 пунктов, utility types и type guards помечены `(optional)`. + +**Стало:** 10 пунктов, utility types и type guards теперь **обязательные** темы. Добавлены type assertions, const assertions. Добавлена справка о программе. + +**Почему:** + +- **Крупнейший модуль Stage 2: 19 часов** (11ч basic + 8ч advanced). +- **Обязателен во всех проектах.** Со 2-й недели весь код должен быть на TypeScript в strict mode (`noImplicitAny: true`, `strict: true`, без `any`). +- Пометка utility types и type guards как `(optional)` противоречила реальности — студенты используют их ежедневно. + +--- + +### Error Handling — РЕСТРУКТУРИРОВАН + +**Было:** Секция "JavaScript Errors" с try/catch и пользовательскими ошибками. + +**Стало:** Секция "Error Handling" с try/catch/finally, пользовательскими ошибками и **добавленной обработкой ошибок в асинхронном коде**. + +**Почему:** Обработка ошибок в async-коде (Stage 2, неделя 6-7, 2 часа) критически важна и не была покрыта. Обработка ошибок в цепочках промисов vs async/await — типичная проблема. + +--- + +### Design Patterns — РАСШИРЕН конкретными примерами + +**Было:** "Знакомство с порождающими, структурными и поведенческими паттернами. Принципы SOLID." + +**Стало:** Перечислены конкретные паттерны (Singleton, Factory, Decorator, Adapter, Facade, Observer, Strategy). + +**Почему:** Старая версия не давала ориентиров по ожидаемой глубине. Ментор мог спросить про паттерн Visitor или только про Singleton — и то и другое подходит под "порождающие, структурные, поведенческие". Конкретные примеры задают ожидания для обеих сторон. + +--- + +### Functional Programming — НОВАЯ секция (заменила Functional Patterns) + +**Было:** "Callbacks, IIFE, callback hell, каррирование, частичное применение." + +**Стало:** "Чистые функции, побочные эффекты, функции высшего порядка, каррирование, композиция, иммутабельность." + +**Почему:** Старая секция смешивала темы Stage 1 (callbacks, IIFE) с темами Stage 2 (каррирование). Новая секция отражает реальный модуль Functional Programming в Stage 2 (неделя 4, 10 часов). + +--- + +## Coding-задачи: изменения + +### Удалённые задачи + +| # | Задача | Почему удалена | +| --- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 3 | Array.flat polyfill | **Дубликат Interview #1.** Слово в слово та же задача в `interview-basic-coreJS.md`. | +| 4 | Array.reduce polyfill | **Дубликат Interview #1.** Та же задача в `interview-basic-coreJS.md`. | +| 5 | String Repeating | **Дубликат Interview #1.** "String Repeater" в `interview-basic-coreJS.md`. | +| 6 | Custom Join | **Слишком тривиальна для Stage 2.** Соединение элементов массива через разделитель — базовая операция, которая не проверяет концепции Stage 2. | +| 7 | Functional Expressions `five(plus(seven(...)))` | **Менее показательна, чем каррированное сложение.** Обе проверяют концепции ФП, но каррированное сложение (#8 → теперь #3) более практично и лучше раскрывает понимание студента. Оставили одну, убрали другую для экономии времени. | +| 9 | Periodic Output | **Вытеснена задачами на промисы.** Проверяет setTimeout, который уже покрыт в теории. Задачи на промисы (#11-15) тестируют async-концепции на более высоком уровне. | +| 10 | Extended Periodic Output | То же обоснование, что и для #9. | +| 13 | Race Condition Handling | **Дублирует Promise.all (#12).** Обе проверяют композицию промисов. Promise.all чаще нужен на практике. | +| 14 | Promise Chaining | **Пересекается с Sequential Execution (#11).** Обе проверяют цепочки; последовательное выполнение — более сложный и показательный вариант. | +| 15 | Promisify Callbacks | **Нишевый Node.js паттерн.** Stage 2 фокусируется на браузерном JS. Современные Node.js API уже нативно поддерживают промисы. | + +### Добавленные задачи + +| # | Задача | Почему добавлена | +| --- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 4 | Debounce | **Классическая практическая задача.** Проверяет замыкания, таймеры и понимание Event Loop — всё это ключевые темы Stage 2. Каждый фронтенд-разработчик должен уметь реализовать debounce. | +| 7 | EventEmitter | **Проверяет Observer pattern + ООП + замыкания.** Соответствует модулю Design Patterns (Observer). Также валидирует навыки проектирования классов/объектов без необходимости в отдельной теоретической секции ООП. | + +### Сохранённые задачи + +| # | Задача | Почему оставлена | +| --- | ---------------------------- | ----------------------------------------------------------------------------------------------------- | +| 1 | bind polyfill | Проверяет `this`, `apply`, замыкания — фундаментальные механизмы JS. Отсутствует в Interview #1. | +| 2 | Object.create polyfill | Проверяет понимание прототипов. Заменяет необходимость в теоретической секции Prototypal Inheritance. | +| 3 | Curried addition | Проверяет концепции ФП (каррирование, замыкания). Напрямую соответствует модулю ФП в Stage 2. | +| 5 | Sequential promise execution | Проверяет async/await и цепочки промисов. Ключевой навык Stage 2. | +| 6 | Promise.all polyfill | Проверяет композицию промисов и параллельное выполнение. Ключевой навык Stage 2. | + +--- + +## Итоговая сводка изменений + +| Категория | Было | Стало | Изменение | +| ------------------------------------------- | ------------------------------------ | --------- | ------------------------------------- | +| Теоретические секции | 18 | 6 | -12 секций | +| Coding-задачи | 15 | 7 | -8 задач | +| Темы Stage 1 в интервью | 6 секций | 0 | Все удалены | +| Не-JS темы | 3 (Methodologies, Testing, Security) | 0 | Все удалены | +| Дублирующие coding-задачи (из Interview #1) | 3 | 0 | Все удалены | +| Инструкции для интервьюера | Нет | Добавлены | "Выберите 1-2 задачи", оценки времени | +| Контекст программы | Нет | Добавлен | Часы по каждой теме | +| Оценочное время интервью | ~170+ мин | ~75 мин | -56% | diff --git a/tasks/interview-corejs-legacy.md b/tasks/interview-corejs-legacy.md new file mode 100644 index 000000000..3ca8d5160 --- /dev/null +++ b/tasks/interview-corejs-legacy.md @@ -0,0 +1,190 @@ +# CoreJS Interview #2 (Legacy Version) + +> **This is the previous version of the interview, preserved for reference.** +> For the current version, see [interview-corejs.md](./interview-corejs.md). +> For rationale behind the changes, see [interview-corejs-changelog.md](./interview-corejs-changelog.md). + +> **Important**: Passing the CoreJS Interview #2 is a prerequisite for receiving the RS School certificate. + +- **Interview Exclusion**: Students cannot be interviewed by their current mentors. +- **Open Registration**: Students without a mentor are also eligible to register for an interview. +- **Initiate Contact**: Students must initiate contact with the interviewer through the RS APP. _**Note:** Interviewers might be unavailable due to vacations, business trips, or other commitments, so early contact is recommended._ +- **Interview Format**: Interviews may be conducted online or face-to-face at the mentor's discretion. +- **Duration**: Interviews typically last between 45 to 90 minutes. + +During the interview, the mentor will: + +- Pose questions. +- Listen to and evaluate answers. +- Provide corrections, explanations, or the correct answers as needed. + +**Post-Interview**: Mentors are required to complete a feedback form via the RS APP > Interviews section. + +## Interview Topics and Question Examples + +### JavaScript Topics + +#### **Modules in JavaScript** + +- Purpose and concept of a module/module pattern. +- Types of modules (AMD, ES6, CommonJS, UMD). +- Syntax and common features (export default, named exports, exports as). +- Dynamic imports. + +#### **Functional Patterns** + +- Callbacks and IIFE. +- Limitations of callbacks (e.g., callback hell). +- Function currying and partial functions. + +#### **Object-Oriented Programming (OOP)** + +- `new` keyword functionality. +- Constructor functions and their properties. +- Public, private, and static members in OOP. + +#### **ECMAScript Classes** + +- Class declaration and syntax. +- Differences between `class` declarations and constructor functions. +- Usage of `super()`. + +#### **Prototypal Inheritance** + +- Properties like `__proto__` and `prototype`. +- Using [Object.create] to define prototypes explicitly. + +#### **ECMAScript Advanced Data Types & Expressions** + +- `Set/Map` and `WeakSet/WeakMap`. + +#### **JavaScript Errors** + +- Error handling techniques including `try..catch`. +- Understanding and implementing custom errors. + +#### **ECMAScript Advanced** + +- Promises, async/await, and the event loop. +- Garbage collection basics. + +### JavaScript in Browser + +#### **Global object window** + +- Understanding browser's location and history API. +- User agent parsing and platform/browser detection. + +#### **Page Lifecycle** + +- Parsing, reflow, repaint, and the critical rendering path. + +#### **Network requests** + +- Using `Fetch` and understanding `XMLHTTPRequest`. + +#### **Timers** + +- Differences between `setTimeout` and `requestAnimationFrame`. + +### TypeScript + +- Writing efficient TypeScript using basic types, enums, interfaces, and generics: + - basic types + - enums + - type / interface, differences between them + - using interfaces with optional properties, read-only properties, etc... + - function types + - utitily types `(optional)` + - typeguards `(optional)` + - creating custom types + - generic types (concept) +- Understanding the module system in ES6 and TypeScript. + +### Design Patterns + +- Familiarity with Creational, Structural, and Behavioral Design Patterns. +- SOLID principles and design patterns in project contexts. + +### Software Development Methodologies + +- Agile, Scrum, Kanban, and Waterfall methodologies. +- Project estimation techniques. + +### Testing + +- Understanding different types of testing (Integration, E2E, Performance). +- Test Pyramid. +- Test-driven development (TDD) and behavior-driven development (BDD). + +### Web Communication Protocols + +- Differences between HTTP and HTTPS. +- Understanding HTTP methods, headers, responses, and status codes. +- Concepts of RESTful APIs. + +### Common Web-Security Knowledge + +- Basic security concepts including CORS, XSS, and OWASP Top 10. +- Authentication mechanisms (JWT, OAuth). + +### Coding Task Examples + +#### **Polyfills and Extensions** + +1. **Function.prototype.bind Polyfill** + - Implement a polyfill for `Function.prototype.bind`. + +2. **Object.create Polyfill** + - Implement a polyfill for `Object.create`. + +3. **Array.flat Polyfill** + - Implement a polyfill for `Array.flat`. + +4. **Array.reduce Polyfill** + - Implement a polyfill for `Array.reduce`. + +5. **String Repeating Function** + - Create a method that allows a string to be repeated a certain number of times, similar to the native `String.prototype.repeat`. + +6. **Custom Join Function** + - Implement a function that constructs a string from an array of numbers, separated by a specified delimiter. + +#### **Functional Programming Challenges** + +7. **Functional Expressions** + - Implement a series of functions that allow for functional expressions such as `five(plus(seven(minus(three()))))`. + +8. **Curried Addition Function** + - Write a function that supports adding numbers in a curried form, such as `add(5)(9)(-4)(1)`. + +#### **Timing Functions** + +9. **Periodic Output** + - Write a function that logs the elapsed time in milliseconds at regular intervals. + +10. **Extended Periodic Output** + +- Implement a function that logs the elapsed time in milliseconds at intervals that increase incrementally. + +#### **Working with Promises** + +11. **Sequential Promise Execution** + +- Write a function to execute an array of functions that return promises sequentially, ensuring each promise resolves before the next begins. + +12. **Promise.all Polyfill** + +- Implement a function that behaves like `Promise.all`. + +13. **Race Condition Handling with Promises** + +- Create a function to handle race conditions, resolving or rejecting with the value of the first promise that settles. + +14. **Promise Chaining and Error Handling** + +- Write a function that handles promise chaining and catches any errors, useful for data fetching scenarios. + +15. **Promisify Node-style Callbacks** + +- Convert traditional Node.js callback-style functions to return promises. diff --git a/tasks/interview-corejs.md b/tasks/interview-corejs.md index f3380dc76..3c627355b 100644 --- a/tasks/interview-corejs.md +++ b/tasks/interview-corejs.md @@ -1,6 +1,8 @@ # CoreJS Interview #2 > **Important**: Passing the CoreJS Interview #2 is a prerequisite for receiving the RS School certificate. +> For rationale behind topic selection, see [interview-corejs-changelog.md](./interview-corejs-changelog.md). +> For the previous version, see [interview-corejs-legacy.md](./interview-corejs-legacy.md). - **Interview Exclusion**: Students cannot be interviewed by their current mentors. - **Open Registration**: Students without a mentor are also eligible to register for an interview. @@ -16,117 +18,99 @@ During the interview, the mentor will: **Post-Interview**: Mentors are required to complete a feedback form via the RS APP > Interviews section. +> **Note for interviewers:** This document lists all possible topics. You are **not** expected to cover every topic — select the areas most relevant to the student's level. The coding section offers a pool of tasks; pick **1-2** for the interview. + ## Interview Topics and Question Examples -### JavaScript Topics +### TypeScript -#### **Modules in JavaScript** +> _Stage 2 core topic: 19 hours of study + mandatory usage in all projects with strict mode._ -- Purpose and concept of a module/module pattern. -- Types of modules (AMD, ES6, CommonJS, UMD). -- Syntax and common features (export default, named exports, exports as). -- Dynamic imports. +- Basic types and type annotations. +- Enums. +- `type` vs `interface`: differences and when to use each. +- Interfaces with optional and read-only properties. +- Function types. +- Utility types: `Partial`, `Pick`, `Omit`, `Record`, `Required`, etc. +- Type guards: `typeof`, `instanceof`, type predicates. +- Type assertions and `const` assertions. +- Generic types: concept, constraints, generic functions. +- Understanding the module system in TypeScript (ES modules, resolution). -#### **Functional Patterns** +### Async Programming & Event Loop -- Callbacks and IIFE. -- Limitations of callbacks (e.g., callback hell). -- Function currying and partial functions. +> _Stage 2 core topic: 10 hours async programming + 4 hours Event Loop module._ -#### **Object-Oriented Programming (OOP)** +#### **Event Loop** -- `new` keyword functionality. -- Constructor functions and their properties. -- Public, private, and static members in OOP. +- Call Stack, Web APIs, Callback Queue, Microtask Queue. +- Microtasks vs Macrotasks: execution order of `Promise.then` vs `setTimeout`. +- How the single-threaded model handles asynchronous operations. -#### **ECMAScript Classes** +#### **Promises** -- Class declaration and syntax. -- Differences between `class` declarations and constructor functions. -- Usage of `super()`. +- Creating and chaining promises. +- Error handling in promise chains (`.catch`, `.finally`). +- `Promise.all`, `Promise.race`, `Promise.allSettled`, `Promise.any`: differences and use cases. -#### **Prototypal Inheritance** +#### **Async/Await** -- Properties like `__proto__` and `prototype`. -- Using [Object.create] to define prototypes explicitly. +- Syntax and relationship to promises. +- Error handling with `try/catch` in async functions. +- Parallel execution patterns (e.g., `Promise.all` with `await`). -#### **ECMAScript Advanced Data Types & Expressions** +#### **Garbage Collection** `(optional)` -- `Set/Map` and `WeakSet/WeakMap`. +- Mark-and-sweep algorithm basics. +- Common causes of memory leaks. +- `WeakMap` / `WeakSet` and their connection to garbage collection. -#### **JavaScript Errors** +### Functional Programming -- Error handling techniques including `try..catch`. -- Understanding and implementing custom errors. +> _Stage 2 core topic: 10 hours dedicated module._ -#### **ECMAScript Advanced** +- Pure functions and side effects. +- Higher-order functions. +- Function currying and partial application. +- Function composition. +- Immutability concepts. -- Promises, async/await, and the event loop. -- Garbage collection basics. +### Design Patterns -### JavaScript in Browser +> _Stage 2 topic: 6 hours module._ -#### **Global object window** +- Creational patterns: Singleton, Factory Method. +- Structural patterns: Decorator, Adapter, Facade. +- Behavioral patterns: Observer, Strategy. +- SOLID principles and their application in project contexts. -- Understanding browser's location and history API. -- User agent parsing and platform/browser detection. +### JavaScript in Browser #### **Page Lifecycle** - Parsing, reflow, repaint, and the critical rendering path. +- Optimizing rendering performance. -#### **Network requests** +#### **Network Requests** -- Using `Fetch` and understanding `XMLHTTPRequest`. +- Fetch API: usage, headers, error handling. +- Concepts of RESTful APIs: methods, status codes, resource design. #### **Timers** - Differences between `setTimeout` and `requestAnimationFrame`. -### TypeScript - -- Writing efficient TypeScript using basic types, enums, interfaces, and generics: - - basic types - - enums - - type / interface, differences between them - - using interfaces with optional properties, read-only properties, etc... - - function types - - utitily types `(optional)` - - typeguards `(optional)` - - creating custom types - - generic types (concept) -- Understanding the module system in ES6 and TypeScript. - -### Design Patterns - -- Familiarity with Creational, Structural, and Behavioral Design Patterns. -- SOLID principles and design patterns in project contexts. - -### Software Development Methodologies - -- Agile, Scrum, Kanban, and Waterfall methodologies. -- Project estimation techniques. - -### Testing - -- Understanding different types of testing (Integration, E2E, Performance). -- Test Pyramid. -- Test-driven development (TDD) and behavior-driven development (BDD). - -### Web Communication Protocols - -- Differences between HTTP and HTTPS. -- Understanding HTTP methods, headers, responses, and status codes. -- Concepts of RESTful APIs. - -### Common Web-Security Knowledge +### Error Handling -- Basic security concepts including CORS, XSS, and OWASP Top 10. -- Authentication mechanisms (JWT, OAuth). +- `try..catch..finally` and error propagation. +- Custom error classes. +- Error handling in asynchronous code (promises, async/await). ### Coding Task Examples -#### **Polyfills and Extensions** +> **For interviewers:** Pick **1-2 tasks** from this pool. Each task typically takes 10-15 minutes. + +#### **Polyfills** 1. **Function.prototype.bind Polyfill** - Implement a polyfill for `Function.prototype.bind`. @@ -134,53 +118,21 @@ During the interview, the mentor will: 2. **Object.create Polyfill** - Implement a polyfill for `Object.create`. -3. **Array.flat Polyfill** - - Implement a polyfill for `Array.flat`. - -4. **Array.reduce Polyfill** - - Implement a polyfill for `Array.reduce`. - -5. **String Repeating Function** - - Create a method that allows a string to be repeated a certain number of times, similar to the native `String.prototype.repeat`. - -6. **Custom Join Function** - - Implement a function that constructs a string from an array of numbers, separated by a specified delimiter. +#### **Functional Programming** -#### **Functional Programming Challenges** - -7. **Functional Expressions** - - Implement a series of functions that allow for functional expressions such as `five(plus(seven(minus(three()))))`. - -8. **Curried Addition Function** +3. **Curried Addition Function** - Write a function that supports adding numbers in a curried form, such as `add(5)(9)(-4)(1)`. -#### **Timing Functions** - -9. **Periodic Output** - - Write a function that logs the elapsed time in milliseconds at regular intervals. - -10. **Extended Periodic Output** - -- Implement a function that logs the elapsed time in milliseconds at intervals that increase incrementally. +4. **Debounce Implementation** + - Implement a `debounce(fn, delay)` function that delays invoking `fn` until `delay` ms have elapsed since the last call. #### **Working with Promises** -11. **Sequential Promise Execution** - -- Write a function to execute an array of functions that return promises sequentially, ensuring each promise resolves before the next begins. - -12. **Promise.all Polyfill** - -- Implement a function that behaves like `Promise.all`. - -13. **Race Condition Handling with Promises** - -- Create a function to handle race conditions, resolving or rejecting with the value of the first promise that settles. - -14. **Promise Chaining and Error Handling** - -- Write a function that handles promise chaining and catches any errors, useful for data fetching scenarios. +5. **Sequential Promise Execution** + - Write a function to execute an array of async functions sequentially, ensuring each resolves before the next begins. -15. **Promisify Node-style Callbacks** +6. **Promise.all Polyfill** + - Implement a function that behaves like `Promise.all`, resolving when all promises resolve or rejecting on the first failure. -- Convert traditional Node.js callback-style functions to return promises. +7. **EventEmitter** + - Implement a simple EventEmitter class with `on(event, handler)`, `off(event, handler)`, and `emit(event, ...args)` methods.