<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gian Michele Pasinelli</title>
    <description>The latest articles on DEV Community by Gian Michele Pasinelli (@mik1981).</description>
    <link>https://dev.to/mik1981</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3950585%2F3b4c0765-4b35-4404-bac0-960303e1f3ec.png</url>
      <title>DEV Community: Gian Michele Pasinelli</title>
      <link>https://dev.to/mik1981</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mik1981"/>
    <language>en</language>
    <item>
      <title>CalcDocs Gets Even Better: Interactive Tolerance Propagation in the Distribution Webview in VS Code</title>
      <dc:creator>Gian Michele Pasinelli</dc:creator>
      <pubDate>Thu, 25 Jun 2026 12:15:36 +0000</pubDate>
      <link>https://dev.to/mik1981/calcdocs-gets-even-better-interactive-tolerance-propagation-in-the-distribution-webview-in-vs-code-4hii</link>
      <guid>https://dev.to/mik1981/calcdocs-gets-even-better-interactive-tolerance-propagation-in-the-distribution-webview-in-vs-code-4hii</guid>
      <description>&lt;p&gt;CalcDocs introduces an updated distribution-based uncertainty propagation engine integrated directly into its VS Code webview. The goal is to support engineers working with formulas and derived quantities where input variability is not negligible, and where spreadsheet-based workflows become a bottleneck in reviewability, traceability, and iteration speed.&lt;/p&gt;

&lt;p&gt;The focus of this update is not only interactivity, but &lt;em&gt;coherence between model, code, and documentation&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem context
&lt;/h2&gt;

&lt;p&gt;In embedded and low-level engineering, calculations are rarely purely deterministic. Typical workflows involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nominal values with tolerances&lt;/li&gt;
&lt;li&gt;measured parameters with noise&lt;/li&gt;
&lt;li&gt;datasheet-derived ranges&lt;/li&gt;
&lt;li&gt;assumptions that evolve during design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Despite this, most workflows still rely on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;spreadsheets disconnected from source control&lt;/li&gt;
&lt;li&gt;scripts detached from documentation&lt;/li&gt;
&lt;li&gt;manual propagation of uncertainty&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates friction in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reviewability&lt;/li&gt;
&lt;li&gt;reproducibility&lt;/li&gt;
&lt;li&gt;change tracking&lt;/li&gt;
&lt;li&gt;design validation over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CalcDocs addresses this by embedding both formula definition and uncertainty propagation into a single text-based model inside the editor.&lt;/p&gt;




&lt;h2&gt;
  
  
  Model overview
&lt;/h2&gt;

&lt;p&gt;CalcDocs represents a system as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a set of scalar or derived variables&lt;/li&gt;
&lt;li&gt;optional input distributions per variable&lt;/li&gt;
&lt;li&gt;a deterministic formula graph&lt;/li&gt;
&lt;li&gt;a propagation engine producing output distributions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each input variable can optionally be associated with a distribution (e.g. uniform, normal, bounded empirical models depending on configuration).&lt;/p&gt;

&lt;p&gt;The system evaluates the full graph and produces an output distribution rather than a single scalar value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzn2orfrl4e50qk1z8smy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzn2orfrl4e50qk1z8smy.gif" alt="Tolerance propagation in the webview" width="800" height="684"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Propagation engine
&lt;/h2&gt;

&lt;p&gt;The current implementation uses a Monte Carlo-based propagation model.&lt;/p&gt;

&lt;p&gt;At a high level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input variables are sampled according to their assigned distributions&lt;/li&gt;
&lt;li&gt;The formula graph is evaluated for each sample set&lt;/li&gt;
&lt;li&gt;Output samples are aggregated into a distribution&lt;/li&gt;
&lt;li&gt;Summary statistics and histogram representation are computed for visualization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach is chosen for its:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;robustness against non-linear transformations&lt;/li&gt;
&lt;li&gt;simplicity of extension to arbitrary formula graphs&lt;/li&gt;
&lt;li&gt;predictable behavior across heterogeneous inputs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Trade-offs are explicitly accepted in favor of correctness over closed-form approximations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Webview integration
&lt;/h2&gt;

