BG Flashcards

1
Q

What do you know about development design principles and examples?

A

Development design principles are guidelines and best practices that help in creating well-structured, maintainable, and scalable software systems. They include SOLID principles, Test-Driven Development (TDD): Write tests before writing the actual code to promote better code quality and ensure desired functionality., composition over inheritance, separation of concerns, and more. Examples of design principles in action include using interfaces to decouple dependencies, writing modular and reusable code, favoring simplicity over complexity, and applying design patterns like Factory or Observer. These principles aim to improve code quality, reusability, and efficiency in the development process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

differences between TDD and BDD

A

TDD (Test-Driven Development) and BDD (Behavior-Driven Development) are two approaches to software development that focus on testing and specifying desired behavior.

Focus:

TDD: Writing tests first to drive development.
BDD: Defining behavior from stakeholders’ perspective.
Language and Terminology:

TDD: Technical language, unit tests, assertions.
BDD: Business-readable language, scenarios, features.
Test Scope:

TDD: Small, isolated code units (e.g., methods).
BDD: Whole system behavior, integration tests.
Collaboration:

TDD: Collaboration between developers.
BDD: Collaboration among developers, testers, and stakeholders.
User-Focused Perspective:

TDD: Developer-centric, ensuring code correctness.
BDD: User-focused, aligning software with business objectives.
Both approaches improve software quality and promote

While TDD and BDD have some differences, they both aim to improve software quality, increase collaboration, and promote a test-first approach to development. The choice between TDD and BDD depends on the specific needs and context of the project and the preferences of the development team.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

differences between standards of Javascript

A

JavaScript standards define the language and its features. The main standard is ECMAScript (ES), which has versions like ES5, ES6 (ES2015), ES2016, and so on. JavaScript versions refer to the level of ECMAScript support in browsers or engines. Different browsers may have different levels of support, so developers should consider compatibility. Some features may not be widely supported, requiring fallbacks or alternative approaches. Being aware of the standards and supported versions helps write compatible and future-proof code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what to look for when reviewing code

A

During a code review, consider the following:

Readability and Consistency: Is the code easy to understand and consistent in style?

Functionality and Correctness: Does the code achieve its intended purpose and meet requirements?

Maintainability and Modularity: Is the code structured well, modular, and reusable?

Performance and Efficiency: Are there any inefficiencies or redundant code that could affect performance?

Error Handling and Exception Handling: How are errors and exceptions handled?

Security: Are there any potential security vulnerabilities in the code?

Testing: Are there sufficient tests to ensure code quality and coverage?

Scalability and Extensibility: Can the code accommodate future changes and additions easily?

Documentation: Is the code adequately documented for understanding and maintenance?

Code reviews help improve code quality through collaboration and constructive feedback.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how to get up to scratch with new code base

A

To get up to speed with a new codebase:

Read documentation to understand the project’s goals and structure.
Explore the codebase to grasp its organization and naming conventions.
Analyze the code structure and how components interact.
Identify dependencies on external libraries or frameworks.
Review existing tests to understand expected behavior.
Focus on critical entry points or features to dive deeper into the code.
Collaborate with team members for insights and challenges.
Experiment with the code to observe its behavior.
Make small changes to actively engage with the codebase.
Keep learning and document your findings.
Remember, understanding a codebase takes time, so be patient and ask for help when needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is JSX

A

JSX: React uses a syntax extension called JSX, which allows developers to write HTML-like code directly within their JavaScript files. This makes it easier to create and manage UI components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

differences between components

A

Components in web development are reusable building blocks that encapsulate HTML, CSS, and JavaScript. Here are the simplified differences:

Functional Components: Simple and lightweight. Use JavaScript functions to render UI based on input data (props). Cannot have internal state or lifecycle methods (until React 16.8 with Hooks).

Class Components: More powerful. Written as ES6 classes that extend React Component. Can have state, lifecycle methods, and event handling. Suitable for complex components.

React Hooks: Allows functional components to have state and lifecycle capabilities without classes. Introduced in React 16.8. Promotes code reusability and a functional programming style.

Choose based on component complexity and project needs. Functional components are lightweight, class components provide more features, and hooks enable functional components to have state and lifecycle control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

different features of react and what they do

A

React is a JavaScript library for building user interfaces. Here are the simplified features:

Virtual DOM: React efficiently updates the UI by comparing a lightweight virtual representation of the DOM with the actual DOM.

Component-Based Architecture: UI is divided into reusable components for better code organization and reusability.

JSX: HTML-like code in JavaScript for describing component structure and content.

Unidirectional Data Flow: Data flows from parent components to child components for predictable state management.

State and Props: Components can have internal state for managing mutable data, and props for passing data between components.

Lifecycle Methods: Actions performed at different stages of a component’s lifecycle, like initialization and rendering.

Reconciliation and Diffing: Efficiently updates the DOM by determining minimal changes through comparison.

React simplifies UI development by providing a component-based structure, efficient rendering, and state management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

