This article presents an overview of how Linux hibernates, focusing on the initial steps leading up to the system freeze. It starts by examining the system files /sys/power/state and /sys/power/disk, which serve as entry points for debugging and controlling hibernation. It then explores the autosleep mechanism, a feature borrowed from Android, which automatically suspends or hibernates the system when it's inactive. Finally, it goes over the steps involved in preparing the system for hibernation, including locking the system, preparing the console, notifying power management components, and synchronizing filesystems to disk.
The AT Protocol is a technology by Bluesky designed for open social networking. It utilizes a decentralized backend architecture that leverages a shared data model called the "user data repository". This allows applications to share data and interact easily.
Google's dominance in the advertising and tech industries is a major threat to innovation and democracy. Its business model, built on controlling both the buyers and sellers of ads, has led to ongoing antitrust trials.
A programmer discovered a bug in his code that failed to correctly identify negative dollar figures due to variations in hyphen characters in Unicode and he fixed it by using Unicode categories to identify any preceding dash.
An open research discussion board built directly on top of ArXiv to discuss papers.
The "preload" attribute in HTML improves website performance by preloading necessary files, such as fonts and data fetched by JavaScript, so the browser downloads them simultaneously.
A detailed conversation with two of VSCode's principal engineers on how it was built.
OAuth 2.0 authorization with PKCE is a standard way for third-party apps to authenticate users on websites. This article starts with a basic example of a user sharing their credentials with an app, then progressively introduces security flaws and their corresponding solutions. It breaks down each attack, explaining how it works and how the OAuth flow is improved to prevent it.
In benchmarks of server-side rendering (SSR) across frontend frameworks, like React, Vue, Svelte, and Solid, fastify-html and Vue are the top performers. Svelte and Solid are close behind, while React and Preact are significantly slower. As a result, Vue and Svelte provide the best balance of SSR performance and ecosystem maturity.
React 19 beta introduces new hooks like useTransition and useActionState to streamline async handling, improve form management, and enable optimistic updates for smoother user experiences. These features reduce unnecessary re-renders, automate state management, and improve UI responsiveness during async operations.
This Hacker News post discusses the effects of burnout on the brain, with the original poster describing a decline in cognitive function, learning ability, and problem-solving skills. One commenter shares their personal experience of burnout and how setting boundaries and prioritizing personal well-being prevents it. Others talk about various techniques to combat it, most of which involve recognizing burnout symptoms early and addressing them before they become too much.
PostgreSQL users should stop using the "serial" data type and switch to "identity" columns instead. There are several issues with "serial," including its lack of integrity guarantees, awkward ergonomics, and non-compliance with SQL standards. "Identity" columns, on the other hand, offer better safety, easier management, and align with SQL standards.
This developer self-hosts a large number of services, including a 3-node Proxmox cluster and an external VPS. Self-hosting has taught him valuable lessons about complex systems, from the importance of redundant DNS to the silent failures of aging UPS batteries. In this post, he goes over some classic technologies he works with that he still finds relevant along with how to choose the right VPS providers.
Claude Memory is a Chrome extension that improves interactions with Claude by providing memory functionality. It allows users to store and retrieve important information from their conversations with Claude such as preferences, making interactions more personalized and context-aware.
Redwood v8 (a full-stack JS framework) introduces background jobs for handling non-immediate tasks, simplifies SSR and RSC setup, and improves Storybook by switching to Vite. It also includes Docker support and updates to core packages like React, Prisma, and Vite. Breaking changes include the removal of Webpack, updates to NavLink's class handling, and recommended database structure changes for Prisma.
Qustar is a TypeScript-powered, array-like API for querying SQL databases. It offers a high-level query builder and support for PostgreSQL, SQLite, MySQL, MariaDB, and raw SQL execution.
Tech companies should pay their engineers more, especially those with long tenures. Companies often fail to adequately compensate engineers for their accumulated expertise and impact, which leads to higher turnover and attrition. An impact-based compensation structure where salaries are determined by an individual's contribution to the company might be a better way to keep the best employees and pay them well.
Google has presented a practical approach to gradually introduce Rust into existing firmware codebases. The approach replaces new and high-risk code with Rust using drop-in Rust replacements for C functions. In this post, the Google team shows readers how to build Rust code in bare-metal environments, covering how to choose and port libraries, create custom targets, and integrate Rust panic handlers and allocators.
This article shows how to wrap the C++ `std::regex` library in a clean C interface for use in C projects. This is done by creating a custom allocator that utilizes an arena-based memory management system, preventing the need for individual object deallocation and eliminating the use of `new` and `delete` within the C++ library. By doing this, the C++ regex library can be used without directly exposing its C++ objects to the C code while still benefiting from the existing functionality of `std::regex`.
People should understand their manager's true priorities and prioritize work that aligns with those expectations, unspoken or not.
TinyStatus is a customizable status page generator that helps you easily monitor and display the health of your services.
This is a WebGPU implementation of Nanite, a technology for rendering massive 3D scenes with high detail, that uses meshlet LOD, software rasterization, and billboard impostors.
This article explores lesser-known but still useful modules within the Python standard library, like advanced data structures, context managers, decimal and fraction handling, bytecode disassembling, statistical analysis, web browser opening, and packaging Python code into single-file applications.
Sponsored
Stytch provides complete auth infrastructure for developers (far beyond basic widgets) _and_ built-in fraud and risk prevention in a single, API-first platform [5].
Using boolean flags in function parameters is a trap - enums should probably be used instead. Boolean flags can lead to confusion and maintenance issues, especially when dealing with multiple output types. While boolean flags can be appropriate in specific cases, enums are generally preferable for API and function parameters because they are more readable, maintainable, extensible, and future-proof.
CSS's @property is a new at-rule allowing explicit definition of custom property syntax, initial value, and inheritance. This article shows how @property enables smooth animations and transitions, demonstrated by a shiny animated button with rotating gradients, a silky smooth hover effect, and tiny shimmering dots. @property lets developers create intricate designs and complex animations, previously difficult or impossible with standard CSS.
Component testing may be the future of UI testing. While end-to-end (E2E) tests provide the highest fidelity, they are often impractical for comprehensive UI coverage due to slow execution, difficulty in managing complex states, and setup overhead. Component tests, on the other hand, offer a balance between unit tests and E2E tests, allowing for both faster and more reliable testing. Component tests are not necessarily a replacement for E2E tests, but rather a complement.
Explicit code is better than implicit code because implicit code has a higher number of WTFs per minute (basically being more frustrating and confusing). This post presents two code examples to make this point, showing how explicit code makes it easier to understand and maintain the codebase by clearly defining variables and permissions.
Jaana Dogan, a Principal Engineer at Google, wrote a post about database-related issues commonly overlooked. It emphasizes the importance of understanding nuances like ACID compliance, isolation levels, and data consistency. It also talks about the pitfalls of auto-incrementing primary keys, optimistic locking, write skews, and clock skews.
2024.09.05·links.tldrnewsletter.com·19 min read·TLDR Web Dev @svg-use is a set of tools and bundler plugins that facilitate the use of 'use href' for better SVG loading in a React context. It's more efficient than the current common practice of inlining SVG as JS code.
This is an open-source starter kit for building production-ready SaaS applications. It uses a curated stack of tools, including Next.js, Supabase, and TailwindCSS, organized as a monorepo with a focus on code reuse and best practices.
FetchFox is a Chrome extension for extracting any data from any website. It takes the raw text of a website and uses AI to extract data the user is looking for.
There was a subtle off-by-one error during the European Climbing Championships in Villars-sur-Ollon. A hold on the right-hand side of the wall was off by one position compared to its counterpart on the left side. Despite the error going unnoticed for years, this author spotted it because he had a reference point from a previous competition and was not visually fatigued by repeated exposure to the same wall.
Intel once dominated the chip industry. Despite its historic success, Intel's failure to adapt to changing market demands, particularly in mobile and AI, has led to a situation where its foundry business, Intel Foundry, is struggling to compete with industry leaders like TSMC. Intel Foundry's existence is no longer justified by market forces and the U.S. government will need to provide substantial financial support, such as purchase guarantees, for it to survive.
Airbnb manages the challenge of idempotency in payment processing by coordinating both client and server systems to avoid double charges, despite the technical impossibility of "exactly-once" delivery in distributed systems. Airbnb's approach involves splitting requests into phases and ensuring mutual exclusion to handle retries effectively.
The TSConfig Cheat Sheet is a guide to configuring TypeScript's tsconfig.json file - it includes a cheatsheet of recommended base, strictness, and project-specific options.
This Code Review Anxiety Workbook provides self-guided cognitive-behavioral exercises to help developers reduce their code review anxiety.
2024.09.05·developer-success-lab.gitbook.io·Tool·TLDR Web Dev Srcbook is an open-source, interactive programming environment for TypeScript that allows users to create, run, and share reproducible programs and ideas locally with a web interface.
Ligo has open-sourced its implementation of AlphaFold3, letting researchers use the protein structure prediction model freely.
Sponsored
Are you struggling with lengthy turnaround times for website and app updates?
You can extract the type of an array element in TypeScript using the "Array[number]" syntax, which can be useful for creating enums from arrays and extracting specific types from complex data structures. This technique is called an indexed access type, which lets you access a property on a type by its key. In the case of arrays, using "number" as the key retrieves the type of the array's elements.
Wikifunctions, a Wikimedia Foundation project under development, made improvements in system performance, particularly in the speed of function calls. Its team pre-loaded WASM into a pool of ready threads, which led to faster single and saturated requests. They also implemented a variety of front-end improvements, bug fixes, and code enhancements, including a re-write of front-end styling code and a feature flag for WikiLambda code installation on other wikis.
The new Performance Panel features in Chrome DevTools provide detailed insights and tools for optimizing Core Web Vitals and overall web performance. This tutorial explains how to access and configure these features. It also goes over how to interpret lab and field data, along with practical tips for fixing LCP, CLS, and INP issues using the new Performance Panel features.
“Sanding” a user interface involves repeatedly clicking through the UI, testing its functionality, and identifying any issues or "splinters" that might disrupt user experience. As an example, a developer encountered a problem where a gap in a flexbox layout created a dead zone that prevented users from interacting with a radio button. By removing the gap and adding padding to the label, he eliminated the problem and smoothed out the user experience.
Steve Huynh, a former Amazon Principal Engineer, shares his "Tech Promotion Algorithm," a three-step strategy for career advancement. The algorithm encourages engineers to identify their biggest gaps in skills and performance, formulate a plan by working backward from desired evidence of success, and then execute the plan while seeking regular feedback.
2024.09.04·read.highgrowthengineer.com·10 min read·TLDR Web Dev This developer built a mid-sized Next.js application with Supabase and, as a result, he recommends using server components for data fetching, server actions for data mutations, and shared utility wrappers for authorization, validation, and authentication. In terms of database design, the developer emphasizes the importance of using surrogate keys, implementing row-level security (RLS) in a performant way, and utilizing server-side routing for mutations.
Sponsored
Reach software developers, executives and other tech professionals reading TLDR every day. TLDR offers 10 interest-based newsletters to help you get in front of your target audience. Learn more [11] about running your first campaign with us.
Vue 3.5 has performance enhancements, including a reactivity system refactor resulting in improved memory usage and faster reactivity tracking for large arrays. The release also includes several new features, such as reactive props destructuring for easier prop declaration, SSR improvements like lazy hydration and a stable ID generation API (useId), and enhancements to the defineCustomElement API for creating custom elements.