Software Engineering lessons
Posted on February 2, 2022
Tags: softdev
1 On JS and Golang
1.1 Closures and Objects
Closures are the Poor man’s Objects
- Closures means that our function remembers it’s state through it’s surrounding environment
- JS functions are Objects
- Golang functions can also behave like Objects using closures
func adder() func(int) int {
:= 0
sum return func(x int) int {
+= x
sum return sum
}
}
func main() {
, neg := adder(), adder()
posfor i := 0; i < 10; i++ {
.Println(
fmt(i),
pos(-2*i),
neg)
}
}
1.2 Promises
- JS promises are just continuations
- JS async await is just a callcc monad
2 Interface vs Abstract Class
Abstract Class is just interfaces with a base(Default) class implementation.
Having both Interface and Abstract Classes is redundent.
Just use Interfaces.
- Problem: Adding new parameters to an interface can break all implementations
- Solution: Create a new interface with the new parameter that inherits the old interface.
- The new interface is a superset of the old interface.
3 Polymorphism, Dynamic Dispatch, Prototypes
- Dynamic Dispatch: When class inherits a chain of parent classes, when a method is called but not found, it will keep moving up the chain of parents until it finds a method or return an error.
- This is the main feature of polymorphism
- growl() method of parent class Animal called differently(Dynamically Dispatched) by the cat and dog class that inherits growl().
- This is the main feature of polymorphism
- Dynamic Dispatch is also called Delegation
- In static languages, it’s called Static Dispatch
- JS
._proto_
is given too all JS objects.
4 Workflow
- Jira, recieve task, remove completed tasks
- Slack, collab
- Documentation, markdown Slab, Confluence, Azure DevOps wiki
- Version control git
- Code management,releases and versions workflow, Github, Azure DevOps
- Coding
- Learn company framework
- Use testing framework , mocking , text fixture management, code coverage report
- testing to CI pipeline - takes code and runs test
- linting code
- dependency management
- Submit PR, after acceptance code goes though CD
- SQL
4.1 Terms
- API, IOT, IaaS SaaS PaaS DaaS MSaaS MBaaS DCaaS iPaaS ITMaaS , CRM, MIS, ERP, HRM, CM,GIS, DBMS, CAD
4.1.1 Project manager terms
- WBS - Work Breakdown Structure
- Milestones - Significant point in project
- Baselines - Approved plan and Schedule
- This defines failed and successful project
- Triple Constraint - Balance {Time, Cost, Scope}
- Project life cycle -
- Gantt Chart - Dates, Durations and forecasts
- CCB - Change Control Board : Stakeholders that approve or deny project and scheduling changes