&lt;p&gt;The VS Code webview provides a live view of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;formula structure&lt;/li&gt;
&lt;li&gt;dependency graph&lt;/li&gt;
&lt;li&gt;input distribution configuration&lt;/li&gt;
&lt;li&gt;output distribution histogram&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Changes to inputs or formulas trigger recomputation of the propagation model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fezgzsfyr5ujwfvpodjma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fezgzsfyr5ujwfvpodjma.png" alt="Dependency tree view" width="799" height="432"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Input distribution model
&lt;/h2&gt;

&lt;p&gt;Each input variable may be defined as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deterministic constant&lt;/li&gt;
&lt;li&gt;bounded uncertainty (e.g. min/max range)&lt;/li&gt;
&lt;li&gt;probabilistic distribution (configurable per variable)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The intent is to make uncertainty explicit rather than implicit, and to keep assumptions part of the same version-controlled artifact as the formula itself.&lt;/p&gt;

&lt;p&gt;This enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;review of assumptions in code review workflows&lt;/li&gt;
&lt;li&gt;traceability of design decisions&lt;/li&gt;
&lt;li&gt;consistent propagation across iterations&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Output representation
&lt;/h2&gt;

&lt;p&gt;Outputs are represented as full distributions rather than point estimates.&lt;/p&gt;

&lt;p&gt;The webview exposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;histogram view (configurable binning, default 16 bins)&lt;/li&gt;
&lt;li&gt;statistical summary (mean, variance, percentiles depending on configuration)&lt;/li&gt;
&lt;li&gt;sensitivity indication via input variation impact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5gj7zqwgmqcvivjueibi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5gj7zqwgmqcvivjueibi.png" alt="Evaluation preview" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Workflow integration
&lt;/h2&gt;

&lt;p&gt;A typical workflow becomes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define formula in CalcDocs syntax&lt;/li&gt;
&lt;li&gt;Assign input distributions where uncertainty matters&lt;/li&gt;
&lt;li&gt;Inspect propagated output distribution&lt;/li&gt;
&lt;li&gt;Iterate assumptions directly in the same model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because the entire model is text-based, it integrates naturally with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;git versioning&lt;/li&gt;
&lt;li&gt;code review processes&lt;/li&gt;
&lt;li&gt;diff-based review of assumptions&lt;/li&gt;
&lt;li&gt;documentation pipelines&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Design rationale
&lt;/h2&gt;

&lt;p&gt;The system is intentionally constrained to remain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deterministic at the model level (same seed/config → same result)&lt;/li&gt;
&lt;li&gt;fully declarative (no hidden runtime state in formulas)&lt;/li&gt;
&lt;li&gt;editor-native (no external execution context required)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is particularly relevant in embedded workflows where reproducibility and auditability are often more important than raw performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance considerations
&lt;/h2&gt;

&lt;p&gt;Monte Carlo propagation introduces computational cost proportional to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;O(N × G)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;N = number of samples&lt;/li&gt;
&lt;li&gt;G = number of nodes in the formula graph&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To keep the UI responsive, recomputation is designed to be incremental where possible, with caching of intermediate evaluations when only parts of the graph change.&lt;/p&gt;




&lt;h2&gt;
  
  
  Use in embedded contexts
&lt;/h2&gt;

&lt;p&gt;CalcDocs is particularly suited to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tolerance stack-up analysis&lt;/li&gt;
&lt;li&gt;sensor calibration models&lt;/li&gt;
&lt;li&gt;analog front-end estimation&lt;/li&gt;
&lt;li&gt;derived firmware constants validation&lt;/li&gt;
&lt;li&gt;hardware/software expectation alignment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key value is keeping the same calculation model shared between hardware design assumptions and firmware-level usage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Iterative updates
&lt;/h2&gt;

&lt;p&gt;The system is designed for frequent iteration of both formulas and assumptions. Any change in input distributions or structure triggers a recomputation of the propagation model, ensuring that documentation remains synchronized with the current state of the design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpy8gotdtxflgk7perhmk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpy8gotdtxflgk7perhmk.gif" alt="Refresh workflow" width="720" height="476"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Documentation and model specification
&lt;/h2&gt;

&lt;p&gt;Documentation and model specification&lt;/p&gt;

&lt;p&gt;CalcDocs separates the engineering workflow into three conceptual layers:&lt;/p&gt;

&lt;p&gt;formula definition (deterministic graph)&lt;br&gt;
uncertainty modeling (input distributions and tolerances)&lt;br&gt;
visualization and exploration (interactive webview)&lt;/p&gt;

