SShortSingh.
Back to feed

Correctly coded formulas can still return wrong results, developer warns

0
·1 views

A developer building a zero-dependency JavaScript library of health and fitness formulas discovered that many widely used implementations produce plausible but incorrect outputs without any error signals. Common pitfalls include using the wrong coefficient set, feeding metric inputs into imperial equations, and rounding intermediate values before a final calculation — all of which silently return believable wrong numbers. The author argues that tests must also verify their own premises remain valid, since a test whose underlying conditions quietly change can keep passing while checking nothing meaningful. A further lesson emerged when the US Navy body-fat formula — correctly implemented and well-tested — became outdated after the US Department of Defense replaced it with a waist-to-height ratio screen, effective across all services by July 2026. The experience illustrates that a formula can be both technically correct and practically wrong if the real-world standard it represents has changed.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Kakao's Kanana-o TTS Model Takes Plain-Language Voice Instructions, Rivals OpenAI and Google

Kakao detailed its Kanana-o omni model's updated speech layer on August 4, 2026, enabling it to follow plain-language delivery instructions such as 'read it in a sad voice' or 'read it like a news anchor' without requiring markup tags. The model can adjust speed, volume, pitch, emotion, intonation, and intensity, and can stack multiple conditions in a single instruction. On Kakao's Korean-language version of the InstructTTSEval benchmark, Kanana-o scored 94.50, surpassing OpenAI's GPT-4o-mini-tts at 91.10 and trailing Google's Gemini 2.5 Flash Preview TTS at 95.38, though these figures come from Kakao's own evaluation. Kakao also introduced LM-SPT, a speech tokenizer designed to compress audio into fewer tokens, which the company claims outperformed several competing codecs in Korean and English speech tasks. The development signals a broader industry shift away from structured markup toward natural-language control in text-to-speech systems.

0
ProgrammingDEV Community ·

How Kamero Manages 70 Flutter App Flavors With Automated CI and flavorizr

Kamero, an AI-powered event photography platform, ships over 70 white-label guest apps for photography studios from a single Flutter codebase. Each branded app requires its own App Store listing, bundle ID, icons, Firebase config, signing keys, and brand colors, making manual configuration unscalable. The team adopted flutter_flavorizr to declaratively define all flavor settings in pubspec.yaml, auto-generating native Android and iOS project files along with a Dart flavor enum. A custom FlavorConfig class handles per-flavor branding at runtime, while batch CI scripts read flavor list JSON files to build only enabled flavors and upload them to app stores automatically. This industrialized approach replaces error-prone manual edits to Gradle and Xcode with a repeatable checklist, allowing new client onboarding without touching native project files directly.

0
ProgrammingDEV Community ·

Alibaba's Qwen3.8-Max Tops Some Benchmarks But Trails Claude on Key Coding Tests

Alibaba has launched Qwen3.8-Max, its largest AI model to date, featuring 2.4 trillion total parameters, 95 billion active per token, and a one-million-token context window. The mixture-of-experts model supports multimodal input and agentic workflows, and Alibaba plans to release its weights publicly within a week of the API going live. The company claims the model autonomously built a software project over roughly 16 days, generating 265 commits and 127 pull requests in a publicly viewable GitHub repository. Qwen3.8-Max outperforms Claude on three benchmarks — Terminal Bench 2.1, PaperBench, and OSWorld-Verified — but trails Claude Fable 5 on harder repository-level engineering tests like SWE-bench Pro and FrontierSWE. Alibaba's benchmark results have not yet been independently replicated, and the model weights remain unavailable for download at the time of reporting.

0
ProgrammingDEV Community ·

5 Common Python Mistakes Beginners Make and How to Fix Them

A beginner Python developer has shared five recurring coding mistakes they encountered while learning the language. The errors include misusing return instead of print inside loops, misplacing brackets in f-string ternary expressions, and forgetting to prefix nested strings with f for interpolation. Other pitfalls involve accidentally using a list's plural name instead of the loop variable, and omitting self when accessing object attributes inside class methods. None of the mistakes trigger obvious errors in some cases, making them harder to catch without careful review. The developer notes that writing down these errors proved more effective for retention than silently fixing them and moving on.

Correctly coded formulas can still return wrong results, developer warns · ShortSingh