# RG Interview Questions (middle / senior)
## Python
1. Difference between module and package in python
2. Classmethod vs Staticmethod
3. MRO in python, what is it?
4. Override vs overload in programming? Overload in python?
5. Caching in python (+ Numba)
6. Static type checkers (mypy, pytype, pyro)
## Django
1. Types of models inheritance (Abstract, Multi-table, Proxy)
2. Mixins in Django
3. Queryset API, annotations, aggregations
... (was asking other easier questions, need to add more)
1. How do you chain multiple filters in a Django QuerySet?
2. What's the difference between get() and filter() in a Django QuerySet?
3. How do you perform case-insensitive filtering in a Django QuerySet?
4. What is the purpose of the values_list() method in a Django QuerySet?
5. How do you retrieve the distinct values of a field in a Django QuerySet?
6. How do you perform a raw SQL query using the QuerySet API?
7. How can you paginate the results of a Django QuerySet?
## Docker
1. What is a docker image, how to create an image?
2. How to persist data on container deletion?
3. How to create a connection between two docker containers? e.g., an application and db container.
4. How to speed up image build?
5. How to optimize Docker image size?
## React.js
1. How to setup a new application, alternatives to create react app?
2. How to create a production build of react.js app? How to optimize its size? Why is it required to optimize build size?
3. React.js Hooks; what is it? Why are hooks helpful?
4. State management problem in React.js. Props drilling. What are the options are available? Heard of Flux?
5. DOM manipulations, mutations? Solid.js difference?
6. Browser API? How to use in React.js?
7. React Portal
8. MFE. У чому полягає ця архітектура, чи був досвід роботи? Розповісти про трейдофи, які фреймфорки знаєш (module federation, piral) та чи користувався ними. Чи можна таку архітектуру імплементувати без фреймфорків та як? (відповідь: можна - просто деплоїти аплікайшейни незалежно одне від одного, саме так зробив едекс) які мінуси та плюси в порівнянні з фреймворками
9. Які бандлери використовував та який подобаєтся більш всього. Розповісти в двух словах, що взагалі таке бандлер та як він працює. Як взагалі реакт (jsx) попадає в браузер юзеру?
10. Оптимізація білду (minify, uglify)
11. tree-shaking (must have for senior devs)
12. axios custom instance and interceptors
13. npm workspaces
14. semver - розповісти що це та навіщо використовуєтся? (тут просто перевірка чи знає людина, що таке breaking change і що треба бути обережним при підвищенні версій залежностей)
15. react hooks - спочатку просто хай розкаже, якими хуками користуєтся, а потім більш детальні питання (якщо це мідл або вище та нічого сам не скаже про useMemo або useCallback, то погано)
16. useEffect vs useLayoutEffect + cleanup functions
17. is useState sync or async?
18. useEffect without dependency array
19. Tests: enzyme vs react-testing-library. Ideology of react-testing-library
20. i18n
21. accessibility
22. SASS variables vs CSS variables, !default flag
## React.js
Technical
- navigator.clipboard.writeText API
- Language switch
```js
import * as React from "react";
const subscribe = (cb) => {
window.addEventListener("languagechange", cb);
return () => window.removeEventListener("languagechange", cb);
};
const getSnapshot = () => {
return navigator.language;
};
const getServerSnapshot = () => {
throw Error("usePreferredLanguage is a client-only hook");
};
export default function usePreferredLanguage() {
return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
}
```
## System Design
1. What is an architecture style? What styles exist?
2. What diagram kinds for system design do you know?
3. What is a microservice? Microservices communication?
## Databases
1. What databases are supported in Django?
2. How to work with no-sql db (e.g MongoDB) in Django?
3. DB optimization options? (Indexes, scaling, sharding, query optimizations)
4. ER diagrams?
1. What is Redis? How is Redis used in Open edX context? What other use cases for Redis are possible?
## Open edX
1. What cache system is used, how Memcached is different from Redis?
2. What Open edX services (IDA) exist? How is communication organized?
3. What is a plugin? Plugin functionality in Open edX? (pluggable override, pluggable context)
4. What is a modulestore?
5. How CSV reports are being generated in OeX?
6. What is a xblock?
7. What template system is used in OeX?
## Product Engineering
1. Agile? Agile vs Waterfall
2. XP main idea? TDD, other XP practices.
3. CI/CD, DevOps?
4. Estimations options?
## Computer science
1. Tail recursion, quicksort optimization? https://www.geeksforgeeks.org/tail-recursion/, https://www.geeksforgeeks.org/quicksort-tail-call-optimization-reducing-worst-case-space-log-n/
2.
## Senior Software Engineer questions
#### Responsibilities
- Work independently with little supervision
- Have excellent organizational and problem-solving skills
- Have an analytical mind with an aptitude for problem-solving
- Take the lead on operational and technical projects
- Demonstrate the ability to create and maintain relevant processes
- Be able to work with upper management to define software requirements
- Manage project timelines and priorities
- Convert business requirements into technical specifications
- Identify, prioritize and execute tasks in the software development life cycle
- Collaborate with internal teams and vendors to fix and improve products
### Interview questions
- Caching layers in application architecture (cloudfront, nginx cahes, application caches etc.)
- DB optimizing questions
- When would you consider a NoSQL design over an SQL design?
- Create class that register instances and provide an instance list iterator
- What are the differences between functional and object-oriented programming?
- Functional programming avoids mutable states and relies on immutable objects. Object-oriented programming relies on mutable states and in-place modification of objects.
- The main concept in functional programming is the function, where inputs are used in a computation that results in an output. In object-oriented programming, the main concept is the class, which contains instance or class variables that can be manipulated by methods and can be extended or inherited from.
- Refactor a Class.
- here we have to provide a Class that containts method from different domains
- it should be refacgtored fo smaller ones which containts it's own domain logic
- it should be testable
- Design system for scale.
- here we can talk about monolithic versus microservice architecture, DBs count, caching layers, cloud providers etc.
- Sharding vs Chuncking techniques for DBs
- Fizz-Buzz?
- What is the difference between continuous delivery and continuous deployment?
- In what cases is a microservices architecture better than a monolithic one?
- What deployment strategies have you worked with?
- What is a testing pyramid?
- Name OWASP Top 10 Security Flaws
- Securing Rest API endpoints: implementations and best practices
- oauth2, jwt, scopes, permissions
# CS interview questions AUK university
Basics:
1. Development and presentation of algorithms (flowcharts, Activity diagram UML).
Activity diagram - flowchart + data
2. The concept of data types. Dynamic and static typing. Working with variables.
3. Control operators, conditional operators, loop operators.
4. Elements of structural programming tools, functions.
5. Data structures. Arrays. List, queue, stack. Hash tables.
6. Basic algorithms for working with arrays.
7. Recursion and its application in algorithms.
8. Syntax of C-style programming languages.
9. Principles of using closures (anonymous functions, lambda functions).
Functions bound with scope and variables.
Object-oriented programming and program design:
1. Principles of object-oriented programming: abstraction, encapsulation, inheritance and polymorphism.
2. Class. Instances of classes. Partial classes. Abstract classes. Interfaces.
3. Attributes and operations of classes.
Operation - abstract procedures, methods - implementation
4. Aggregation. Composition. Inheritance. Association.
5. Overload and override.
6. Indexers and properties.
c#, getter setter, first is to make object act as iterable, second to restrict access to private params
7. Types of polymorphism.
Based on overloading
Parameters without types
Inherent classes as parameters instead of interface
https://en.m.wikipedia.org/wiki/Polymorphism_(computer_science)
8. Structural, modular and object-oriented programming.
9. Abstract data types.
10. SOLID design principles.
S - single-responsibility
O - open/close
L - substitute, usage of objects of derived classes without knowing it
I - interface segregation, do not bind independent interfaces
D - dependency inversion, depend on abstractions not implementation
11. The concept of GoF design templates.
https://www.digitalocean.com/community/tutorials/gangs-of-four-gof-design-patterns
Databases:
1. The concept of relational databases.
2. Information-logical model of the database.
3. Modeling of data in a relational database. Table, keys, indexes, foreign keys, relations.
4. Basics of SQL language. CRUD operations by means of SQL.
5. SQL language syntax.
6. ER-charts.
7. Aggregation of data from several tables.
8. The concept of data integrity.
9. Normalization of the database schema.
10. Built-in procedures and triggers.
11. The concept of non-relational databases.
Industrial application of modern software frameworks:
1. Individual experience of using frameworks.
2. Backend frameworks, basic principles of application. Basics of MVC pattern for web applications.
3. Data access using ORM tools.
4. Distribution of responsibilities between layers of server-side part of the system.
Presentation, business logic, persistence, data
5. The concept of frontend frameworks. The concept of reactive style of building interactive interfaces. Means of declarative description of UI.
6. Using the REST API in intercomponent interaction.
Fundamentals of software engineering:
1. The concept of system. Software system. Classification of software systems.
2. Software development life cycle (SDLC). Software life cycle processes.
3. Modeling of maturity of processes, CM models: CMM, CMMI.
4. The concept of Rational Unified Process technology as an example of software development
technology.
5. Basics of project management for creating software products.
6. Collection of requirements. Functional and non-functional software requirements.
7. Fundamentals of software design, system and software architecture.
8. Verification, validation, and software quality Assurance.
9. Consistent and flexible methods and frameworks of software development (Waterfall; Agile: Scrum, Kanban, LeSS, SAFe, Lean).
10. Software reuse.
11. Continuous software integration and deployment (CI / CD).
12. Software maintenance and support. The best world practices in the organization of services in the field of information technology. ITIL framework.
13. Standards and knowledge base (body of knowledge, BOK) for software development (Business Analysis, Project Management, Systems Engineering, Software Engineering).
Software project management:
1. The essence of IT project management. Formation of the structure of project work.
2. The main stages of the project life cycle.
3. The role and tasks of the project manager.
4. Project concept. Project initiation and planning.
5. Identification and planning of project resources.
6. Project risks. Development of a risk management plan.
7. Types and categories of project risks.
8. Estimation of complexity and terms of software development.
9. Forming a project team. Distribution of tasks between project participants.
10. Tools for teamwork on the project.
11. General concept of modern flexible (Agile) project management technologies, the concept of
Scrum, External programming, Kanban.
12. Elements of extreme programming: pair programming, refactoring, coding standards and
collective code ownership.