&lt;p&gt;Each layer is documented in detail in the following technical references:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Tolerance and range semantics
&lt;/h3&gt;

&lt;p&gt;This document defines how CalcDocs interprets deterministic bounds and engineering tolerances, including:&lt;/p&gt;

&lt;p&gt;min/max constraint propagation rules&lt;br&gt;
interpretation of ± tolerances&lt;br&gt;
relationship between hard bounds and probabilistic models&lt;br&gt;
consistency rules across chained expressions&lt;/p&gt;

&lt;p&gt;👉 This is the foundational layer for non-probabilistic uncertainty representation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mik1981/Calcdocs-VSCode-Extension/blob/main/docs/tolerance-and-ranges.md" rel="noopener noreferrer"&gt;Tolerance and Ranges (CalcDocs Docs)&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Probabilistic modeling guide
&lt;/h3&gt;

&lt;p&gt;This section formalizes how stochastic uncertainty is represented and propagated:&lt;/p&gt;

&lt;p&gt;supported distribution families (e.g. normal, uniform, empirical)&lt;br&gt;
sampling semantics used in Monte Carlo propagation&lt;br&gt;
assumptions on independence between variables&lt;br&gt;
handling of correlated inputs (if applicable in future extensions)&lt;br&gt;
mapping between engineering intuition and statistical representation&lt;/p&gt;

&lt;p&gt;👉 This is the core definition of the Monte Carlo uncertainty model used by CalcDocs&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mik1981/Calcdocs-VSCode-Extension/blob/main/docs/probabilistic-modeling-guide.md" rel="noopener noreferrer"&gt;Probabilistic Modeling Guide (CalcDocs Docs)&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Interactive formula viewer architecture
&lt;/h3&gt;

&lt;p&gt;This document describes the runtime behavior of the system:&lt;/p&gt;

&lt;p&gt;dependency graph construction&lt;br&gt;
incremental recomputation strategy&lt;br&gt;
webview update model (diff-based vs full recompute)&lt;br&gt;
caching strategy for sampled evaluations&lt;br&gt;
responsiveness constraints in VS Code extension context&lt;/p&gt;

&lt;p&gt;👉 This is the implementation layer connecting model → UI&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mik1981/Calcdocs-VSCode-Extension/blob/main/docs/interactive-formula-viewer.md" rel="noopener noreferrer"&gt;Interactive Formula Viewer (CalcDocs Docs)&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;CalcDocs extends formula documentation with an explicit uncertainty model embedded directly in the development workflow.&lt;/p&gt;

&lt;p&gt;The main design choice is to treat uncertainty not as post-processing, but as a first-class element of the calculation graph.&lt;/p&gt;

&lt;p&gt;This makes it suitable for engineering environments where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;assumptions evolve continuously&lt;/li&gt;
&lt;li&gt;traceability matters&lt;/li&gt;
&lt;li&gt;and reproducibility is required across long-lived projects&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/mik1981/Calcdocs-VSCode-Extension" rel="noopener noreferrer"&gt;CalcDocs GitHub repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/publishers/convergo-dev" rel="noopener noreferrer"&gt;VS Code Marketplace publisher page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>c</category>
      <category>firmware</category>
    </item>
    <item>
      <title>Firmware Calculations Are Invisible — So I Built CalcDocs for VS Code</title>
      <dc:creator>Gian Michele Pasinelli</dc:creator>
      <pubDate>Wed, 27 May 2026 11:33:41 +0000</pubDate>
      <link>https://dev.to/mik1981/firmware-calculations-are-invisible-so-i-built-calcdocs-for-vs-code-48g</link>
      <guid>https://dev.to/mik1981/firmware-calculations-are-invisible-so-i-built-calcdocs-for-vs-code-48g</guid>
      <description>&lt;p&gt;Every embedded project eventually accumulates “hidden math”.&lt;/p&gt;

&lt;p&gt;Not complex algorithms.&lt;/p&gt;

