General Info Flashcards

1
Q

What is L4 and L5 regarding employment options?

A

L4 indicates that the employer is looking for a software engineer who has been working 1-5 years, or a high quality graduate or PhD.

L5 is a software engineer who has 6-9 years of work experience.

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

What is the MEAN stack? MERN stack? MEVN stack?

A

Using MongoDB, Express, Angular, and Node as development tools

MERN uses React instead of Angular

MEVN uses Vue instead of Angular

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

What is a predicate in programming?

A

Predicates are expressions that map to a Boolean value. So if I have an integer called ‘n’ that’s equal to 5, n == 5 is a predicate expression that maps to true.

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

If your laptop starts from scratch, how do you get a Vue.js project running again?

A

Install from browser:

Git Bash
Atom
NodeJs
MongoDB (If you want to run locally):

Install using installer (all default settings). Then add the mongodb bin folder to the Path environment variable. “C:\Program Files\MongoDB\Server\6.0\bin\mongod.exe” for example. Type env into windows search, advanced, environment variables, click path, then edit, add the path to the blank space (no quotes, and remember “bin" at the end), click okay until you’re out. Make folder data\db in the C drive, or wherever the error shows it should be when you try to run mongod.exe. It should already be running in the background as a service, however, from the installation setup.

Remember when connecting a NodeJS app to the local database, like so:

mongoose.connect(‘mongodb://127.0.0.1:27017/portfolio’, {
useNewUrlParser: true
});

(Used to be able to use localhost instead of 127.0.0.1, but doesn’t work after node version 16)

… the database “portfolio” needs to already exist. It won’t create it for you. To create it, use mongoDBCompass, or create it from the mongoDB shell.

MongoDB shell should be installed from the internet the same way MongoDB was installed. Set the bin folder in the Path environment variable the same as MongoDB. Then type “mongosh” to start the shell. (This has proven difficult, easier to just use the compass.)

For mongoDB Compass, you must download using the MSI installer. Remember MSI. Didn’t work otherwise.

For information on how to use the shell or Compass, look at the MongoDB flash cards. Moving on…

On the command line in the front end folder where the @vue/cli project is located, run:

npm install -g @vue/cli
npm -g update @vue/cli
npm install vue
npm update
export NODE_OPTIONS=–openssl-legacy-provider

Install atom packages:

atom-file-icons
language-vue
language-vue-component
atom-beautify
atom-ide-terminal

In back end folder:

npm install express body-parser multer mongoose (etc.)
npm update

If your mongoose.connect() function is set up properly, the back end should work now. Whole project should run fine now.

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

If you start from scratch, how do you get IntelliJ IDEA running?

A

Get the IntelliJ installer and install it. Then download the latest Java JDK. Remember on windows, if there is an MSI installer, it’s always going to make things easier for you.

Make a new project, edit configuration, make it an app, and include the “Main” class in the default package in the appropriate field.

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

What is the difference between inheritance and polymorphism?

A

Inheritance is when a class extends an existing class so it doesn’t have to redeclare redundant methods.

Polymorphism would be an implementation of a method or class, overriding/overloading functions.

Inheritance inherits things so you don’t have repeat code. Polymorphism implements things not yet implemented, or overrides currently defined methods.

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

What is the difference between overriding and overloading?

A

Overriding implements a particular function with the same name and parameters as a parents class.

Overloading takes a function with the same name but gives it different parameters. This allows the specific function to be distinguished by the parameters passed into it when its used even though it has the same name.

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

What is a monolithic software architecture, and what are the problems with it? What is the solution?

A

Monolithic software architecture is when every part of the application is built as a single unit and deployed as a single unit. This means people working on different aspects of the application need to coordinate the different parts of the application.

The application can get too large and complex, components will inevitably get tightly coupled, you can’t scale a single component, you have to scale the entire app if you’re going to scale it, there are difficulties when individual services have different dependencies/versions, if you make a change you have to test the entire application and deploy the entire thing together, and any bugs in a single module can crash the entire application. All this takes a lot of time to figure out as well.

