SDCC – Small Device C Compiler
SDCC is an open-source compiler designed for programming small embedded devices using the C language. It supports multiple architectures and is widely used in embedded systems development. (sdcc.sourceforge.net)
Cyclomatic Complexity (CC) in C# measures the number of linearly independent execution paths through a method and is computed as 1 plus the number of decision points in the method’s control flow graph. Decision points include constructs like if, while, for, foreach, case/default labels, continue, goto, logical && and ||, catch, the ternary ?: and the null-coalescing ??; else, do, switch (the keyword itself), try, using, returns, object creation or simple method calls do not increment CC. CC equals the minimum number of tests needed to exercise every independent path, so higher scores indicate code that is harder to read, test and change. Common thresholds used by practitioners: 1-10 low risk, 11-20 moderate, 21-50 high risk, and >50 effectively untestable; Microsoft’s CA1502 flags >25 by default. Tools to measure and enforce CC in .NET include NDepend, Visual Studio’s Calculate Code Metrics, CA1502, Roslyn analyzers (e.g., SonarAnalyzer.CSharp), ReSharper and CodeRush.
A concrete example shows a single method with six ifs and one && scoring CC=8 and refactoring that method into several focused methods reduces per-method complexity while improving readability and testability; the total summed CC can rise but per-method reasoning is what matters. Practical reduction techniques include extract method, early returns/guard clauses, polymorphism, modern pattern matching and switch expressions, lookup tables and avoiding boolean flags. Pair CC with branch coverage and IL-level analysis for third‑party code, and use baseline-driven rules to focus remediation on new or growing complexity rather than overwhelming legacy refactors.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.
SDCC is an open-source compiler designed for programming small embedded devices using the C language. It supports multiple architectures and is widely used in embedded systems development. (sdcc.sourceforge.net)
Claude Code now reads the AGENTS.md file if there is no Claude.md, making the system more standards-compliant. The update is part of new features including Claude Code mods for customization, which are open source. (code.claude.com)
A shortage of senior engineers is imminent as AI replaces entry-level work, hindering the development of future leaders. Companies must actively build and mentor new engineers now to prevent a skills gap in the industry. (blog.herlein.com)
Apple has released the iPhone Duo simulator and Xcode 27.1 beta for developers. These updates enhance testing and development capabilities for iOS applications. (developer.apple.com)
Jeff is a read-only command-line interface designed for semantic code review using Jev. It aims to streamline code review processes by providing a simple, CLI-based tool for developers. (github.com)
Quokka v0.1.0 is a new self-hosted, deterministic programming language that is open source under the MIT license. It aims to provide a self-contained environment for developers to build and run code locally. (quokka.space)
Today's best Hacker News stories, summarized and screenshotted, one email a day.