Key Concepts in Software Development
Delegates, Lambdas, and Closures
Delegates: Type-safe function pointers
Lambdas: Anonymous functions
Closures: Functions that capture their environment
Immutable Objects
Cannot be modified after creation
Thread-safe by design
Examples: strings, DateTime
Memory Management
Garbage collection
ref: Pass by referenceout: Must assign value
Pair Programming
Two developers work together
Driver writes code
Navigator reviews and plans
Regular role switching
IDE Features
Debugging tools
Code completion
Refactoring support
Version
Computer Interconnection: Buses, Channels, and Interfaces
Selective Cache Invalidation
To invalidate content selectively, the cache is flushed before a read operation. This forces an update of the main memory content. For a write operation, the processor I/O or channel acts as an extension of DMA, further reducing CPU interference. Traditionally used in mainframes, it’s now common in file servers. These specialized processors execute I/O programs, typically located in the main memory.
Types of Channels
- Selector: Controls multiple fast devices, transferring
Data Structures and Algorithms: Key Concepts
Data Structures
Arrays: Fixed-size, sequentially stored elements. Efficient for index-based access.
Linked Lists: Elements (nodes) linked using pointers. Efficient for insertions/deletions.
Stacks (LIFO): Operations: push(e), pop(), top(), is_empty(), len().
Queues (FIFO): Operations: enqueue(e), dequeue(), first(), is_empty(), len().
Binary Trees: Each node has at most two children (left and right).
- Binary Search Trees (BST): Nodes follow left < root < right rule.
- AVL Trees: Self-balancing BSTs
Analyzing Algorithm Complexities: Binary, Linear, Merge Sort & Recurrences
Algorithm Complexity Analysis
1. Best-Case, Average-Case, and Worst-Case Complexities of Binary Search
Binary search operates on a sorted array. It repeatedly halves the search interval, comparing the target value with the middle element. If the target matches the middle element, its index is returned. Otherwise, the search continues in the left or right half.
Best-case Complexity:
Definition: The minimum time the algorithm takes.
Binary Search Best-case: If the target element is the middle element on
Read MoreC Programming: Arrays, Strings, Structures, Pointers
Numeric Arrays or Vectors
Consider a vector as a sequential formation in memory. All data elements of an array must be of the same data type and the same type of storage.
Declaration
To declare a one-dimensional array, specify the size of the array with a positive integer expression enclosed in square brackets.
Syntax: type-of-storage data-type array_name [expression].
Reference Array Elements
To reference an array element we will use an index. The index value must be a positive integer, it can be an
Read MoreMemory Hierarchy and Main Memory Types in Computers
PART 1: Hierarchy of Memory – (T.1) Basics
LOCATION:
- a) Internal memory: Main memory, CPU registers, memory control unit CPU (microprogrammed control)
- b) External memory: Storage devices and peripherals such as disk and tape
CAPACITY:
Is expressed in bytes or words for internal memory and is usually expressed in bytes for external memory.
UNIT TRANSFER:
- Number of lines of input/output of the memory module (for internal memory)
- Related Concepts:
- Word: “Natural” unit of the organization of memory; its size
