SShortSingh.
Back to feed

Developer Builds Offline BMI Calculator Using Pure HTML With No APIs or Frameworks

0
·1 views

A developer shared lessons from building a fully offline, single-file BMI calculator without any third-party dependencies or server calls, aiming to avoid bloated bundles and privacy concerns. The core technical challenge was not the BMI formula itself but handling unit conversions across metric, imperial pounds, and UK stone systems, with all values converted to metric internally before display. The project also addressed UX issues such as non-linear BMI category visualization, input validation with generous but sensible limits, and jitter-free number display using monospace fonts. Dark mode was implemented purely through CSS custom properties, while responsive design ensured usability down to 320px screen widths. Internationalization required separating label translation from number formatting logic to correctly handle cultural differences in how measurements are expressed.

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 ·

Mid-Task Edits Expose a Blind Spot in AI Agent Permission Systems

A developer discovered that standard permission frameworks for AI agents fail to account for task changes made after an agent has already begun work. When the developer edited a task definition mid-execution, the agent continued operating under stale instructions despite having valid permissions. The core issue is that permission levels define what an agent may do, but not what should happen when the underlying task is modified after authority is granted. The proposed fix involves binding a specific task revision to each handoff and requiring the agent to verify that revision before any write operation. If a mismatch is detected, the agent stops and returns a structured result rather than re-planning autonomously, preventing it from self-authorizing actions under a task it was never cleared to execute.

0
ProgrammingDEV Community ·

30 React.js Interview Questions Covering Core Frontend Concepts

A technical guide published on DEV Community compiles 30 React.js interview questions aimed at developers preparing for frontend job interviews. The questions span real-world scenarios across topics such as conditional rendering, API calls with useEffect, form validation, and performance optimization. The guide also covers state management strategies, including Context API and Redux, as well as component re-rendering behavior and large-list optimization. Rather than focusing on rote memorization, the resource emphasizes understanding when and how to apply React concepts in practical applications. Developers are advised to use tools like React.memo, useMemo, and useCallback selectively, based on actual profiling results rather than by default.

0
ProgrammingDEV Community ·

Developer Builds AI Calorie Tracker That Struggles to Identify Filipino Dishes

A developer is building OopsCalorie, an AI-powered meal and calorie tracking app that lets users log food by taking a photo. During testing, the app's image recognition produced notable errors with Filipino dishes, such as misidentifying dinuguan as champorado and bagnet as lumpiang shanghai. These mistakes highlighted a core engineering challenge: accurately identifying regional foods from images alone requires far more contextual data than initially anticipated. In response, the developer is refining the system to combine AI estimates with user-provided context, confidence scoring, and multiple food candidates rather than single definitive answers. The app, built with React Native, NestJS, and MongoDB, is currently in beta testing with Android and iOS releases planned soon.

0
ProgrammingDEV Community ·

xAI Launches Grok Bot as Autonomous AI Agent Amid Growing Security Concerns

xAI has introduced Grok Bot, an always-on AI agent designed to function as an autonomous digital teammate rather than a traditional chatbot. The agent operates within its own cloud environment and can log into applications, websites, and tools to execute multi-step tasks independently. Multiple agents can run in parallel and coordinate with one another to complete complex workflows. Grok Bot enters a competitive market that already includes agentic AI products from OpenAI, Anthropic, and Microsoft. However, experts warn that granting AI agents access to sensitive systems like email or infrastructure creates significant identity and security risks, as such agents effectively become privileged users.

Developer Builds Offline BMI Calculator Using Pure HTML With No APIs or Frameworks · ShortSingh