Skip to main content

Posts

Showing posts from May, 2020

Maps In GoLang

✌ Go provides another important data type map that maps unique keys to values. A key is an object that you use to retrieve a value at a later date. Given a key and a value, you can store the value in a Map object. After the value is stored, you can retrieve it by using its key. A Go map type looks like this: map[KeyType]ValueType Declaration and initialization: 1) m := make(map[string]int) 2) m := map[string]int{} 3) var m map[string]int{} Map to get key of value : 1). i := m["route"] 2). i, ok := m["route"] 3). for key, value := range m {            fmt.Println("Key:", key, "Value:", value)      } The built-in len function returns on the number of items in a map: n := len(m) The built-in delete function removes an entry from the map: delete(m, "rouzte") GO Program : package main import ( "fmt" ) func main() {                var m = make(map[st

System Design | Design Scalable Systems

✋System design is the process of designing the elements of a system such as the architecture, modules, and components, the different interfaces of those components, and the data that goes through that system. The purpose of the System Design process is to provide sufficient detailed data and information about the system and its system elements to enable the implementation consistent with architectural entities as defined in models and views of the system architecture. 1) Requirements Clarification: the beginning point of software development activity. Software requirement is one such area to which little importance was attached in the early days of software development, as the emphasis was on coding and design. The main assumption was that the developers understood the problem clearly when it was explained to them, generally informally. Therefore, the need for a more rigorous requirement analysis phase arose. Now, for large systems 2) System Interface Definition: Int