TLDR WEB DEV 2024-10-07
Parse notes
- Subscription/account footer truncated before parsefooter_truncated
01ARTICLES & TUTORIALS
YES, YOU SHOULD USE SQLITE: NOTION'S CREATIVE SQLITE USAGE FOR 20% FASTER LOADS
Notion implemented WebAssembly (WASM) SQLite in its web app. This resulted in a 20% reduction in page navigation latency. To achieve this, its team used Web Workers to offload database operations to background threads and a SharedWorker with the Web Locks API to fix data integrity issues. They also addressed issues of slow disk reads by implementing a "race" between disk cache and network requests.
UNLEASH JAVASCRIPT'S POTENTIAL WITH FUNCTIONAL PROGRAMMING
Functional programming (FP) is the process of composing functions to create software rather than just executing statements. This article goes through JavaScript's data types, functions, and methods and introduces FP techniques, including closures, higher-order functions (map, filter, and reduce), and function composition.
02OPINIONS & ADVICE
RUST NEEDS AN EXTENDED STANDARD LIBRARY
Rust's ecosystem is plagued by fragmentation, with a constant influx of new libraries and frameworks. This fragmentation has led to security concerns as developers are forced to rely on numerous third-party libraries. The proposed solution is an extended standard library, "stdx," providing core functionalities like cryptography, networking, and data handling.
WE DON'T TEST (REDDIT THREAD)
A Reddit user's company's development process involves developers writing and manually testing code because developers are pressured to move on to new tasks constantly. This results in frequent bugs being found in production, leading to blame placed on developers for not testing enough. Advice is given by other Reddit users on how to emphasize testing more, such as making a business case for proper testing to management.
THE CASE AGAINST DOCUMENTING CODE
Excessive code documentation can be inefficient, as it requires time and effort to create and maintain, often leading to outdated and irrelevant information. Instead, in-line documentation within code itself should be preferred, and it's possible that LLMs could make documentation much easier to maintain in the future.
03LAUNCHES & TOOLS
ONE
One is a new React framework designed to simplify web and native app development, built on Vite and offering universal, typed routing. It works with Zero, a client-side database solution. Zero provides data storage and syncing, allowing for small bundle sizes and offline-first capabilities.
LIVEKIT AGENTS
The LiveKit Agents framework is a Python library that allows developers to build real-time AI-driven server programs that can interact with users through text, audio, images, and video. This is the package that OpenAI uses to power its Advanced Voice feature. A JavaScript version of the library is also available.
ESLINT NOW OFFICIALLY SUPPORTS LINTING OF JSON AND MARKDOWN
ESLint has expanded its capabilities to include linting of JSON and Markdown files. To do so, there are new plugins (@eslint/json and @eslint/markdown) that can be used.
04MISCELLANEOUS
PATENT TROLL SABLE PAYS UP, DEDICATES ALL ITS PATENTS TO THE PUBLIC!
Cloudflare won a patent infringement lawsuit against Sable, a patent troll who asserted patents relating to old hardware-based router technologies against Cloudflare's modern software-defined services. A jury found that Cloudflare did not infringe Sable's patent and that the asserted patent claim is invalid. Sable agreed to pay Cloudflare $225,000, grant Cloudflare a royalty-free license to its entire patent portfolio, and dedicate its patents to the public.
PLAYING WITH BOLT AND POSTGRES
BOLT is a binary optimization tool from LLVM that improves PostgreSQL performance. It can significantly increase performance, sometimes by 30-40%, but the effectiveness depends greatly on the profile used to guide the optimization. While BOLT itself may not be directly implemented in PostgreSQL, the learnings from the experiment could help future code and build adjustments generate more efficient executables.
05QUICK LINKS
CARTOGRAPHIST
Cartographist is an experimental web browser that encourages rabbit-holing by using horizontally scrollable panes and a tree-structured outline of browsing history that allows for saving and loading "trails" of research sessions.
CODEAIR
CodeAir is a smartphone-based remote control for VS Code that allows users to transfer files, images, and code between their devices and VS Code, control VS Code instances using voice commands and text, and use AI features for code generation and file analysis.
SOMETIMES THE PRODUCT INNOVATION IS THE DISTRIBUTION
Product innovation often comes from finding novel ways to distribute existing products rather than solely focusing on changing the product itself.
META MOVIE GEN
Meta has released Movie Gen, which uses AI to generate high-quality videos, edit existing ones, and create personalized videos from text inputs.
159 EMPLOYEES ARE LEAVING AUTOMATTIC AS CEO'S FIGHT WITH WP ENGINE ESCALATES
Automattic, the company behind WordPress, saw 159 employees (8.4% of staff) leave after CEO Matt Mullenweg offered a severance package to those who disagreed with his handling of a dispute with WP Engine.