1.0 Software Development and Design Flashcards
1.5 Explain the benefits of organizing code into: functions
This help with the D.R.Y principle (Don’t Repeat Yourself). Functions are actions that you can call (use the function with provided inputs). Instead of writing 10 lines of code each time to do the same thing(ex: filter/sort/change) on 5 objects you can just make a function and then call it in one line of code.
1.5 Explain the benefits of organizing code into: classes/objects
These help with the D.R.Y principle (Don’t Repeat Yourself). Example: A class could be a car, meaning you define the make, model, color, type, etc…
an object would be a specific instance of a class. example: a White Toyota Camry
1.5 Explain the benefits of organizing code into: modules
This help with the D.R.Y principle (Don’t Repeat Yourself). A module is a library that you can import, allowing use of prebuilt functions otherwise unavailabe.
1.6 Identify the advantages of common design patterns: Observer
It allows observers (objects or subscribers) to receive events when there are changes to a object that is being observed.
The benefit is that observers get real time data from the subject when any change happens. This is going to provide better performance than polling.A pattern where dependent objects are updated or notified by one or more subject objects.
1.6 Identify the advantages of common design patterns: MVC
Model – The model is the data structure of the application. It gets input from the controller.
View – The visual representation of the data. It gets input from the model.
Controller – Takes user input and changes it to the format for the model.
The benefit is that the components can be built in parallel and the components to not need to be aware of the implementation within the other components.
1.7 Explain the advantages of version control
Maintains a history of changes for reference or rollback.
1.8a Utilize common version control operations with Git: Add/remove
Add/Remove a file to/from staging Git for version controlling.
1.8c Utilize common version control operations with Git: Commit
This will take all staged files and snapshot them into Git for version control. This will not update non-staged(added) files.
1.8g Utilize common version control operations with Git: diff
This command will show any changes that have been made since the last commit. It will list every file that has been changed and display what have been modified inside said files.
1.8a Utilize common version control operations with Git: clone
This command creates a local copy of a remote directory. Additionally it synchronizes it with the remote repository. Allowing for push/pull.
1.8d Utilize common version control operations with Git: push/pull
Push: Forces your changes to a repository to the synchronized remote server.
Pull: Updates your repository from a synchronized remote server.
1.8e Utilize common version control operations with Git: branch
Branches are parralel working enviroments to your master branch. Once you make a second branch everything you do on that branch will not affect the original one, and visa versa. You can still work on both, but the will not affect each other.
1.8f Utilize common version control operations with Git: Merge
Merging combines two branches
1. recieving branch: where the changes are being pulled into
2. target branch: where the changes are being pulled from.
1.8f Utilize common version control operations with Git: handling conflicts
Conflicts occur when two merging branches both have changes to the same code in the same file and need to figure out which ones to keep. The way to fix this is after you use the merge command an error will appear and give you the option to choose which you would like to keep, choose one and the conflict is resolved.
1.1 Compare data formats: YAML
YAML is highly human readable, compact and is ideal for configurations. It uses dashes (-) and seperate lines.