Best of Hacker NewsDecember 2025

  1. 1
    Article
    Avatar of hnHacker News·18w

    Please Just Fucking Try HTMX

    HTMX offers a middle ground between raw HTML limitations and JavaScript framework complexity. By adding HTML attributes that trigger server requests and swap in HTML responses, you can build interactive web applications without the overhead of React, Vue, or Angular. A case study shows a company reduced their codebase by 67%, cut JavaScript by 90%, and improved performance by switching from React to HTMX. The approach works best for typical CRUD applications, dashboards, and forms rather than highly interactive apps like Google Docs. The core benefit is simplicity: no build tools, no state management libraries, just HTML attributes and server-side rendering.

  2. 2
    Article
    Avatar of hnHacker News·21w

    Better than JSON

    Protocol Buffers (Protobuf) offers significant advantages over JSON for API development through strong typing, binary serialization, and automatic code generation. While JSON remains popular for its human readability and flexibility, Protobuf provides 3x smaller payload sizes, type safety across multiple languages, and eliminates manual validation errors. The article demonstrates practical implementation using Dart and the Shelf framework, showing how Protobuf can be used independently of gRPC in traditional HTTP APIs. The main trade-off is reduced human readability of binary data, requiring schema files and specialized tooling for debugging.

  3. 3
    Article
    Avatar of hnHacker News·20w

    The f*** off contact page

    A 'fuck off contact page' is a deliberately friction-filled contact page used by large SaaS companies to discourage support inquiries and push users toward self-service options. This design pattern is fundamentally inappropriate for service-based agencies that need to cultivate leads and demonstrate helpfulness. The author shares a client story where misaligned goals, discounted pricing, and lack of trust led to implementing this anti-pattern despite knowing better. Success in client work requires educating clients on the design process, establishing proper value perception through pricing, and building trust through clear communication of expertise and values.

  4. 4
    Article
    Avatar of hnHacker News·18w

    Your Logs Are Lying To You

    Traditional logging practices fail in modern distributed systems because they produce fragmented, context-poor log lines that are difficult to search and correlate. The solution is "wide events" (also called canonical log lines): emitting one comprehensive, structured event per request per service that contains all relevant context—user data, business metrics, infrastructure details, and error information. This approach transforms debugging from text searching into structured querying, enabling complex questions to be answered with simple SQL-like queries. Key implementation strategies include building events throughout the request lifecycle, using tail-based sampling to keep all errors while sampling successful requests, and deliberately instrumenting code with business context rather than relying on auto-instrumentation alone.

  5. 5
    Article
    Avatar of hnHacker News·17w

    I switched to eSIM in 2025, and I am full of regret

    eSIM technology is replacing physical SIM cards in modern smartphones, with Google's Pixel 10 series becoming the latest to drop the physical SIM slot. While eSIMs save space and allow multiple profiles, the transition has proven frustrating for users accustomed to easily swapping physical SIM cards. Apple pioneered the eSIM-only approach with the iPhone 14, though the space savings have been modest—around 8 percent more battery capacity. The shift represents a significant change in how mobile subscribers manage their phone service, moving from removable cards to programmable, soldered components.

  6. 6
    Article
    Avatar of hnHacker News·19w

    AWS CEO Explains 3 Reasons AI Can’t Replace Junior Devs

    AWS CEO Matt Garman argues against replacing junior developers with AI, citing three key reasons: junior developers are often more proficient with AI tools than senior staff, they represent minimal cost savings as the lowest-paid employees, and eliminating them breaks the talent pipeline that companies need for future growth. He emphasizes that junior hires bring fresh perspectives, adapt quickly to new technologies, and form the foundation for developing future leaders. While acknowledging AI will change how developers work, Garman believes it will ultimately create more jobs than it eliminates in the medium to long term.

  7. 7
    Article
    Avatar of hnHacker News·19w

    Avoid UUID Version 4 Primary Keys

    UUID Version 4 primary keys cause significant performance problems in PostgreSQL due to their random nature. Random values trigger excessive index page splits during inserts, create fragmented indexes with poor density (~79% vs ~98% for integers), and require accessing 31,000% more buffer pages for queries. The randomness prevents efficient B-Tree index operations and degrades cache hit ratios. Time-ordered alternatives like UUID Version 7 perform better by including timestamps in the first 48 bits. For most applications, integer or bigint primary keys backed by sequences remain the optimal choice, offering better performance, smaller storage footprint (4-8 bytes vs 16 bytes), and natural ordering. When obfuscation is needed, pseudo-random codes can be generated from integers using XOR operations and base62 encoding.

  8. 8
    Article
    Avatar of hnHacker News·17w

    Bye Bye Big Tech: How I Migrated to an almost All-EU Stack (and saved 500€ per year)

    A developer shares their complete migration from US-based tech services to EU-hosted alternatives, detailing specific tool replacements across email, cloud storage, password management, AI, hosting, and productivity. The Proton ecosystem replaced Google Workspace, 1Password, and Notion, while Scaleway replaced AWS/Azure, and Mammouth provided multi-model AI access. The migration resulted in €528 annual savings (from €83/month to €39/month) while improving privacy and data sovereignty. Challenges include limited alternatives for social platforms, blogging (still using Substack), and occasional reliance on Google search and Claude Code.

  9. 9
    Article
    Avatar of hnHacker News·20w

    Why We Built Lightpanda in Zig - Blog

    Lightpanda chose Zig over C++ and Rust to build their browser engine, prioritizing simplicity and explicit control. The team values Zig's straightforward syntax, compile-time metaprogramming, explicit allocator model for fine-grained memory management, and seamless C interoperability for integrating with V8. While Zig is pre-1.0 with a smaller ecosystem, its arena allocators enable efficient per-page memory handling, comptime features reduce boilerplate when bridging JavaScript, and fast compilation times maintain developer productivity. The decision reflects a pragmatic choice for a small team building performance-critical infrastructure without the complexity of C++ templates or Rust's borrow checker.

  10. 10
    Article
    Avatar of hnHacker News·19w

    JSDoc *is* TypeScript

    JSDoc is not an alternative to TypeScript but rather a way to use TypeScript itself. The TypeScript language service powers IntelliSense and interprets JSDoc comments, meaning developers using JSDoc are already using TypeScript without a build step. The Svelte team's 2023 switch from .ts files to JSDoc wasn't anti-TypeScript but a different approach to the same static analysis. JSDoc offers nearly all TypeScript features (except runtime features like enums), provides better code navigation by jumping to actual implementations instead of declaration files, and works with existing TypeScript tooling including type generation libraries.

  11. 11
    Article
    Avatar of hnHacker News·21w

    coder/ghostty-web: Ghostty for the web with xterm.js API compatibility

    ghostty-web brings Ghostty's VT100 terminal emulator to the browser via WebAssembly, offering an xterm.js-compatible API. Unlike xterm.js which reimplements terminal emulation in JavaScript, ghostty-web uses the same WASM-compiled parser from the native Ghostty app, providing proper support for RTL languages, complex scripts, and advanced escape sequences that xterm.js struggles with. The library is designed as a drop-in replacement requiring only an import change, ships with zero runtime dependencies in a ~400KB bundle, and aims to eventually consume official Ghostty WASM distributions.

  12. 12
    Article
    Avatar of hnHacker News·21w

    LLMs are a failure. A new AI winter is coming.

    Large Language Models (LLMs) face fundamental limitations that make them unsuitable for most practical applications. The core issue is that transformers generate plausible-sounding output by predicting the next token, which inevitably leads to hallucinations when the model lacks relevant training data. This results in a 5-40% failure rate that cannot be eliminated through scaling or fine-tuning. The author predicts an imminent AI bubble burst, with corporate AI projects failing at a 95% rate, similar to the dot-com crash. While some use cases will survive, the technology's inability to reliably distinguish correct from incorrect output makes it dangerous for critical applications like medicine, education, and law enforcement.

  13. 13
    Article
    Avatar of hnHacker News·17w

    Salesforce regrets firing 4000 experienced staff and replacing them with AI

    Salesforce executives publicly admitted they overestimated AI capabilities after laying off 4,000 customer support staff in 2025. The company reduced its support workforce from 9,000 to 5,000 employees, expecting AI to handle customer conversations at scale. However, automated systems struggled with complex issues, leading to declining service quality and higher complaint volumes. CEO Marc Benioff walked back earlier confidence, acknowledging human expertise remains critical. The company lost institutional knowledge and faced hidden costs as remaining staff had to supervise and correct AI outputs. Salesforce now reframes its strategy toward AI augmentation rather than replacement, admitting some reductions were premature.

  14. 14
    Article
    Avatar of hnHacker News·20w

    Building a toast component

    Sonner is a React toast library downloaded 7M+ times weekly. Its success stems from unique stacking animations using CSS transitions instead of keyframes for smooth interruption, momentum-based swipe gestures, and an Observer Pattern for state management that avoids React Context. Key implementation details include dynamic height calculations for stacking, velocity-based dismissal, tab visibility detection to pause timers, and pointer capture for consistent drag behavior. The library prioritizes developer experience with a simple API and comprehensive documentation.

  15. 15
    Article
    Avatar of hnHacker News·20w

    Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

    The HDMI Forum continues to block open-source HDMI 2.1 driver implementation for Linux, forcing Valve's Steam Machine to be software-limited to HDMI 2.0 despite hardware support. This restriction prevents native 4K at 120Hz without compression and limits VRR functionality. AMD submitted a functional HDMI 2.1 driver in early 2024 but was rejected by the HDMI Forum. Valve confirms they're still working to resolve the issue, while users can work around limitations using chroma subsampling or active DisplayPort-to-HDMI adapters.

  16. 16
    Article
    Avatar of hnHacker News·20w

    I failed to recreate the 1996 Space Jam Website with Claude

    An engineer attempts to use Claude AI to recreate the iconic 1996 Space Jam website from screenshots and assets, but fails despite multiple approaches. The experiment reveals Claude's limitations in spatial reasoning and precise visual measurements. Despite providing grids, comparison tools, and zoomed images, Claude consistently produces inaccurate layouts while confidently claiming success. The author theorizes this stems from how vision models process images in 16x16 patches, losing fine-grained spatial detail. The piece documents the iterative debugging process, Claude's unreliable self-assessment, and the surprising difficulty of a seemingly simple HTML recreation task.

  17. 17
    Article
    Avatar of hnHacker News·20w

    Vibe Coding is Mad Depressing

    A mobile developer with 15 years of experience reflects on how AI-generated code has negatively impacted their freelance work. Clients now submit AI-generated code snippets and entire features, leading to messy codebases with poor practices like thousands of branches, emoji-filled print statements, and all logic crammed into a single ContentView file. The shift from structured development with proper git workflows and clean code to "vibe coding" has eroded professional standards and made the work more frustrating.

  18. 18
    Article
    Avatar of hnHacker News·18w

    picknplace.js

    A proof of concept for an alternative to drag-and-drop interactions that uses a two-step "pick then place" approach. Instead of dragging items, users first pick an item, which creates an interactive duplicate list overlay, then place it in the desired position. The approach aims to solve usability issues with traditional drag-and-drop, particularly on mobile devices where tapping, holding, dragging, and scrolling simultaneously is awkward and error-prone.

  19. 19
    Article
    Avatar of hnHacker News·18w

    Introducing CSS Grid Lanes

    CSS Grid Lanes is a new layout feature available in Safari Technology Preview 234 that enables masonry-style layouts using `display: grid-lanes`. It leverages CSS Grid's column/row definition syntax to create flexible, responsive layouts without media queries. Items automatically flow into lanes based on available space, similar to traffic changing lanes. The feature supports spanning items across lanes, explicit placement, bidirectional layouts (waterfall or brick), and includes an `item-tolerance` property to control placement sensitivity. Grid Lanes makes complex layouts like photo galleries, article grids, and mega menus significantly easier to implement with minimal CSS.

  20. 20
    Article
    Avatar of hnHacker News·20w

    Tongyi-MAI/Z-Image

    Z-Image is a 6B parameter image generation model featuring three variants: Z-Image-Turbo (distilled for sub-second inference with 8 NFEs on H800 GPUs), Z-Image-Base (foundation model for fine-tuning), and Z-Image-Edit (specialized for image editing). Built on a Scalable Single-Stream DiT architecture, it excels at photorealistic generation, bilingual text rendering (English/Chinese), and instruction following. The model uses Decoupled-DMD distillation algorithm and DMDR (combining DMD with reinforcement learning) for few-step generation optimization. Available on Hugging Face and ModelScope with PyTorch and Diffusers support.

  21. 21
    Article
    Avatar of hnHacker News·18w

    Lulzx/tinypdf: Minimal PDF creation library. <400 LOC, zero dependencies, makes real PDFs.

    tinypdf is a minimal PDF creation library for JavaScript/TypeScript that weighs only 3.3 KB with zero dependencies, approximately 70x smaller than jsPDF. It focuses on the core use case of putting text and images on pages, supporting basic features like text rendering (Helvetica font), shapes (rectangles and lines), JPEG images, multiple pages, and markdown-to-PDF conversion. The library intentionally excludes advanced features like custom fonts, PNG/SVG support, forms, encryption, and compression to maintain its minimal footprint. It's designed for common document generation tasks like invoices, receipts, reports, and certificates.

  22. 22
    Article
    Avatar of hnHacker News·17w

    The Algebra of Loans in Rust

    Rust's borrow-checker is evolving beyond simple shared and mutable borrows. This exploration presents a systematic analysis of proposed reference types including owning references (&own), uninitialized references (&uninit), and pinning variants (&pin, &pin mut, &pin own). Three comprehensive tables detail what operations are permitted with each reference type, what restrictions apply to borrowed places while loans are live, and what happens after loans expire. The owning reference provides full ownership without controlling allocation, the uninitialized reference enables safe initialization patterns, and pinning references enforce memory stability guarantees crucial for async Rust.

  23. 23
    Article
    Avatar of hnHacker News·19w

    Goodbye Microservices

    Twilio Segment migrated from 140+ microservices back to a monolithic architecture after microservices created unsustainable operational overhead. The team consolidated separate repos and queues into a single service with a unified test suite using Traffic Recorder. This transition dramatically improved developer productivity (46% more library improvements), reduced deployment complexity from 140+ services to one, and simplified scaling. While accepting trade-offs like reduced fault isolation and less effective in-memory caching, the monolith proved more suitable for their server-side destinations pipeline.

  24. 24
    Article
    Avatar of hnHacker News·19w

    Programmers and software developers lost the plot on naming their tools

    Software developers have abandoned descriptive naming conventions in favor of arbitrary, whimsical names for tools and libraries. Unlike other engineering disciplines where names convey function (I-beams, butterfly valves, IUPAC nomenclature), modern software is filled with meaningless names like Cobra, Viper, and Melody that force developers to constantly context-switch and look up documentation. This cognitive tax wastes time and mental energy across the industry. Early computing followed better patterns (grep, sed, FORTRAN, COBOL), but around the 2010s, startup culture and GitHub popularized quirky naming. The solution is cultural: prioritize clarity over creativity, use descriptive compound terms, and reserve cute names for mascots rather than the tools themselves.

  25. 25
    Article
    Avatar of hnHacker News·19w

    stoolap/stoolap: A Modern Embedded SQL Database written in Rust

    Stoolap is an embedded SQL database written in Rust that supports both in-memory and persistent storage with ACID compliance. It features MVCC transactions with two isolation levels, time-travel queries for historical data access, multiple index types (B-tree, Hash, Bitmap), window functions, CTEs including recursive queries, and a cost-based query optimizer. The database includes 100+ built-in functions across string, math, date/time, JSON, aggregate, and window categories. It uses write-ahead logging with periodic snapshots for durability and can be used as a library or via command-line interface.