kodformatering
Kodformatering refers to the conventions used when writing source code to improve readability and maintainability. It covers indentation, line length, spacing around operators, blank lines, brace placement, and the consistent use of comments and naming conventions. While the syntax of a language determines what code does, its formatting is a stylistic choice adopted by a project or community.
Purpose was to make code easier to read, review, and modify; to reduce visual noise; to standardize
Practices commonly include indentation with spaces or tabs, a maximum line length (often 80 or 100 characters),
Standards and tools: Many languages have official or de facto style guides (Python's PEP 8, Java's Google
Impact and adoption: Codebases with consistent formatting are easier to read and review; automated formatting reduces