SShortSingh.
Back to feed

Why Datetime Remains One of Software's Most Deceptively Complex Data Types

0
·1 views

Software engineer Serguey Asael Shinder published a piece on DEV Community arguing that time is uniquely difficult to handle correctly in programming. Unlike simple data types such as numbers or names, time carries hidden complexity including inconsistent day lengths, ambiguous midnight definitions, and timezone disagreements across servers and databases. Shinder highlights that conflating a precise instant with a calendar date — two fundamentally different concepts — is a common source of bugs. His practical advice is to store all timestamps in a single timezone, perform conversions only at system boundaries, and treat the system clock with healthy skepticism. He concludes that time-related bugs are among the hardest to diagnose because the context of when something occurred is often lost by the time the error surfaces.

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 ·

Developer Builds Fan-Made Interactive Daily Map Tool for PEAK Game

An independent developer has created Peak Map Today, a fan-made interactive map utility for the game PEAK, built around a design principle of immediate usability. Unlike typical game guide pages that lead with marketing content, the tool places a fully functional map at the top of the page so players can access the current biome, route, and markers without scrolling. The map draws on data from the open PeakMap project and supports multiple layers including Luggage, Belltowers, Animals, Amulets, and Tombs, each of which can be toggled or inspected individually. Both top-down and side-angle views are available where source data permits, helping players assess lateral distances and elevation changes from a single workspace. The implementation also handles touch and desktop zoom interactions carefully, using pointer events and browser gesture guards to keep map controls local and prevent unintended page-level zooming.

0
ProgrammingDEV Community ·

AI Is Erasing the Grunt Work That Trained Junior Developers

A widely shared essay by developer Asael Shinder argues that AI tools are automating the repetitive, low-level tasks that historically taught junior engineers core problem-solving instincts. Tasks like debugging obscure errors, writing test suites, and fixing configurations by trial and error formed an informal apprenticeship that new developers no longer experience by default. Shinder warns that juniors today are instead handed AI-generated output to review — a skill that itself requires the instincts only hands-on struggle can build. He calls on senior engineers to deliberately assign challenging work, encourage independent debugging, and make clear that the difficulty is intentional and instructive. Without such intervention, he cautions, the industry risks producing a generation that can generate code at scale but lacks the judgment to verify it.

0
ProgrammingDEV Community ·

How VPNs Work: Encryption, DNS Leaks, and What They Cannot Do

A VPN routes your internet traffic through an encrypted tunnel via a VPN server, masking your public IP address from websites and making it harder for others on your network to read your data. The website you visit sees the VPN server's IP address rather than your own, while your device-to-server connection remains encrypted. However, a VPN does not make users fully anonymous, as websites can still track individuals through cookies, browser settings, and account information. DNS traffic must also be routed through the VPN to avoid DNS leaks, where name resolution requests bypass the encrypted tunnel entirely. Connection speeds can be affected by factors such as server distance, server load, and network routing quality, so switching servers may help improve performance.

0
ProgrammingDEV Community ·

How a Green Canary Deployment Missed a Bug That Corrupted Nine Hours of Data

A software team's automated canary deployment system approved a release that ultimately corrupted nine hours of nightly settlement processing, despite showing healthy metrics. The flaw stemmed from canary pods being excluded from the Kafka consumer group, meaning the asynchronous batch workload — which actually triggered the bug — was never tested. The faulty code path involved a nullable decimal handled by a shared serialiser, a route rarely touched by HTTP traffic but hit constantly by a batch job running at 1 a.m. The team also discovered that analysis relied solely on HTTP status codes and latency, so a service returning incorrect data with a 200 status would still pass. In response, they added consumer group participation for canary pods, a shadow batch replay mode, business-level metrics, and synthetic requests mimicking edge-case tenant payloads.

Why Datetime Remains One of Software's Most Deceptively Complex Data Types · ShortSingh