The Boolean Trap (5 minute read)
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 @property and the New Style (9 minute read)
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 in Storybook (11 minute read)
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 is better than implicit (4 minute read)
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.
|
Things I Wished More Developers Knew About Databases (19 minute read)
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.
|
|
Introducing @svg-use (16 minute read)
@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.
|
Midday Create v1 (GitHub Repo)
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 (Website)
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.
|
|
A Real Life Off-By-One Error (6 minute read)
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 Honesty (16 minute read)
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.
|
Exactly-Once Payments At Airbnb (8 minute read)
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 (5 minute read)
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.
|
Srcbook (GitHub Repo)
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.
|
|
Love TLDR? Tell your friends and get rewards!
|
Share your referral link below with friends to get free TLDR swag!
|
|
Track your referrals here.
|
Want to advertise in TLDR? 📰
|
If your company is interested in reaching an audience of web developers and engineering decision makers, you may want to advertise with us.
If you have any comments or feedback, just respond to this email!
Thanks for reading,
Priyam Mohanty, Jenny Xu & Ceora Ford
|
|
|
|