These notes are based on Nick Russo's Pluralsight course Getting Started with Software Development Using Cisco DevNet
Useful bash commands:
pwdPrint working directory example:
nms001@nms001:~$ pwd
/home/nms001-
lsList contents -
man <command>print manual for command -
ls -lprovides verbose output of ls -
mkdir <filename>- make director -
cd- change directories -
cd ..- previous directory -
touch <filename>- create file -
mv <sourcefile> <targetdir>- move file to directory -
mv <filetobechanged> <newfilename>- Changes file name, will overwrite existing file -
cp <file1> <file2>copies files as 1:1 -
cat <file1> <file2>- print file contents of one or more files -
nano- edits file -
rm- remove file -
rmdir -r <dir>- remove dir -
env- lists enviroment variables -
export <VARIABLE=<value>- Used to export a variable into current env -
echo <$KEY>- callout a variable -
unset <KEY>- removes variable -
which <APT>- show install location -
pip install--upgrade pip -
pip list- shows current packages -
pip show <package>- shows detailed information including dependencies -
python3.8 -m venv environments/<envname>- create virtualenv -
source <filepath/activate>- starts env -
deactivate- to leave env
It's important to choose the right project methodology for your software development that best suits your customer requirements, team, environment and resources. Doing so will ensure you deliver in a controlled and effective manner.
Waterfall is project methodology that is straight forward and based on several project stages that happen in linear once off sequence. These stages are:
- Requirements: Gather customer requirements
- Design: Design software and implementation plan
- Implement: Implement design
- Test: Test software
- Deliver: Deliver software to client
Advantages: Works well when requirements don't change, c learly defined changes/stages, easy to manage using milestones clearly defined changes/stages, easy to manage using milestones Disadvantages: Cannot adapt to change, hard to go back for fix, testing only at ends become larger.
Agile(SCRUM) project methodology consists of stages called "sprints" much like waterfall they contain the same stages Requirements, Design, Implement, Test, Deliver, however the nature of sprints is they re-occur every 2-3 weeks. This allows for constant customer feedback consistent, allows the project to pivot directions regularly and delivers value sooner. At the end of each sprint there is a review of the sprint it consists of what was achieved, lessons learned and opportunity for customer feed back.
Advantages: Delivers Faster, fosters teamwork/skill share, requires little planning
Disadvantages: Requires constant customer interaction and feedback, not many documents and very people dependent, requires good team leading
| Valued | Less-Valued |
|---|---|
| Individuals/Interactions | Processes and Tool |
| Functional Software | Documentation |
| Customer Collaboration | Contract Negotiations |
| Ability to Pivot | A defined plan |
A sprint encompasses the following events
-
Sprint Planning
- From: Product backlog
- To: Sprint Goal, Sprint backlog
-
Daily Scrum
- From: Daily Progress, Sprint Backlog
- To: Updated Plan
-
Sprint Review
- From: Sprint, Increment
- To: Updated Product Backlog
-
Sprint Retrospective
- From: Past Sprint
- Improvements for next sprint
Product backlog - All requirements managed by the product owner
Sprint backlog - All the work for sprint goal and managed by development team
Increment - Working addition to the product and potentially releasable
Defined: Well defined inputs and the same outputs are produced. Along with same steps
Empirical: Frequent inspection and adaptation occurs as work proceeds, outcomes are often unpredictable and unrepeatable
The LEAN methodology was first developed and used in manufacturing, it's very similar to Agile(SCRUM) but is based on work packages known as WIP(Work In Progress). Each WIP will move through the defined stages, these stages can be simple or complex, a example of these stages maybe Backlog, In Process, Completed. WIP's will be limited in size to ensure they move smoothly and effective through the stages.
Advantages: Minimal work packages with limit in size, very task oriented, fast delivery. Disadvantages : Requires discipline, need sensible wip control, doesn't allow for pet projects, encourages recklessness due to speed of delivery.
-
Functional decomposition - Break it down into functional areas such as one handles db and one handles web front end.
-
Error checking - Make sure there is error checking with good responses, why, what's expected ...
-
Usage of design patterns - A generic reusable solution thats solves reoccurring problems, reduces snow flake issues that require more programming.
Structured data allows for data to be stored in a uniform format, stored in memory and allows data to be decoupled from code.
There are 3 common structured data formats, they are JSON, YAML and XML.
git allows the backup of code, version control and the ability to branch off code to work on new features.
There are 3 areas when working with git locally:
-
Working Directory: Where all current changes are made To move changes to the staging area use
git addTo get rid of changes in a file before it's staged use commandgit checkout -- <file> -
Staging Area: Where changes are saved To move files to the local repo use
git commitTo get rid of changes in a file before it's committed use commandgit reset HEAD <file> -
Local Repo: Where changes are committed To move changes to a remote repo use
git pushTo go back to a different head in the git timeline use commandgit reset <SHAiD> -
Remote Repo: Same as local repo but in the "cloud"
-
There is two important commands when using a remote repo
- To copy the whole repo to your local Working Directory use
git clone <url>and to download any updates that might of pushed by other devs usegit pull <url>. If you wish to just get updates into your local repo usegit fetchand then usegit mergeto get them into your working directory if you wish.
- To copy the whole repo to your local Working Directory use
If you are working on a new feature you might want to make a Branch of the main codes so you can work on it and merge it at a later time when you are happy with it. To create a new branch git checkout -b <filename>, to view where you are in the git tree use the command git log --all --decorate --oneline --graph. Once you are complete with this new feature you can merge it into the main branch, first move to the main branch using git checkout main then use git merge <branchhead>.
When working with a remote repo you can create a local branch and share it with the remote repo by using git push -u origin <branch>, this command pushes your branch up to the remote repo(origin). From here you can create a "Pull Request" to merge it into the master and you can also select Reviewers/Assignees and notes.