We are here with a workshop which aims at providing you an understanding of SOLID principles via examples taken from various sources. This workshop will help you make code cleaner, more flexible, and easier to change.
We will have a look at how SOLID principles help you in building beautifully designed code bases that stand the test of time. Then we will get our hands dirty by diving into some code snippets and applying SOLID principles to them with our learning.
- Better understanding on SOLID principles.
- Choose better object oriented approaches when developing.
- Fun!
- This repository contains multiple branches named according to your teams. Ex-
team-A
,team-B
etc. - All the branches contain a set of similar probelms.
- Click here to download the
gh cli
tool. - After installing open powershell.
gh auth login
brew install gh
gh auth login
For all the nerds who want to learn and explore more of GitHub CLI
please follow along. If you have already installed gh cli
you can skip to the second section.
Installing gh cli
link
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh
gh auth login
Installation of gh command line in linux
After successful installation of gh cli
, it is now time to start the task at hand.
# Clone the repo
git clone https://github.com/FiftyfiveTech/SOLID_Workshop.git
# Navigate into the root of the repo.
cd SOLID_Workshop
# Fork the repo.
gh repo fork
parentBranch={GroupName} # Replace {GroupName} with your group
candidateName={MemberName} # Replace {MemberName} with your name (no spaces recommended)
branchName="$parentBranch-$candidateName"
git checkout -b $branchName
# All set! add your magic...
# When done
git pull
git add <FilesChanged>
git commit -m "Customized Message"
git push
# Raise PR
gh pr create --title "I did some changes" --body "And it works" --base <branchName> # The branch into which you want your code merged
# All the best :-)
Sample video demonstration on how to fork
, branch
, add, commit, push, and generating PR
Screenshot of PR creation