Week 3 Flashcards

1
Q

What is a Lambda Expression?

A

A block of code that you can pass around between objects

Syntax is (arguments) -> (body)

Examples:

(int x, int y) -> {return x * y};

s -> {System.out.println(s) }

() -> System.out.println(“Hello from a Lambda expression”)

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

What is Thread Confinement?

A

Thread confinement is a concurrency technique where an object is accessed exclusively by a single thread, ensuring that it is never accessed simultaneously by multiple threads.

This simplifies development because no synchronization is needed for the object as long as it remains confined to the same thread.

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

Why are version control tools so important?

A

Revision Card: Importance of Version Control Tools

1. Tracking Changes:

Allows you to see what changes were made, who made them, and when.

Helps understand the history of changes and easily identify when a problem was introduced.

2. Collaborating:

Multiple people can work on the same project or document without overwriting each other’s work.

Enhances team collaboration and efficiency, making it easier to integrate work from different team members.

3. Backup and Restore:

Keeps a backup of every version of a file or project.

You can revert to previous versions if something goes wrong, ensuring work is never lost.

4. Branching and Merging:

Allows creation of separate ‘branches’ for experimenting or working on new features without affecting the main project.

Provides a safe environment for testing new ideas and seamlessly integrating them back into the main project.

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

What are some examples of Version Control tools

A

Version Control Systems:

  • Git
  • Mercurial
  • Concurrent Versions System (CVS)

Web Based Repositories:

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

Why are Version Control Tools important?

A

Gives the development team a project-wide ‘undo button’

Allows multiple developers to work on same code base in a controlled manner - code that no longer lost through overwrites

Keeps record of changes

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

What is a Repository?

A

Place to store all your project files/ documents/ directories

Acts as a server usually based on a safe,secure and reliable machine

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

What Should we store in the Version Control System (hint: S,BS,PD)?

A

Source

Build Scripts

Project Documents

Everything you need if your local machines died!

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

What is a Centralized Repository?

A

centralized repository is a single location where all data or files are stored

Think of it like a library where all the books are kept in one place. When someone wants to access a book (or data), they go to that library. If the library is closed or the book is checked out, it can’t be accessed. In this model, there’s usually one main authority or organization that controls and manages the repository

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

What is a Decentralized Repository

A

A decentralized repository spreads data across multiple locations or nodes.

Instead of relying on a single point of control, each participant has a copy of the data. This is like a group of friends who each have their own copies of a book—if one person loses theirs, others still have access. This model is often more resilient because even if one node goes down, the data remains accessible from others.

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

What are branches in Repositories?

A

Branching in repositories is a way to create separate lines of development within a project

It allows multiple versions of a project to be worked on simultaneously without affecting the main or stable version

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

What is Forking?

A

Somewhat different from the term branching

Means independant branch of development

Forking means making a copy of someone else’s project so you can work on it yourself

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

What is Strict Locking?

A

Only one person can change a file at any one time

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

What is Optimistic Locking?

A

All files can be changed, but if changed in the repository since last check out then local copy needs to be updated before you can commit the change

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