TLDR Web Dev

TLDR WEB DEV 2024-07-18

5 sections16 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

HOW WE SPED UP NOTION IN THE BROWSER WITH WASM SQLITE

Notion sped up its web browser application by implementing SQLite caching using WebAssembly. It faced challenges with cross-origin isolation and data corruption due to concurrency issues when multiple tabs accessed the database simultaneously. Notion resolved these issues by developing a SharedWorker architecture where only one tab actively interacts with the SQLite database while others can still make queries. It also addressed regressions like slower load times and performance issues on slow devices by loading the WASM SQLite library asynchronously and implementing a “race” mechanism between SQLite and API requests.

notion.so12 min read

DESIGN A GRAPHQL SCHEMA SO GOOD, IT'LL MAKE REST APIS CRY

The first step to building a well-designed GraphQL schema is to identify the core types in your domain, like Company and JobListing, and then define the relationships between these types. Next, plan query and mutation operations that clients can perform on your API, such as creating or updating job listings. Finally, document your schema thoroughly and use tools to visualize the relationships in your schema.

tailcall.run9 min read

JAVA VIRTUAL THREADS: A CASE STUDY

Virtual threads in Java do not offer a clear advantage over Open Liberty's existing autonomic thread pool for typical cloud-native Java workloads. Open Liberty is an open-source, modular, cloud-native Java application runtime. In CPU-intensive workloads, virtual threads perform worse, with lower throughput than Open Liberty's thread pool. However, virtual threads do ramp up faster from idle to maximum throughput compared to Open Liberty's thread pool due to its thread-per-request model.

infoq.com19 min read

02OPINIONS & ADVICE

WHY, AFTER 8 YEARS, I STILL LIKE GRAPHQL SOMETIMES IN THE RIGHT CONTEXT

Persisted queries are essential for a solid GraphQL API. Authorization is a challenge regardless of API style. While there is a need for `dataloader` to address performance concerns, the claim made by others that authorization problems are unique to GraphQL is untrue. GraphQL encourages continuous evolution, not breaking changes. It allows for precise tracking of API usage.

magiroux.com9 min read

A PYTHON EPOCH TIMESTAMP TIMEZONE TRAP

Python's datetime module can cause confusion when converting between timestamps and datetime objects due to timezone issues. The time.time() function returns a timestamp relative to epoch (UTC), while datetime.datetime.now() returns a timezone-naive object in the local timezone. This discrepancy can lead to incorrect results when converting timestamps back to datetime objects on systems with non-UTC timezones.

nerderati.com6 min read

A TYPESCRIPTER'S TAKE ON ZIG

This developer, who completes Advent of Code in a new programming language every year, chose Zig for 2023 and found it to be a modernized C with a unique approach to error handling and type manipulation. Zig's standout features include detectable illegal behavior and comptime, which offer improved error detection and type-level programming capabilities respectively. However, Zig could benefit from enhancements in developer experience, including a better language server, clearer error messages, and improved documentation.

effectivetypescript.com35 min read

03LAUNCHES & TOOLS

IMPORT AND EXPORT MARKDOWN IN GOOGLE DOCS

Google Docs has introduced new features to convert Markdown to Docs content and vice-versa, export Docs as Markdown, and import Markdown files as Docs.

workspaceupdates.googleblog.com1 min read

MAGIC CLI

Magic CLI is a command line utility that uses LLMs to help you use the command line more efficiently.

github.comGitHub repository

REACT-CODEMIRROR

This is a CodeMirror component for React. CodeMirror is a code editor component for the web, with a rich, comprehensive API that is easy to configure. This React-specific component supports React hooks, TypeScript, and more.

uiwjs.github.ioTool

04MISCELLANEOUS

PANIC! AT THE TECH JOB MARKET

The tech job market is facing a downturn due to rising interest rates, which affect different types of tech companies differently. On top of that, the hiring process in tech is often broken, relying on standardized practices like coding tests and behavioral interviews that may not accurately assess a candidate's abilities or experience. Companies often have unrealistic expectations and job descriptions, leading to burnout and high turnover.

matt.sh56 min read

JAILBREAKING RABBITOS: UNCOVERING SECRET LOGS, AND GPL VIOLATIONS

David Buchanan bought a Rabbit R1, a device that has been criticized for its poor performance. He developed a tethered jailbreak that gives root access to the device without making any permanent changes. He also found that the device logs extensive user data, including GPS location, WiFi network name, and nearby cell tower IDs. While Rabbit Inc. has since addressed the logging issue and added a factory reset option, Buchanan is still releasing his jailbreak tool to help other researchers analyze the device.

da.vidbuchanan.co.uk21 min read

ARTIFACTING

The JPEG format became the dominant way to share digital photos online due to its lossy compression, which allows for smaller file sizes and faster transmission over the internet. Unlike the GIF, which was created by a single person, the JPEG is a complete standard designed to meet a range of industry needs. The format's success is due to its ability to balance the need for photorealistic images with the requirement for efficient delivery in limited bandwidth environments.

tedium.co19 min read