main components of Ember

A

The main components of Ember.js are:

Router: Manages the application’s URL structure and maps it to different states.

Route: Defines the behavior and data for a specific URL or route.

Controller: Acts as a mediator between data and templates, allowing manipulation of data and responding to user interactions.

Model: Represents the application’s data objects and defines their structure and relationships.

Component: Reusable UI building blocks that encapsulate HTML, CSS, and JavaScript code.

Template: Defines the structure and content of the user interface using the Handlebars templating language.

Service: Shared functionality or data that can be used across different parts of the application.

These components work together to build Ember.js applications following the MVC pattern, where the Router manages URLs, Routes handle behavior and data, Controllers manage state, Models represent data, Components create reusable UI, Templates define the UI structure, and Services provide shared functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how these individual components do and how they’re structured

A

Ember.js is structured around the Model-View-Controller (MVC) architectural pattern, and the components within Ember.js have specific roles and responsibilities:

Router:

Manages the application’s URL structure and maps URLs to different application states.
Defines routes, their corresponding templates, and actions to be executed when a route is accessed.
Handles transitions between different routes and manages the application’s navigation.
Route:

Handles the behavior and data for a specific URL or route.
Loads and prepares data from APIs or services.
Renders templates and manages actions related to the specific route.
Can set up and tear down resources needed for a route.
Controller:

Acts as a bridge between the data (model) and the templates (view).
Contains properties and actions that can be used in templates to manipulate data or respond to user interactions.
Can manage the state of the application and handle actions triggered by the user.
Model:

Represents the data objects of the application.
Defines the structure and behavior of the data, including relationships with other models.
Models can be fetched from APIs, updated, and persisted to backend servers using Ember Data or other data libraries.
Component:

Reusable UI building blocks that encapsulate HTML, CSS, and JavaScript code.
Components have their own properties and actions.
Encourages code modularity and reusability.
Can have a template associated with it for defining the component’s structure.
Template:

Defines the structure and content of the user interface.
Uses the Handlebars templating language to embed dynamic content, iterate over data, and control the rendering of components.
Templates can include expressions and helpers for rendering dynamic data and controlling the UI.
Service:

Provides shared functionality or data that can be used across different parts of the application.
Acts as a singleton, with a single instance shared throughout the application.
Can be injected into components, controllers, or routes to access its functionality or data.
The components within Ember.js work together in a structured manner. The Router manages the application’s URL structure and routes, which define the behavior and data handling. Controllers act as intermediaries between models and templates, while components encapsulate reusable UI elements. Templates define the structure and content of the user interface, and services provide shared functionality or data across different parts of the application. This structured approach helps in organizing code and building maintainable and scalable applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how you overcame a challenge

A

To overcome challenges as a software developer, follow these simplified steps:

Understand the challenge: Break it down into smaller tasks.

Research and learn: Gather information and explore solutions.

Plan and design: Create a strategy and consider risks.

Collaborate and seek help: Get guidance from others.

Implement and test: Develop the solution and validate it.

Debug and troubleshoot: Fix issues step by step.

Take an iterative approach: Make incremental progress and improve based on feedback.

Keep learning: Embrace growth and apply lessons to future projects.

By following these steps, you can navigate challenges effectively in software development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how you identify risks

A

To identify risks as a software engineer:

Understand the project: Know the project’s requirements, goals, and constraints.

Assess technical aspects: Evaluate technology, code complexity, and dependencies.

Analyze requirements: Look for ambiguities, conflicts, or unrealistic expectations.

Consider third-party dependencies: Evaluate risks related to external libraries or services.

Factor in time and resources: Assess constraints that may affect deadlines or resources.

Prioritize communication: Identify risks related to miscommunication or collaboration issues.

Address security and privacy: Consider risks related to data breaches or vulnerabilities.

Focus on user experience: Assess risks related to usability and user satisfaction.

Document and maintain: Look for risks related to documentation and code maintainability.

By following these steps, software engineers can effectively identify risks and take appropriate measures to mitigate them during the software development process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how you overcame constructive feedback as a Software Engineer

A

As a software engineer, overcoming constructive feedback is an essential part of personal and professional growth. Here’s a simplified approach to handling constructive feedback:

Embrace a Growth Mindset: View feedback as an opportunity to learn and improve. Embrace the mindset that constructive feedback helps you become a better engineer.

Listen and Understand: Actively listen to the feedback and seek to understand the specific points being raised. Avoid becoming defensive or taking it personally.

Appreciate the Intent: Recognize that constructive feedback is given with good intentions to help you improve your skills and contribute to the team or project’s success.

Analyze and Reflect: Take time to reflect on the feedback. Analyze the validity of the points raised and consider how they align with your goals and professional development.

Seek Clarification: If the feedback is unclear or you need more information, don’t hesitate to ask for clarification. Seek examples or specific suggestions to gain a better understanding.

Identify Actionable Steps: Break down the feedback into actionable steps or areas for improvement. Determine specific actions you can take to address the feedback effectively.