&lt;p&gt;Just hundreds of tiny engineering calculations scattered across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macros&lt;/li&gt;
&lt;li&gt;scaling constants&lt;/li&gt;
&lt;li&gt;ADC conversions&lt;/li&gt;
&lt;li&gt;timer formulas&lt;/li&gt;
&lt;li&gt;configuration headers&lt;/li&gt;
&lt;li&gt;lookup tables&lt;/li&gt;
&lt;li&gt;spreadsheets&lt;/li&gt;
&lt;li&gt;comments&lt;/li&gt;
&lt;li&gt;old documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And over time, nobody remembers where the numbers actually come from.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem Isn't Complexity. It's Visibility.
&lt;/h2&gt;

&lt;p&gt;A firmware project may contain code like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define PWM_FREQ      20000
#define TIMER_CLK     170000000
#define PWM_PERIOD    (TIMER_CLK / PWM_FREQ)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The calculation is technically simple.&lt;/p&gt;

&lt;p&gt;But understanding it still requires mental parsing, context switching, and manual evaluation.&lt;/p&gt;

&lt;p&gt;Now multiply that by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple abstraction layers&lt;/li&gt;
&lt;li&gt;chained macros
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8i3rwd4w91kd5cts5f4x.gif" alt="Macro chain revelation code" width="" height=""&gt;
&lt;/li&gt;
&lt;li&gt;unit conversions&lt;/li&gt;
&lt;li&gt;integer scaling&lt;/li&gt;
&lt;li&gt;safety margins&lt;/li&gt;
&lt;li&gt;hardware-specific constants&lt;/li&gt;
&lt;li&gt;formulas real-time resolver&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwyy4wp5a24qw73a36t0g.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwyy4wp5a24qw73a36t0g.gif" alt="Macro chain revelation formulas" width="800" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eventually the firmware becomes full of numeric logic that engineers can no longer see directly.&lt;/p&gt;

&lt;p&gt;That was the frustration behind CalcDocs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63jvjbgtdgxco1h3aipd.png" alt="Firmware constant revelation" width="800" height="208"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What Is CalcDocs?
&lt;/h2&gt;

&lt;p&gt;CalcDocs is a VS Code extension that turns engineering calculations into live, inspectable objects directly inside the editor.&lt;/p&gt;

&lt;p&gt;Instead of treating formulas as passive text, it evaluates and visualizes them in context.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define PWM_PERIOD    (TIMER_CLK / PWM_FREQ)   // 8500
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No spreadsheet.&lt;/p&gt;

&lt;p&gt;No calculator.&lt;/p&gt;

&lt;p&gt;No mentally simulating the preprocessor.&lt;/p&gt;

&lt;p&gt;Just immediate feedback where the calculation actually lives.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Can Do
&lt;/h2&gt;

&lt;p&gt;CalcDocs currently supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;inline formula evaluation&lt;/li&gt;
&lt;li&gt;C/C++ macro expansion&lt;/li&gt;
&lt;li&gt;live computed values&lt;/li&gt;
&lt;li&gt;engineering formulas in YAML&lt;/li&gt;
&lt;li&gt;dimensional/unit validation&lt;/li&gt;
&lt;li&gt;symbol dependency resolution&lt;/li&gt;
&lt;li&gt;inline calculations inside comments&lt;/li&gt;
&lt;li&gt;interactive formula visualization&lt;/li&gt;
&lt;li&gt;hybrid static analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to replace firmware code.&lt;/p&gt;

&lt;p&gt;The goal is to make engineering intent visible again.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters in Embedded Systems
&lt;/h2&gt;

&lt;p&gt;Embedded software often sits in a strange middle ground between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;software engineering&lt;/li&gt;
&lt;li&gt;electronics&lt;/li&gt;
&lt;li&gt;physics&lt;/li&gt;
&lt;li&gt;control systems&lt;/li&gt;
&lt;li&gt;industrial constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single incorrect scaling factor can silently propagate across an entire system.&lt;/p&gt;

&lt;p&gt;And the worst bugs are often not algorithmic bugs.&lt;/p&gt;

&lt;p&gt;They're interpretation bugs.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;wrong unit assumptions&lt;/li&gt;
&lt;li&gt;invalid conversion factors&lt;/li&gt;
&lt;li&gt;outdated spreadsheet formulas&lt;/li&gt;
&lt;li&gt;mismatched documentation&lt;/li&gt;
&lt;li&gt;stale calibration constants&lt;/li&gt;
&lt;li&gt;copy-pasted numeric logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of these issues are fundamentally visibility problems.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Spreadsheet Problem
&lt;/h2&gt;

