Andersen - 1
General questions to understand overall motivation and interest:
- Tell us about your experience in back-end development. Languages, projects. Participation in open source. GitHub activity
hr-behavioral/about-you - Go is a relatively new language. How did you come to it?
go/stdlib-tooling - What interesting/challenging tasks have you solved?
hr-behavioral/about-you
- For which types do you need to allocate memory? Ways to allocate memory a) Required for types: slice, map, array, chan b)
var i = 0c)makecreates an object with default values d)newcreates a pointer to an objectgo/channels - How to implement an OOP approach in Go? Inheritance a) Encapsulation: private variables and methods are written in lowercase b) Inheritance: composition and method embedding c) Polymorphism: use of interfaces
go/structs-methods - Interfaces. Purpose. Usage a) Polymorphism b) Type determination: type switch c) reflect package
go/interfaces - Arrays, slices, strings. Internal structure. How they are passed (pointer or value) a) Arrays are immutable b) Slices are mutable; the append function
go/slices-arrays - Memory allocation. Stack and heap a) Each goroutine allocates an expandable stack b) Pointers and the structures they point to escape to the heap c) Garbage collector: mark & sweep algorithm
go/concurrency - Channels. Purpose. Types of channels a) What is a channel under the hood? Usage patterns i) Buffered - works asynchronously ii) Unbuffered iii) Passing values between goroutines b) What happens if you write to a closed channel? i) Panic c) What happens if you read from a closed channel? i) Default value d) Non-blocking write/read to a channel? i) select case ii) How to check if a channel is closed? iii)
if v, ok:= <-channel; oke) What doeslen(chan)of a unidirectional channel return? i) The number of elements in the channelgo/concurrency - Generics. What are they? How do they work in Go? a) Go 1.18: syntax, purpose. How did you manage without them?
go/generics - Garbage collection. Algorithms a) Tri-color algorithm (black, gray, white), mark & sweep
go/memory-gc - Concurrency a) What are goroutines? How are they structured? How many goroutines can there be? Ratio of goroutines to the number of processors i) A goroutine is a function executed in parallel with others ii) Created via
go+ function call iii) Lightweight (~2 KB of memory) iv) Preemptive multitasking b) The runtime package i) Documentation: pkg.go.dev/runtime ii)runtime.NumGoroutine()- returns the number of goroutines iii)StartTrace()andStopTrace()- execution tracing c) Communication between goroutines i) Usingcontext.Contextfor lifecycle management d) Ways to control goroutine execution (WaitGroup, ErrorGroup) i)sync.WaitGroup- waiting for a group of goroutines to finishgo/concurrency - Context. Types. Purpose a)
context.Background(),context.TODO()b)WithDeadline()- termination by time c)WithTimeout()- termination after an interval d) Data storage: key-value e) Cancellation viacancel()go/context - Goroutine leaks. How to avoid them? a) Goroutines run independently of main b) Infinite loops without exit conditions c) Explicit termination via channels or context d) Using
sync.WaitGroupgo/concurrency - Allocations and sync.Pool a) Memory allocation for structures and global variables b) Deleting from a map/slice does not free memory c) Reusing variables and
sync.Poolgo/sync - Data race & race condition a) What is a data race? i) Competition for data access b) Ways to prevent it i) Mutexes (
sync.Mutex,sync.RWMutex), channels c) What are mutexes? i)RWMutex- separating reads (RLock()) and writes (Lock()) d) Mutexes in the OS i) Protect memory regions from simultaneous accessgo/channels - Profiling. Differences between profiling on desktop and server a) pprof - a performance analysis tool
go/perf-profiling
Development patterns
Заголовок раздела «Development patterns»- SOLID, KISS, DRY, YAGNI
architecture/principles - Dependency inversion
architecture/principles - Dependency Injection (DI)
architecture/principles - Constructor Injection, Setter Injection, Interface Injection (pros and cons of each)
go/interfaces - TDD, DDD
architecture/principles
Algorithms
Заголовок раздела «Algorithms»- Sorting algorithms? Practice. What algorithm does the sort function use? How does quicksort work?
algorithms/sorting-search - Task: Sort a string alphabetically. If the letter is a vowel, the uppercase letter is greater; if it is a consonant, it is smaller
go/strings-runes - Task: Write a program that prints numbers from 1 to 100. For multiples of 3, print «Fizz» instead; for multiples of 5, print «Buzz»; for multiples of both 3 and 5, print «FizzBuzz»
go/basics - Task: F+1=?
algorithms/general
Databases
Заголовок раздела «Databases»- What types of databases do you know? a) Relational (SQL) b) Key-value (Redis) c) Columnar (Cassandra) d) Indexes e) In-memory (Memcached)
sql/general - PostgreSQL. Types of indexes. Isolation levels
sql/indexes - Database scaling methods
sql/replication-scaling - Task: There is a marketplace like AliExpress. Determine the seller whose total purchase amount from you is in second place. Build the table
sql/general
Message brokers
Заголовок раздела «Message brokers»- Which ones exist? What are they used for?
go/basics
Architecture
Заголовок раздела «Architecture»- Task: Design the architecture of Twitter
architecture/system-design - Task: Design a URL shortener service (100k rps)
architecture/system-design
Hardware
Заголовок раздела «Hardware»- How does a server processor differ from a desktop and a laptop processor?
architecture/system-design - What is the typical CPU-to-RAM data exchange speed?
architecture/system-design - What is the typical speed of data exchange with storage?
architecture/system-design - What types of storage systems exist?
architecture/system-design - What is the typical speed of network communication?
network/general - What is the typical amount of RAM on a server?
architecture/system-design
System administration
Заголовок раздела «System administration»- Linux access permissions. File system
linux-os/general - Applications, processes, and threads. What are the differences?
linux-os/processes - File descriptors. What are the limitations?
linux-os/filesystem - How many connections can be opened on a server?
go/interfaces
Security
Заголовок раздела «Security»- Authentication vs. authorization?
security/auth - Authentication methods
security/auth - Encryption. Symmetric and asymmetric
security/crypto