Take Ownership: Accept responsibility for your growth and take ownership of implementing the feedback. Actively seek opportunities to apply the suggestions and make positive changes.

Seek Guidance: If needed, seek guidance from mentors, more experienced colleagues, or the feedback provider themselves. They can offer insights, guidance, and support in implementing the necessary improvements.

Continuous Improvement: Incorporate the feedback into your ongoing professional development. Regularly assess your progress and seek feedback from others to ensure you’re continuously improving.

Remember that constructive feedback is an opportunity for growth and improvement. By adopting a positive mindset, actively listening, analyzing the feedback, taking ownership, and seeking guidance when needed, you can effectively overcome challenges and enhance your skills as a software engineer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what are array methods

A

Array methods are built-in functions in programming languages, specifically designed to work with arrays. They provide convenient ways to manipulate, iterate, and perform operations on arrays. Here are some common array methods:

push(): Adds one or more elements to the end of an array and returns the new length of the array.
pop(): Removes the last element from an array and returns that element.
concat(): Combines two or more arrays and returns a new array.
join(): Joins all elements of an array into a string, using a specified separator.
slice(): Extracts a portion of an array into a new array, without modifying the original array.
splice(): Changes the contents of an array by removing, replacing, or adding elements at a specific position.
indexOf(): Returns the first index at which a specified element is found in an array, or -1 if not found.
includes(): Checks if an array contains a specific element and returns true or false.
forEach(): Executes a provided function once for each array element.
map(): Creates a new array by performing a specified function on each element of the original array.
filter(): Creates a new array with all elements that pass a specific condition.
reduce(): Applies a function against an accumulator and each element in the array to reduce it to a single value.
sort(): Sorts the elements of an array in place.
reverse(): Reverses the order of the elements in an array.
length: Property that represents the number of elements in an array.
These are just a few examples of array methods available in many programming languages. Each method serves a specific purpose and provides a convenient way to perform operations on arrays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

State management - library you could use to manage state?

A

Redux is a popular state management library that can be used to manage state in JavaScript applications. It provides a centralized approach to managing application state, making it easier to handle complex data flows and maintain a consistent state across components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do you write in a pull request?

A

In a pull request, include the following:

Title: A clear and concise summary of the changes.
Description: Detailed explanation of what was changed and why.
Changes Made: Outline the specific modifications made.
Testing: Describe how the changes were tested.
Impact: Explain how the changes affect the system.
Related Issues: Link any relevant issues or tasks.
Reviewer Requests: Specify who should review the code.
Screenshots or GIFs: Provide visuals if necessary.
Documentation Updates: Mention any documentation changes.
Additional Notes: Include any important details.
Following these guidelines helps ensure clear communication and effective code review.

17
Q

What is new in ES6

A

ES6, also known as ECMAScript 2015, introduced several new features and improvements to the JavaScript language. Here are some key additions in ES6:

Arrow Functions: A concise syntax for writing anonymous functions using the => arrow notation.

Template Literals: The ability to create multi-line strings and embed expressions within backticks (`).

Let and Const: The introduction of block-scoped variables using let and constant variables using const, providing better control over variable declarations and immutability.

Enhanced Object Literals: Simplified syntax for creating objects with concise property definitions, including dynamic property names and method shorthand.

Destructuring Assignment: Allows extracting values from arrays or objects into distinct variables in a concise manner.

Default Parameters: The ability to assign default values to function parameters if no argument is provided.

Rest and Spread Operators: The rest operator (…) allows capturing multiple function arguments into an array, while the spread operator expands elements of an array or object.

Classes: A new syntax for creating classes and working with inheritance in a more object-oriented manner.

Modules: Native support for importing and exporting modules, enabling better organization and separation of code into reusable modules.

Promises: Introduces the Promise object for handling asynchronous operations, providing a more structured approach to handling asynchronous tasks.

These are just a few of the notable features introduced in ES6. The update brought many other enhancements, such as improved array manipulation methods (map(), filter(), etc.), the for…of loop for iterating over iterable objects, and the Symbol data type for creating unique identifiers. ES6 significantly enhanced JavaScript’s capabilities and made the language more expressive and developer-friendly.

18
Q

Name two react hooks - what do they do

A

useState: useState is a hook that enables functional components to have state. It allows you to declare a state variable and provides a function to update that variable. It returns an array with two elements: the current state value and a function to update the state. You can use this hook to manage and update state within a functional component.

useEffect: useEffect is a hook used to perform side effects in functional components. It allows you to run code after the component has rendered, handle subscriptions, or perform cleanup tasks when the component unmounts. It takes a function as its first argument and an optional array of dependencies as the second argument.

19
Q
A

In React, “props” (short for properties) are a way to pass data from a parent component to its child component(s). Props are a mechanism for communication and allow components to be customizable and reusable.

Props are passed as attributes to child components when they are rendered. The parent component supplies the values for these attributes, and the child component can access and use those values within its own logic and rendering.