&lt;p&gt;In many companies, engineering knowledge slowly migrates outside the firmware repository.&lt;/p&gt;

&lt;p&gt;The code contains one version.&lt;/p&gt;

&lt;p&gt;Excel contains another.&lt;/p&gt;

&lt;p&gt;Documentation contains a third.&lt;/p&gt;

&lt;p&gt;Eventually nobody fully trusts any of them.&lt;/p&gt;

&lt;p&gt;CalcDocs started as an attempt to reduce that fragmentation.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;keep formulas close to the code, but make them understandable like documentation.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Interactive Formula Exploration
&lt;/h2&gt;

&lt;p&gt;One of the most interesting additions was the interactive formula viewer.&lt;/p&gt;

&lt;p&gt;Instead of only displaying final values, formulas can now be explored dynamically inside VS Code.&lt;/p&gt;

&lt;p&gt;This becomes extremely useful during:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;debugging&lt;/li&gt;
&lt;li&gt;calibration&lt;/li&gt;
&lt;li&gt;signal analysis&lt;/li&gt;
&lt;li&gt;parameter tuning&lt;/li&gt;
&lt;li&gt;validation activities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Especially when formulas intentionally remain symbolic during development.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4p3sylxx0lkbppuhpfz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4p3sylxx0lkbppuhpfz.gif" alt="Interactive formula viwer" width="720" height="388"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Under the Hood
&lt;/h2&gt;

&lt;p&gt;CalcDocs combines several layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;expression parsing&lt;/li&gt;
&lt;li&gt;AST evaluation&lt;/li&gt;
&lt;li&gt;macro expansion&lt;/li&gt;
&lt;li&gt;lightweight static analysis&lt;/li&gt;
&lt;li&gt;symbol tracking&lt;/li&gt;
&lt;li&gt;unit-aware computation&lt;/li&gt;
&lt;li&gt;VS Code integration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The difficult part isn't evaluating formulas.&lt;/p&gt;

&lt;p&gt;The difficult part is matching how real firmware projects are structured.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I’m Exploring This Area
&lt;/h2&gt;

&lt;p&gt;I work mostly on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;embedded firmware&lt;/li&gt;
&lt;li&gt;Cortex-M systems&lt;/li&gt;
&lt;li&gt;industrial/IoT devices&lt;/li&gt;
&lt;li&gt;RTOS-based applications&lt;/li&gt;
&lt;li&gt;developer tooling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over time I realized many embedded workflows still depend heavily on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tribal knowledge&lt;/li&gt;
&lt;li&gt;disconnected spreadsheets&lt;/li&gt;
&lt;li&gt;manual verification&lt;/li&gt;
&lt;li&gt;implicit assumptions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think tooling around engineering visibility is still massively underexplored.&lt;/p&gt;




&lt;h2&gt;
  
  
  Future Directions
&lt;/h2&gt;

&lt;p&gt;Some areas I’m currently exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stronger dimensional analysis&lt;/li&gt;
&lt;li&gt;cross-file dependency graphs&lt;/li&gt;
&lt;li&gt;richer interactive webviews&lt;/li&gt;
&lt;li&gt;symbolic computation&lt;/li&gt;
&lt;li&gt;tighter integration with documentation&lt;/li&gt;
&lt;li&gt;formula traceability&lt;/li&gt;
&lt;li&gt;engineering validation workflows&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;Most firmware calculations are not difficult.&lt;/p&gt;

&lt;p&gt;They're just hidden.&lt;/p&gt;

&lt;p&gt;CalcDocs is an attempt to make embedded engineering knowledge visible directly where it matters most: inside the code.&lt;/p&gt;

&lt;p&gt;If you work on embedded systems, I’d genuinely be interested in how your team handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;formulas&lt;/li&gt;
&lt;li&gt;scaling factors&lt;/li&gt;
&lt;li&gt;engineering constants&lt;/li&gt;
&lt;li&gt;unit conversions&lt;/li&gt;
&lt;li&gt;spreadsheet dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;because every company seems to reinvent this differently.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=convergo-dev.calcdocs-vscode-extension" rel="noopener noreferrer"&gt;CalcDocs VS Code extension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mik1981/Calcdocs-VSCode-Extension" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>c</category>
      <category>firmware</category>
    </item>
  </channel>
</rss>
