Week 3 Flashcards
What is a Lambda Expression?
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”)
What is Thread Confinement?
Why are version control tools so important?
What are some examples of Version Control tools
Version Control Systems:
- Git
- Mercurial
- Concurrent Versions System (CVS)
Web Based Repositories:
- Github
- Google Code
Why are Version Control Tools important?
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
What is a Repository?
Place to store all your project files/ documents/ directories
Acts as a server usually based on a safe,secure and reliable machine
What Should we store in the Version Control System?
Source
Build Scripts
Project Documents
Everything you need if your local machines died!
What is a Centralized Repository?
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
What is a Decentralized Repository
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.
What are branches in Repositories?
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
What is Forking?
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
What is Strict Locking?
Only one person can change a file at any one time
What is Optimistic Locking?
All files can be changed, but if changed in the repository since last chek out then local copy needs to be updated before you can commit the change