Training Day2 - adithnaveen/swiggy-2020-july GitHub Wiki
College Project
4 People per project write code DB Testing Team Management Documentation - Presentation - Report
Water Fall Model
- Requirement
- Design
- Implement (Development)
- Testing
- Maintenance
in agile
-
No Manager (Scrum Master) since it is smaller it is faster The investor (Stakeholder) can also be part of the developer ~ definite time (story points - spends 8 hrs - 32 hrs of work = 3.75)
-
pair programming I T COMB (TTTT) Agile will never force you to take more work
-
maybe in the planning
-
time estimation ~
Project Selection (DDD) - Deliver Business Value
Talking stakeholder - How the application is done (a few cases Given When Then) - BDD
you will validate the BL with Test cases (TDD)
Everything is in the form sprint (Scrum [fixed time line], Kanban [no fixed time, this only for the job])
Backlog Sprint - pertaining for the particular sprint Epic -> User Stories (login, add the product to cart) 1 Sprint - 1 Epic
1 Epic - N User Stories
1 User Story - N Task
1 Task - N SubTask
Product - All user stories from the product owner and stakeholder
Go Lang - Day 2
Variable Decl
Explicit Decl (specify Data type) prefix with var = var anInteger int = 10; var aString string = "hello"
Implicit Decl (don't specify data type ) := assignment operator, without var anInteger := 44 (will take the value and create the variable of the specific type) aString :="How Are You"
constant (you cannot change the value once assigned)
explicit const anInteger int = 34;
implicit const aString = "hlo how are you "
Boolean - bool
String - string
Integer - uint8, uint16, uint32, uint64, int8, int16, int32, int64
Aliases - byte int, uint, uintptr
Folat - folat32, float 64
Complex - complex64, complex128
Predeclared Complex Types
Data Collection - Arrays, Slices(dynamic), Maps, Structs
Language-Specific Constructs - Functions, Interfaces, Channels, Routies (Thread)
Data Management - Pointers
No implicit conversion Ex: var int1 int = 10 var float1 float = 23
// this will not work
sum:=int1 + float1
mismatched types from int and float
solution (wrap value in target type, like a function call float64(value))
sum:=float64(int1) + float1
new(), make() - to initialize
- new() - allocated but does not initialize the memory, result in zero storage, also returns the address
- make() - allocated and initialized the memory, non-zero storage and returns the memory address The make built-in function allocates and initializes an object of type slice, map, or chan (only).
you don't have to take of memory deallocation - it's done automatically
func Errorf(format string, a ...interface{}) error func Printf(format string, a ...interface{}) (n int, err error)
slice mynumber = make([] int ,500000000, 3)
List number = new ArrayList<>(5); - size -> 0
-- Varun code sort.Slice(ints, func(i, j int) bool { return ints[i] > ints[j] })
type IntSlice []int
type MyString string
type Animal interface { Speack() string Walk() string Age() int }
ints -> slice []int
IntSlice attaches the methods of Interface to []int, sorting in increasing order.
ints-> type Interface interface { Len() int Less(i, j int) bool Swap(i, j int) }
sort.Sort(sort.Reverse([] int)) sort.Sort(sort.Reverse(sort.IntSlice(ints))
[2] - arrays , [] - slice (only Value)
Key, Value (Map) "Harry", "#123, Conconrd Street, Virginia" 123, "Harry"
in java
interface MyInterface{ void speak(); }
// it is a mandate to override the method in child class class Dog implements MyInterface. { void speak(){} }
c++
class SomeClass{ void someFunction()=0 }
class Dog : SomeClass. {
public :
void someFunction(){}
}
Program
- Write a program which has the struct Emp -> empid, empname, salary, address type Address struct { hno, street, city, pin }
Accept the values from the end-user, for initial 5 employees, you should give an option for use to quit in between Q (if Condition) then display the details
There is a need for contracting to eat, sleep, breath -> interface called Animal If the user enters more than 5 employees then the size of the slice should be +5