SShortSingh.
Back to feed

The Gregorian Calendar Is Mathematically Biased Toward Certain Weekdays

0
·1 views

The Gregorian calendar operates on a precise 400-year cycle of exactly 146,097 days, which does not divide evenly by seven, meaning dates cannot fall equally on all weekdays. As a result, some dates land on certain days of the week more frequently than others over any 400-year span. For example, January 1st falls on Sunday, Tuesday, or Friday most often, while Monday and Saturday are the least common. The bias varies by date depending on its position relative to February and the leap-year rules, which drop three century leap days every 400 years. This also means wall calendars repeat on predictable cycles of 6, 11, or 28 years, with 2025's calendar set to recur in 2031.

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 ·

Passing tests don't guarantee correct code — mutation testing exposes weak AI patches

AI-generated code patches can pass an entire test suite without actually being correct, because the test fixtures themselves may be incomplete or never designed to catch edge cases. A three-phase evaluation approach is proposed: first run property-based checks using invariants against random inputs, then apply mutation testing to fixtures to confirm they can actually detect failures, and finally freeze any flaky tests only after the first two phases succeed. The method is illustrated with a C++ interval-merging example where two assertions — one checking no range is lost, another confirming no overlaps remain — catch bugs that golden fixtures would miss. A Python script accompanies the approach, automatically mutating fixture data and flagging any test that still passes after the change as dangerously weak. The core argument is that a green test suite signals an incomplete oracle, not correct behavior, making fixture validation a necessary step before trusting any agent-generated patch.

0
ProgrammingDEV Community ·

Developer Reflects on Two and a Half Years Building a Design System That Never Scaled

A frontend developer spent roughly two and a half years, from spring 2022 to late 2024, building a design system at their organization, initially aimed at reducing duplicated code across multiple applications. The team chose Web Components over React for the component library, which introduced challenges such as Custom Element Registry conflicts in a monorepo environment. By early 2024, the project evolved into a task force effort to automate the translation of Figma designs into code using an intermediate representation called a Design Syntax Tree. The team also built a Figma plugin to bulk-generate design components, but it hit an unresolved memory or performance limitation within Figma itself, which Figma engineers ultimately confirmed was not caused by the plugin's code. The author reflects that building components alone is insufficient to sustain a design system, and that the project ultimately did not reach its intended scale despite years of technical investment.

0
ProgrammingDEV Community ·

AWS EC2 Guide Covers Instance Types, Hardware Strategy and Autoscaling

A technical field manual published on DEV Community outlines Amazon EC2, AWS's core cloud compute service that provides resizable, on-demand virtual machines without physical server procurement. The guide categorizes EC2 instance families by workload type, including general-purpose T and M series, compute-optimized C series, memory-optimized R series, and GPU-based G and P series for AI and machine learning. It details purchasing models ranging from flexible On-Demand billing to Reserved Instances offering up to 72% savings for long-term commitments, and Spot Instances providing up to 90% discounts on spare capacity with a two-minute interruption warning. The manual also addresses integration with Kubernetes EKS clusters, explaining how GPU nodes are isolated using taints to prevent non-ML workloads from consuming expensive resources. The resource is aimed at site reliability engineers and cloud practitioners seeking structured guidance on optimizing AWS infrastructure.

0
ProgrammingDEV Community ·

How Asciidoc, GitHub, and Confluence Enable Revision-Secure Architecture Docs

Enterprise architecture documentation is critical in regulated industries like finance, healthcare, and the public sector, where compliance and traceability are legally required. A practical approach combines Asciidoc, a human-readable text-based format, with GitHub to enable version-controlled, collaborative creation of Solution Architecture Documents (S-AD). GitHub ensures every change is immutably logged and traceable, while supporting branching and pull-request workflows for team collaboration. Generated PDF versions of these documents are then stored in Confluence, providing centralized, permission-controlled access for both technical and non-technical stakeholders. Together, the three tools form an end-to-end workflow for producing and managing revision-compliant enterprise architecture documentation.

The Gregorian Calendar Is Mathematically Biased Toward Certain Weekdays · ShortSingh