The solution is a microservices architecture.

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

What is a microservices architecture? What are the downsides?

A

Microservices architecture breaks down an application into a bunch of smaller, independent applications based on business functionality. All services should be able to be built, scaled, tested, and deployed totally independently from the other services. LOOSELY COUPLED. Services have their own versions as well and can be made with their own unique tech stack.

Services communicate using synchronous API calls (they wait for the other services to get the requests and respond). They can also use a message broker or other programs to handle the communication between services.

Some downsides: it can be difficult to configure this communication between services. An error that happens while many instances of these services exist can be difficult to pinpoint where it came from. There are tools such as Kubernetes that helps solve these problems.

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

Describe monorepo and polyrepo and their downsides. When should you use either?

A

Monorepo describes using a single repository to hold many different microservices. This makes managing the code easier, but it also becomes easier to tightly couple services. Also, when the project gets big, cloning the repository and whatnot can become slow. You also need to develop “pipeline code” that ensures only changed services are deployed instead of deploying every microservice when only 1 has changed. Breaking the main branch of this repo will also break it for everyone.

Polyrepo uses many repositories to carry each individual microservice. You can group them using gitlab for example to indicate which repositories belong to the same larger project. Any changes that need to be done together across multiple services is more difficult though.

Use monorepo when the project isn’t that big. Use polyrepo when you have separate teams for each microservice and want complete isolation of the services.

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

What is the DevOps approach? Describe the phases.

A

It’s where the development team (makes the app) and operations team (tests and deploys the app) work in tandem so applications can be built and deployed much quicker.

Phases of the DevOps approach:

Plan – development team plans the application depending on what needs to be delivered to customers.

Code – development team codes the application, including different versions. Uses Git.

Build – development team makes application executable (Maven or Gradle).

Test – development team tests the code, and once it is tested, it is ready for deployment by the operations team.

Deploy + operate – operations team deploys application to a working environment using things like Docker and Kubernetes.

Monitor – operations team monitors app. Nagios is an automation tool for doing so.

Integration – feedback from monitor phase is sent back to planning phase. This is called integration, or continuous integration as it repeats the whole cycle over and over. Jenkins is a tool for this.

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

What issues does DevOps try to solve?

A

When development and operations teams are not working more closely, the developers may not know how the app is going to be deployed, so they don’t code in preparation for that. They may also not know how to deploy or run the app themselves.

Operations may not know how the app works. The notes on how to deploy it may also be poor, so operations will take longer to get things figured out. They may find issues later on and send it back to development to fix them and the app won’t be deployed for a long time.

Development wants fast features deployed while operations wants to maintain stability. These conflicts of interest cause a lack of coordination as well.

Security, application testing, and manual work are also issues that slows the process down.

DevOps automates all these things with different tools so those roadblocks are no longer there. “Release quality code fast.”

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

What is the CI/CD pipeline?

A

It means continuous integration/continuous deployment. It continuously runs tests, packages apps, builds container images (docker), uploads them to a repository, and deploys the app to a server. This is all automated through something like Jenkins.

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

What tools manage container orchestration?

A

Docker compose for smaller applications, Kubernetes for applications with many microservices.

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

What is SRE and how does it relate to DevOps?

A

SRE is Site Reliability Engineering. It has the same goals as DevOps: Release quality code, fast.

SRE is complementary to DevOps and focuses on reliability and keeping applications stable with its own set of tools. Some companies will have an SRE engineer and a DevOps engineer working together to configure the engineering process.

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

What is the difference between the Agile workflow and DevOps work flow?

A

Agile doesn’t have operations. They have different teams developing, testing, and deploying the app as fast as possible.

DevOps has a longer deployment cycle, but it’s more focused on quality. Feedback is given from operations and customers instead of just customers after deployment. The feedback from operations is immediate so they can start fixing issues right away. DevOps also focuses on automations along with speed.

According to the video I watched, DevOps is better for businesses.