diff --git a/README.md b/README.md
index 904f705..b57aac8 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
:information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
-:bar_chart: There are currently **2138** exercises and questions
+:bar_chart: There are currently **2292** exercises and questions
:books: To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository
@@ -33,7 +33,7 @@
Python |
Go |
Shell Scripting |
- Kubernetes |
+ Kubernetes |
Prometheus |
diff --git a/exercises/aws/ecs_task.md b/exercises/aws/ecs_task.md
new file mode 100644
index 0000000..039e4c2
--- /dev/null
+++ b/exercises/aws/ecs_task.md
@@ -0,0 +1,9 @@
+## AWS Containers - Run Tasks
+
+Note: this costs money
+
+### Objectives
+
+Create a task in ECS to launch in Fargate.
+
+The task itself can be a sample app.
diff --git a/exercises/aws/solutions/ecs_task.md b/exercises/aws/solutions/ecs_task.md
new file mode 100644
index 0000000..e35844e
--- /dev/null
+++ b/exercises/aws/solutions/ecs_task.md
@@ -0,0 +1,26 @@
+## AWS Containers - Run Tasks
+
+Note: this costs money
+
+### Objectives
+
+Create a task in ECS to launch in Fargate.
+
+The task itself can be a sample app.
+
+### Solution
+
+#### Console
+
+1. Go to Elastic Container Service page
+2. Click on "Get Started"
+3. Choose "sample-app"
+4. Verify it's using Farget and not ECS (EC2 Instance) and click on "Next"
+5. Select "None" in Load balancer type and click on "Next"
+6. Insert cluster name (e.g. my_cluster) and click on "Next"
+7. Review everything and click on "Create"
+8. Wait for everything to complete
+
+1. Go to clusters page and check the status of the task (it will take a couple of seconds/minutes before changing to "Running")
+
+1. Click on the task and you'll see the launch type is Fargate
diff --git a/exercises/git/README.md b/exercises/git/README.md
index 64a0cda..c47294f 100644
--- a/exercises/git/README.md
+++ b/exercises/git/README.md
@@ -1,4 +1,6 @@
-## Git
+# Git
+
+## Exercises
|Name|Topic|Objective & Instructions|Solution|Comments|
|--------|--------|------|----|----|
@@ -6,6 +8,8 @@
| Time to Branch | Branch | [Exercise](exercises/git/branch_01.md) | [Solution](exercises/git/solutions/branch_01_solution.md) | |
| Squashing Commits | Commit | [Exercise](exercises/git/squashing_commits.md) | [Solution](exercises/git/solutions/squashing_commits.md) | |
+## Questions
+
How do you know if a certain directory is a git repository?
@@ -56,6 +60,14 @@ There are different ways to check whether a file is tracked or not:
What git status
does?
+### Branches
+
+
+True or False? A branch is basically a simple pointer or reference to the head of certain line of work
+
+True
+
+
You have two branches - main and devel. How do you make sure devel is in sync with main?
@@ -67,10 +79,28 @@ git merge main
```
-#### Git - Merge
+
+Describe shortly what happens behind the scenes when you run git branch
+
+Git runs update-ref to add the SHA-1 of the last commit of the branch you're on into the new branch you would like to create
+
-You have two branches - main and devel. How do you put devel into main?
+When you run git branch
how does Git know the SHA-1 of the last commit?
+
+Using the HEAD file: `.git/HEAD`
+
+
+
+True or False? when you git checkout some_branch
, Git updates .git/HEAD to /refs/heads/some_branch
+
+True
+
+
+### Merge
+
+
+You have two branches - main and devel. How do you merge devel into main?
git checkout main
git merge devel
@@ -125,7 +155,7 @@ is currently pointing at.
-#### Git - Rebase
+### Rebase
You would like to move forth commit to the top. How would you achieve that?
@@ -198,3 +228,11 @@ If you would like to also discard the changes you `git reset --hard``
False. If you would like to keep a file on your filesystem, use `git reset `
+
+## References
+
+
+How to list the current git references in a given repository?
+
+`find .git/refs/`
+
diff --git a/exercises/software_development/README.md b/exercises/software_development/README.md
new file mode 100644
index 0000000..022f8cd
--- /dev/null
+++ b/exercises/software_development/README.md
@@ -0,0 +1,277 @@
+## Software Development
+
+### Agile Software Development
+
+
+What is Agile in regards to software development?
+
+[Atlassian](https://www.atlassian.com/agile/kanban/kanban-vs-scrum): "is a structured and iterative approach to project management and product development. It recognizes the volatility of product development, and provides a methodology for self-organizing teams to respond to change without going off the rails."
+
+
+
+What is Kanban in regards to software development?
+
+* Kanban is an agile software development framework
+
+* It focuses on having flexible and fluid process - no deadlines, fewer meetings, less formal roles
+* While arguable, Kanban seems to fit better small teams rather than big teams who might benefit more from structurized process
+
+
+
+What is Scrum in regards to software development?
+
+* Scrum is an agile software development framework
+
+* Fixed length iterations
+* Requires the team to have roles like scrum master and product owner
+
+
+
+Can you compare between Kanban and Scrum?
+
+* Kanban is continuous, fluid and visualized process whereas Scrum is short and structured, where work is shipped during fixed intervals known as sprints
+
+
+* Kanban is less structured compared to other frameworks like scrum
+* Kanban is more visualized way of managing the development process
+* Kanban has fewer meetings and formal roles compared to other frameworks like scrum
+
+
+### Programming
+
+
+What programming language do you prefer to use for DevOps related tasks? Why specifically this one?
+
+
+
+What are static typed (or simply typed) languages?
+
+In static typed languages the variable type is known at compile-time instead of at run-time.
+Such languages are: C, C++ and Java
+
+
+
+Explain expressions and statements
+
+An expression is anything that results in a value (even if the value is None). Basically, any sequence of literals so, you can say that a string, integer, list, ... are all expressions.
+
+Statements are instructions executed by the interpreter like variable assignments, for loops and conditionals (if-else).
+
+
+
+What is Object Oriented Programming? Why is it important?
+
+
+
+Explain Composition
+
+
+
+What is a compiler?
+
+
+
+What is an interpreter?
+
+
+
+Are you familiar with SOLID design principles?
+
+SOLID design principles are about:
+
+* Make it easier to extend the functionality of the system
+* Make the code more readable and easier to maintain
+
+SOLID is:
+
+* Single Responsibility - A class should only have a single responsibility
+* Open-Closed - An entity should be open for extension, but closed for modification. What this practically means is that you should extend functionality by adding a new code and not by modifying it. Your system should be separated into components so it can be easily extended without breaking everything.
+* Liskov Substitution - Any derived class should be able to substitute the its parent without altering its corrections. Practically, every part of the code will get the expected result no matter which part is using it
+* Interface segregation - A client should never depend on anything it doesn't uses
+* Dependency Inversion - High level modules should depend on abstractions, not low level modules
+
+
+
+What is YAGNI? What is your opinion on it?
+
+
+
+What is DRY? What is your opinion on it?
+
+
+
+What are the four pillars of object oriented programming?
+
+
+
+Explain recursion
+
+
+
+Explain Inversion of Control
+
+
+
+Explain Dependency Injection
+
+
+
+True or False? In Dynamically typed languages the variable type is known at run-time instead of at compile-time
+
+True
+
+
+
+Explain what are design patterns
+
+[refactoring.guru](https://refactoring.guru/): "Design patterns are typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code."
+
+
+
+Explain big O notation
+
+
+
+What is "Duck Typing"?
+
+
+
+Explain string interpolation
+
+
+##### Common algorithms
+
+
+Binary search:
+
+ * How does it works?
+ * Can you implement it? (in any language you prefer)
+ * What is the average performance of the algorithm you wrote?
+
+It's a search algorithm used with sorted arrays/lists to find a target value by dividing the array each iteration and comparing the middle value to the target value. If the middle value is smaller than target value, then the target value is searched in the right part of the divided array, else in the left side. This continues until the value is found (or the array divided max times)
+
+[python implementation](coding/python/binary_search.py)
+
+The average performance of the above algorithm is O(log n). Best performance can be O(1) and worst O(log n).
+
+
+##### Code Review
+
+
+What are your code-review best practices?
+
+
+
+Do you agree/disagree with each of the following statements and why?:
+
+ * The commit message is not important. When reviewing a change/patch one should focus on the actual change
+ * You shouldn't test your code before submitting it. This is what CI/CD exists for.
+
+
+#### Strings
+
+
+In any language you want, write a function to determine if a given string is a palindrome
+
+
+
+In any language you want, write a function to determine if two strings are Anagrams
+
+
+#### Integers
+
+
+In any language you would like, print the numbers from 1 to a given integer. For example for input: 5, the output is: 12345
+
+
+#### Time Complexity
+
+
+Describe what would be the time complexity of the operations access
, search
insert
and remove
for the following data structures:
+
+ * Stack
+ * Queue
+ * Linked List
+ * Binary Search Tree
+
+
+
+What is the complexity for the best, worst and average cases of each of the following algorithms?:
+
+ * Quick sort
+ * Merge sort
+ * Bucket Sort
+ * Radix Sort
+
+
+#### Data Structures & Types
+
+
+Implement Stack in any language you would like
+
+
+
+Tell me everything you know about Linked Lists
+
+ * A linked list is a data structure
+ * It consists of a collection of nodes. Together these nodes represent a sequence
+ * Useful for use cases where you need to insert or remove an element from any position of the linked list
+ * Some programming languages don't have linked lists as a built-in data type (like Python for example) but it can be easily implemented
+
+
+
+Describe (no need to implement) how to detect a loop in a Linked List
+
+There are multiple ways to detect a loop in a linked list. I'll mention three here:
+
+Worst solution:
+Two pointers where one points to the head and one points to the last node. Each time you advance the last pointer by one and check whether the distance between head pointer to the moved pointer is bigger than the last time you measured the same distance (if not, you have a loop).
+The reason it's probably the worst solution, is because time complexity here is O(n^2)
+
+Decent solution:
+
+Create an hash table and start traversing the linked list. Every time you move, check whether the node you moved to is in the hash table. If it isn't, insert it to the hash table. If you do find at any point the node in the hash table, it means you have a loop. When you reach None/Null, it's the end and you can return "no loop" value.
+This one is very easy to implement (just create a hash table, update it and check whether the node is in the hash table every time you move to the next node) but since the auxiliary space is O(n) because you create a hash table then, it's not the best solution
+
+Good solution:
+Instead of creating a hash table to document which nodes in the linked list you have visited, as in the previous solution, you can modify the Linked List (or the Node to be precise) to have a "visited" attribute. Every time you visit a node, you set "visited" to True.
+Time compleixty is O(n) and Auxiliary space is O(1), so it's a good solution but the only problem, is that you have to modify the Linked List.
+
+Best solution:
+You set two pointers to traverse the linked list from the beginning. You move one pointer by one each time and the other pointer by two. If at any point they meet, you have a loop. This solution is also called "Floyd's Cycle-Finding"
+Time complexity is O(n) and auxiliary space is O(1). Perfect :)
+
+
+
+Implement Hash table in any language you would like
+
+
+
+What is Integer Overflow? How is it handled?
+
+
+
+Name 3 design patterns. Do you know how to implement (= provide an example) these design pattern in any language you'll choose?
+
+
+
+Given an array/list of integers, find 3 integers which are adding up to 0 (in any language you would like)
+
+```
+def find_triplets_sum_to_zero(li):
+ li = sorted(li)
+ for i, val in enumerate(li):
+ low, up = 0, len(li)-1
+ while low < i < up:
+ tmp = var + li[low] + li[up]
+ if tmp > 0:
+ up -= 1
+ elif tmp < 0:
+ low += 1
+ else:
+ yield li[low], val, li[up]
+ low += 1
+ up -= 1
+```
+
+
diff --git a/exercises/zuul/README.md b/exercises/zuul/README.md
new file mode 100644
index 0000000..4e78cfc
--- /dev/null
+++ b/exercises/zuul/README.md
@@ -0,0 +1,32 @@
+# Zuul
+
+## Questions
+
+### Basics
+
+
+Describe shortly what is Zuul
+
+From [Zuul's docs](https://zuul-ci.org/docs/zuul/about.html): "Zuul is a Project Gating System. That’s like a CI or CD system, but the focus is on testing the future state of code repositories...
+
+Zuul itself is a service which listens to events from various code review systems, executes jobs based on those events, and reports the results back to the code review system."
+
+
+
+What is Nodepool and how is it related to Zuul?
+
+"Nodepool is a system for managing test node resources. It supports launching single-use test nodes from cloud providers as well as managing access to pre-defined pre-existing nodes."
+
+"Zuul uses a separate component called Nodepool to provide the resources to run jobs. Nodepool works with several cloud providers as well as statically defined nodes (again, simultaneously)."
+
+
+
+What is a Pipeline in Zuul?
+
+A pipeline in Zuul is a workflow. This workflow can be executed based on different events - when a change is submitted to a project, when it's merged, etc.
+The pipeline itself can be applied on one or more different projects (= repositories in hosted or private source control)
+
+
+
+What is a project in Zuul?
+