forked from MIT-Emerging-Talent/ET6-practice-code-review
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix_solutions_codes
- Loading branch information
Showing
12 changed files
with
715 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,156 @@ | ||
<!-- this template is for inspiration, feel free to change it however you like! --> | ||
|
||
# Retrospective | ||
# Project Retrospective: The Matrix 🕶️ | ||
|
||
## Stop Doing | ||
## Project Highlights 🌟 | ||
|
||
## Continue Doing | ||
### 1. What Went Well during the project? ✅ | ||
|
||
## Start Doing | ||
- **Collaboration Successes** 🤝 | ||
|
||
## Lessons Learned | ||
The team worked cohesively, leveraging each other’s strengths to accomplish | ||
project goals.Effective communication and collaboration ensured | ||
tasks were completed efficiently. | ||
|
||
______________________________________________________________________ | ||
- **Supportive Environment** 💪 | ||
A strong sense of mutual support within the team helped overcome | ||
challenges and maintain momentum throughout the project. | ||
|
||
## Strategy vs. Board | ||
- **Tools and Workflows** 🛠️ | ||
|
||
### What parts of your plan went as expected? | ||
- Despite initial learning curves, the team successfully mastered the use of | ||
the project board to organize and manage tasks efficiently by the end of the | ||
project. | ||
- The team collaborated effectively on GitHub, utilizing pull requests (PRs) | ||
for thorough code reviews and ensuring high code quality. | ||
|
||
### What parts of your plan did not work out? | ||
- **Regular Updates** 🔄 | ||
|
||
### Did you need to add things that weren't in your strategy? | ||
Regular stand-ups and progress updates kept everyone aligned, | ||
ensuring clarity on priorities and reducing misunderstandings. | ||
|
||
### Or remove extra steps? | ||
### 2. Achievements 🏆 | ||
|
||
**Over 300 commits were achieved in under two weeks**, showcasing the team’s | ||
efficiency and dedication. Furthermore, **the team mastered GitHub workflows**, | ||
such as pull requests and code reviews, while **enhancing collaboration and** | ||
**teamwork skills** through the effective use of communication and task management | ||
tools. | ||
|
||
--- | ||
|
||
## Stop Doing 🚫 | ||
|
||
- Resolving merge conflicts independently without collaborating to | ||
ensure all changes are integrated smoothly. | ||
- Submitting code without thorough testing, which led to integration issues. | ||
- Writing overly technical descriptions in issue tickets, making it difficult | ||
for non-programmers to understand. | ||
- Spending too much time solving problems independently | ||
instead of seeking help when needed. | ||
|
||
--- | ||
|
||
## Continue Doing ✅ | ||
|
||
- Maintaining mutual support and collaboration. | ||
- Documenting progress to ensure transparency and alignment within the team. | ||
- Regularly using GitHub to track progress and organize tasks, | ||
leveraging branches and pull requests for better organization. | ||
- Using majority rule through polls to resolve differences of opinion. | ||
|
||
--- | ||
|
||
## Start Doing 🚀 | ||
|
||
- Utilize GitHub’s discussion feature more effectively in future projects. | ||
- Systematically record key learnings in the notes document. | ||
- Keep track of changes that impact the entire group. | ||
- Delete obsolete branches promptly after pull request reviews. | ||
- Establish higher standards for pull requests, testing, and communication. | ||
|
||
--- | ||
|
||
## Challenges Encountered ⚠️ | ||
|
||
### Key Pain Points 🔑 | ||
|
||
- Communication and coordination difficulties. | ||
- Technical issues, such as pull request problems and CI check failures. | ||
- Challenges in maintaining consistency across the codebase. | ||
|
||
### Specific Examples 📌 | ||
|
||
- Availability challenges: Team members were not always | ||
available simultaneously, causing occasional delays. | ||
- Misalignment in task requirements and expectations, leading to inefficiencies. | ||
- Early misuse of the project board hindered task organization. | ||
- Frustrations with resolving merge conflicts and CI failures. | ||
- Instances of working on the wrong project or branch, resulting in delays and corrections. | ||
- Some team members encountered communication barriers, including challenges in | ||
conveying desired code changes effectively due to language differences. | ||
- Connectivity issues limited access to essential online resources. | ||
|
||
--- | ||
|
||
## Lessons Learned 🎓💡 | ||
|
||
### Insights Gained 🔍 | ||
|
||
- Developed a deeper understanding of effective code review practices. | ||
- Enhanced proficiency in GitHub workflows and tools. | ||
- Recognized the importance of constructive feedback and clear communication | ||
for collaboration success. | ||
|
||
### Specific Learnings 📚 | ||
|
||
- Improved communication skills, enabling clearer expression of ideas and insights. | ||
- Learned to request code changes effectively and provide precise, | ||
constructive feedback during reviews. | ||
- Gained expertise in managing merge conflicts proactively with proper workflows. | ||
- Emphasized the importance of regular check-ins to keep the team aligned. | ||
- Discovered the value of teamwork, flexibility, and adaptability in overcoming challenges. | ||
|
||
--- | ||
|
||
## Strategy and Board 📋 | ||
|
||
### What parts of your plan went as expected? ✔️ | ||
|
||
- Successfully completed the expected number of challenges. | ||
- Effectively utilized collaboration and communication tools to share resources | ||
and coordinate tasks efficiently. | ||
- Used GitHub and VS Code as expected, leveraging their features like cloning | ||
repositories, creating pull requests, labeling issues, and tracking tasks. | ||
- Fostered a supportive team environment where members were willing to assist | ||
and support one another. | ||
|
||
### What parts of your plan did not work out? ❌ | ||
|
||
- Merge conflicts were not managed effectively, resulting in delays. | ||
- Communication gaps and language barriers led to duplicated efforts and | ||
inconsistencies during code integration. | ||
- Inefficient use of the project board workflow during early stages hindered organization. | ||
- Time management expectations were not fully met, with the initial voluntary | ||
deadline being missed. | ||
- Resolving errors and CI check failures took more time than anticipated. | ||
|
||
--- | ||
|
||
## Actionable Items for Future Projects 📈🎯 | ||
|
||
- Develop a standardized process for pull requests and code reviews. | ||
- Implement regular check-ins or progress-tracking meetings, ensuring | ||
unresolved challenges are documented for follow-up. | ||
- Foster proactive communication and hold more frequent meetings to ensure | ||
alignment and address challenges. | ||
- Establish detailed plans with clearly defined milestones, schedules, and | ||
deadlines for each project phase. | ||
|
||
--- | ||
|
||
## Collective Reflection 🤝✨ | ||
|
||
The team collaborated effectively despite facing challenges, achieving | ||
significant progress. Moving forward, improved planning, enhanced communication | ||
and efficient task management will ensure smoother execution and even greater success. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
A module for generating Fibonacci sequences. | ||
Module contents: | ||
- generate_fibonacci: Generates Fibonacci sequence up to n terms. | ||
The Fibonacci sequence is a series of numbers where each number is the sum of the two | ||
preceding ones, starting with 0 and 1. | ||
Author: Fahed Daibes | ||
Created: 12-Jan-2025 | ||
""" | ||
|
||
|
||
def generate_fibonacci(n: int) -> list: | ||
""" | ||
Generates the first n terms of the Fibonacci sequence. | ||
Parameters: | ||
- n (int): The number of terms to generate. | ||
Returns: | ||
- list: A list containing the first n terms of the Fibonacci sequence. | ||
Raises: | ||
- AssertionError: If the input is not a positive integer. | ||
Examples: | ||
>>> generate_fibonacci(0) | ||
[] | ||
>>> generate_fibonacci(1) | ||
[0] | ||
>>> generate_fibonacci(5) | ||
[0, 1, 1, 2, 3] | ||
>>> generate_fibonacci("five") | ||
Traceback (most recent call last): | ||
... | ||
AssertionError: Input must be a non-negative integer. | ||
""" | ||
# Defensive check | ||
assert isinstance(n, int) and n >= 0, "Input must be a non-negative integer." | ||
|
||
if n == 0: | ||
return [] | ||
if n == 1: | ||
return [0] | ||
|
||
sequence = [0, 1] | ||
for _ in range(2, n): | ||
sequence.append(sequence[-1] + sequence[-2]) | ||
|
||
return sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# !/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
gcd.py | ||
This module provides a function to calculate the greatest common divisor (GCD) | ||
of two integers using the Euclidean algorithm. | ||
Author: Fahed Daibes | ||
Date: Jan 12 2025 | ||
Group: ET6-foundations-group-16 | ||
""" | ||
|
||
|
||
def gcd(a: int, b: int) -> int: | ||
""" | ||
Calculates the greatest common divisor (GCD) of two integers. | ||
Parameters: | ||
- a (int): The first integer. | ||
- b (int): The second integer. | ||
Returns: | ||
- int: The GCD of the two numbers. | ||
Raises: | ||
- AssertionError: If either input is not an integer. | ||
Examples: | ||
>>> gcd(48, 18) | ||
6 | ||
>>> gcd(101, 103) | ||
1 | ||
>>> gcd(0, 25) | ||
25 | ||
>>> gcd(0, 0) | ||
0 | ||
>>> gcd("eight", 16) | ||
Traceback (most recent call last): | ||
... | ||
AssertionError: Both inputs must be integers. | ||
""" | ||
# Defensive check | ||
assert isinstance(a, int) and isinstance(b, int), "Both inputs must be integers." | ||
|
||
while b != 0: | ||
a, b = b, a % b | ||
|
||
return abs(a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
A module for checking if a number is positive. | ||
Module contents: | ||
- is_positive: Determines if a given number is positive. | ||
Author: [Your name] | ||
Created: 2025-01-08 | ||
""" | ||
|
||
|
||
def is_positive(n: float) -> bool: | ||
"""Determines if a given number is positive. | ||
A number is considered positive if it is greater than 0. | ||
Raises: | ||
TypeError: If the input is not a real number (int or float). | ||
Parameters: | ||
n: float or int, the number to check. | ||
Returns: | ||
bool: True if the number is greater than 0, False otherwise. | ||
Examples: | ||
>>> is_positive(5) | ||
True | ||
>>> is_positive(-3) | ||
False | ||
>>> is_positive(0) | ||
False | ||
>>> is_positive(3.14) | ||
True | ||
>>> is_positive(-2.5) | ||
False | ||
""" | ||
if isinstance(n, bool): | ||
raise TypeError("Input must be a real number (int or float)") | ||
if not isinstance(n, (int, float)): | ||
raise TypeError("Input must be a real number (int or float)") | ||
return n > 0 |
Oops, something went wrong.