chapter 5 Flashcards

1
Q

Explain how interpreted, compiled and hybrid languages work and differ from eachother

A

Compiled programming languages: in these languages such as C# or C++, a build step is necessary to translate the source code into executable machine code. This code can then be directly executed by the computer

Interpreted programming languages: unlike compiled languages, interpreted languages like python do not require a build step, instead the source code is executed line by line by an interpreter when you run it

Hybrid programming languages: hybrid is both compiled and interpreted, the code is compiled into bytecode, this bytecode is then executed by the java VM which interprets at runtime

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

Explain what installing actually is

A

Installing typically refers to the process of placing files, such as executable files or dynamic link library (DLL) files onto a computer system in a way that allows them to be used by other programs or the operating system itself

Breakdown of what installing generally entains:
Copying files: copying the necessary files to a specific location on the computers hard drive

Registering components: in case of dll files they often need to be registered in the operating systems registry so that programs can locate and use them. This typically involves updating the registry with information like location and any dependencies the dll files have

Configuring settings: installation processes often involve configuring various settings or options in configuration files based on user preferences or system requirements and making shortcuts

Finalizing dependencies: installation process may involve installing or updating other software components or libraries that are already present

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

Describe how C# and Java are cross-platform and how they try to combine benefits of strictly interpreted and compiled languages

A

To be considered cross-platform it means that software developed in that language can be executed on multiple operating systems without needing significant modifications

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

Describe what Maven is and how it works in general for Java projects

A

Maven is a powerful build automation tool primarily used for java projects. It helps manage libraries, build processes and project documentation. When you click the run button in IntelliJ especially for maven projects, several steps are executed by maven behind the scenes to ensure your code runs smoothly

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

Explain what different parts of a pom.xml file do in relation to Maven: project, modelversion, groupid, artifactid, version, java.version, dependencies, build, plugins

A

Project: the root element of the POM (project object model) file

Modelversion: specifies the version of the POM schema being used

groupId: specifies a unique identifier for your project’s group or organization its typically based on a reversed domain name like com.example

artifactId: specifies the name of the project or artifact, this is the name you give to your project

version: specifies the version of the project

java.version: specifies the version of java required for the project

dependencies: specifies external libraries or dependencies required for your project to compile and run

build: contains configuration for the build process

plugins: specifies additional build plugins or extensions used during the build process

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

Describe what the commands mvn compile, mvn test and mvn package do and how/when they are integrated into a GitHub Actions workflow

A

Mvn compile: if you run this command inside command line in the folder where the pom.xml is located it wil compile the code

Mvn test: if you run this command inside command line in the folder where the pom.xml is it will run all the unit tests that developers coded and will show how many tests failed, got errors and where skipped

Mvn package: if you run this command inside command line in the folder where the pom.xml is located it will compile the code, test the code and it will package the code into a distributed format specified in the projects POM

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

Explain what a unit test is and what its role is

A

Unit tests are a type of test that focus on testing individual units or components of your code in isolation

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