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 {
	sum := 0
	return func(x int) int {
		sum += x
		return sum
	}
}

func main() {
	pos, neg := adder(), adder()
	for i := 0; i < 10; i++ {
		fmt.Println(
			pos(i),
			neg(-2*i),
		)
	}
}

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.

3 Polymorphism, Dynamic Dispatch, Prototypes

4 Workflow

  1. Jira, recieve task, remove completed tasks
  2. Slack, collab
  3. Documentation, markdown Slab, Confluence, Azure DevOps wiki
  4. Version control git
  5. Code management,releases and versions workflow, Github, Azure DevOps
  6. Coding
  7. Learn company framework
  8. Use testing framework , mocking , text fixture management, code coverage report
  9. testing to CI pipeline - takes code and runs test
  10. linting code
  11. dependency management
  12. Submit PR, after acceptance code goes though CD
  13. 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