Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Programming Fundamentals

Core concepts every software engineer must master — from variables and types to memory models and error handling.

Why This Section Matters

Programming fundamentals are the building blocks of all software engineering. Whether you’re writing a simple script or designing a distributed system, these concepts underpin every line of code you write. In interviews, strong fundamentals signal that you truly understand how computers work — not just how to copy-paste solutions.

Chapter Outline

#ChapterKey Topics
1Variables and TypesVariables, constants, literals, primitive vs reference types, value vs reference semantics, stack vs heap, memory layout, mutability
2Scope and LifetimeBlock/function/module/global scope, lifetime, storage duration, closures, variable capture
3FunctionsFunctions, procedures, methods, closures, callbacks, HOFs, recursion, tail recursion, lambdas, generators, iterators
4Error HandlingExceptions, error codes, Result/Option, try-catch-finally, checked vs unchecked, error propagation, assertions
5Type SystemsStatic vs dynamic, strong vs weak, duck typing, structural vs nominal, generics, type inference, coercion
6Memory ModelStack vs heap, pointers, references, smart pointers, GC, manual memory management, leaks, dangling pointers
7I/O and SerializationFile handling, streams, buffers, Unicode/UTF-8, JSON/XML, CLI args, env vars
8Modules and PackagesNamespaces, modules, packages, imports/exports, dependency management, semver
9Interview Questions50+ curated questions across beginner, intermediate, and advanced levels

How to Use This Section

  1. New to programming? Start from Chapter 1 and work sequentially.
  2. Brushing up for interviews? Jump to Interview Questions first, then deep-dive into weak areas.
  3. Need a quick reference? Each chapter includes comparison tables and cheat sheets.