TLDR Web Dev

TLDR WEB DEV 2024-05-20

5 sections18 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

JUST SAY NO TO MORE END-TO-END TESTS

A testing strategy that relies heavily on end-to-end tests can cause a lot of issues in reality. While end-to-end tests seem like a good idea in theory, they often lead to delays in bug identification and fixes, as well as flaky test results. Instead, a better approach is to focus on unit tests and integration tests, which are often faster and more reliable.

testing.googleblog.com9 min read

VISUALIZING ALGORITHMS FOR RATE LIMITING

Rate limiting is used to control traffic on a service by blocking requests that exceed a set limit. Three common algorithms for rate limiting are fixed windows, sliding windows, and token buckets. Fixed windows are easy to understand and implement, sliding windows are better for high traffic, and token buckets allow for bursts of traffic while enforcing a long-term average rate.

smudge.ai8 min read

HOW TO DOCUMENT YOUR JAVASCRIPT PACKAGE

JSDoc is used to document JavaScript packages. It helps users understand how to use your code and provides additional context within their workflow. The key is to provide clear and concise information: write succinct summaries, include accurate type information, use tags to describe parameters and return values, and provide examples for clarity.

deno.com15 min read

02OPINIONS & ADVICE

SYSTEM TESTS HAVE FAILED

System tests often fail to live up to their promise. They are slow, prone to errors, and rarely provide a good return on investment. While they can be useful for basic functionality checks, they are not the best tool for testing business logic or UI interactions compared to manual testing.

world.hey.com2 min read

BUILDING A WAITLIST (THE WRONG WAY)

This developer used a waitlist approach to validate the demand for their failed product, PresetBot, an API to apply Lightroom presets on images. They used Google Ads to drive traffic to a landing page, but after attracting 250 signups and building the product, no one purchased it. The developer realized that most of the signups were likely from bots and click farms.

jrhizor.dev6 min read

03LAUNCHES & TOOLS

Sponsored

🆕 INTRODUCING THE NEW NEXT.JS RUNTIME ON NETLIFY

Got a Next.js project in the works? Check out Netlify's recent launch of Next.js Runtime v5 [11]—focused on improving site reliability, performance, and ease of maintenance. Developers now have access to powerful features [11] such as App Router, automatic fine-grained caching, on-demand + time-based revalidation, and more.

netlify.comSponsor

BEND

Bend is a massively parallel, high-level programming language. It has the feeling and features of Python while also having the speed and parallelization capabilities of lower-level languages.

github.comGitHub repository

LIGHTWEIGHT CHARTS

Lightweight Charts is an easy way to display interactive charts online with HTML5. It keeps web page loading speeds low and the size of the library is close to static images.

github.comGitHub repository

MERGING REMIX AND REACT ROUTER

Remix and React Router are converging, with Remix's features being integrated into React Router v7 to streamline the upgrade process for users.

remix.run7 min read

04MISCELLANEOUS

CHATGPT CAN TALK, BUT OPENAI EMPLOYEES SURE CAN'T

OpenAI's announcement of GPT-4o's new talking ability was overshadowed by the resignation of two key figures on its superalignment team, Ilya Sutskever and Jan Leike. While Sutskever gave a standard resignation message, Leike resigned due to conflicts about the direction OpenAI was going safety-wise.

vox.com8 min read

CODING MY HANDWRITING

This developer created cursive handwriting for their web projects. They created a tool to manually define paths for each letter, then adjusted these paths based on the surrounding letters to connect them smoothly.

amygoodchild.com8 min read

ASK HN: SAAS SUBSCRIPTION OR USAGE-BASED PRICING? (HACKER NEWS THREAD)

Usage-based pricing is great for core infrastructure for applications, where the growth of your customers' business means their spend with your business will also grow. Subscription pricing works best for end-user tools that help a certain function do their job better.

news.ycombinator.com