programming-fundamentalslisted
Install: claude install-skill Tibsfox/gsd-skill-creator
# Programming Fundamentals
Programming is the act of giving precise instructions to a machine. Every program, from a one-line script to a distributed system, is built from a small set of fundamental constructs: variables that name values, control flow that directs execution, functions that encapsulate logic, types that constrain data, and error handling that manages the unexpected. This skill catalogs these constructs with emphasis on the mental models that make them learnable and the pitfalls that make them treacherous.
**Agent affinity:** hopper (practical language implementation, debugging), papert (pedagogical scaffolding, constructionist learning)
**Concept IDs:** code-variables-data-types, code-control-flow, code-input-output, code-syntax-style
## Part 1 -- Variables and Data Types
A variable is a name bound to a value. The binding may be mutable (the name can be rebound to a different value) or immutable (the binding is permanent). The value itself has a type that determines what operations are valid.
### Primitive Types
| Type | Examples | Key operations | Gotchas |
|---|---|---|---|
| Integer | 42, -7, 0 | Arithmetic, comparison, bitwise | Overflow (wrapping vs saturating vs panic) |
| Float | 3.14, -0.001, NaN | Arithmetic, comparison | IEEE 754 precision: 0.1 + 0.2 != 0.3 |
| Boolean | true, false | AND, OR, NOT, short-circuit | Truthy/falsy coercion in dynamic languages |
| Character | 'a', '\n', Unicode code point | Comparison, encoding/decoding | Char !=