TLDR Web Dev

TLDR WEB DEV 2024-10-03

6 sections19 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01GENERAL

Sponsored

FEATURES

blog.cloudflare.comSponsor

02ARTICLES & TUTORIALS

THE HARDEST BUG INVESTIGATION OF MY CAREER AND THE INSANE CODE THAT CAUSED IT

A weird bug in an augmented reality system caused disorienting visual glitches and interestingly, only happened every Wednesday. After an extensive, months-long investigation involving robotic arms, lasers, and a high-FPS camera, the root cause turned out to be due to a time-translation hack using day-of-week words in German and English neglecting to account for the German word for Wednesday, "Mittwoch." This oversight led to timestamp discrepancies, resulting in the weekly glitches and an unpredictable error correction mechanism.

links.tldrnewsletter.com8 min read

"WE RAN OUT OF COLUMNS" - THE BEST, WORST CODEBASE

This is the story of a massive, poorly designed legacy codebase with a chaotic database structure, including a table with a single column and row used for generating IDs and a manually-updated calendar table. The codebase itself was a mishmash of technologies, with a mix of VB and C#, various JavaScript frameworks, and even a shipping manager built in a weekend by a lone developer. Despite its flaws, developers found the chaotic nature of the system freeing, as they were forced to create isolated, independent solutions within the larger mess.

jimmyhmiller.github.io11 min read

SERIALIZATION IS THE SECRET

JavaScript is a mutable programming language, while Elixir leans towards immutability. While both languages appear to have similar variable assignment behavior, Elixir achieves this through "rebinding," creating new variables with new values instead of mutating existing ones. This immutable approach, along with Elixir's process-based concurrency, eliminates the possibility of race conditions and unexpected state changes that are common in mutable languages.

zachdaniel.dev8 min read

03OPINIONS & ADVICE

HASH ORDERING AND HYRUM'S LAW

Hyrum's Law states that any observable behavior in a system, even if undocumented, will be relied upon by some users. This has massive consequences, especially during large-scale migrations, as users might depend on seemingly insignificant details like hash iteration order. One example is the iteration order of hash tables in Java, which is technically unspecified but often remains stable for years. This can lead to users inadvertently writing code that depends on the order, causing problems during Java version upgrades.

eaftan.github.io5 min read

GOOD PROGRAMMERS WORRY ABOUT DATA STRUCTURES AND THEIR RELATIONSHIPS

Linus Torvalds (the creator of Git and Linux) says that data structures are more important than code in software development since good data structures lead to better code design and maintainability. This developer supports this view with personal experience, describing how restructuring data in a project allowed a team to move faster in the long run. The prioritization is also how Git grew to be the dominant version control system.

read.engineerscodex.com4 min read

HEALTHY PERFORMANCE MANAGEMENT FOR ENGINEERS? IT'S POSSIBLE!

Traditional performance reviews can be ineffective for engineering roles. Instead, a better way to manage performance is by setting clear expectations while also being dynamic, since the nature of development is always changing.

shiftmag.dev6 min read

04LAUNCHES & TOOLS

TINYJS

TinyJS is a JavaScript library for dynamically creating HTML elements with deep property assignment. It makes DOM manipulation easier by allowing you to generate standard HTML tags programmatically, apply properties, append content, and select DOM elements.

github.comGitHub repository

ULTIMATE EXPRESS

Ultimate Express is a drop-in replacement for Express.js that offers faster performance using µWebSockets while maintaining full Express compatibility.

github.comGitHub repository

THE FASTEST MUTEXES

Cosmopolitan Libc's new mutex implementation is much faster than other popular libraries. One of the secrets behind the implementation is nsync, a C library written by a distinguished engineer at Google.

justine.lol10 min read

05MISCELLANEOUS

IN THE LAND OF LLMS, CAN WE DO BETTER MOCK DATA GENERATION?

Using LLMs to generate mock data has proven to be much harder than expected. A team explored using LLMs to generate Rust code for dynamic INSERT queries for their database platform, but found the generated code bad. Eventually, the team developed a hybrid approach, using LLMs to predict faker (Python package) methods for data generation while using topological sorting for accurate insertion order.

neurelo.substack.com16 min read

OFFLINE UX PATTERNS

Expensify's offline UX patterns prioritize "optimistic responses," assuming API requests will succeed when the user is back online and allowing them to proceed as if the action is complete. These responses can be incorporated with or without feedback, where the user is either aware or not aware that a request is pending and/or sent.

github.com10 min read

WEB SCRAPING WITH YOUR WEB BROWSER: WHY NOT?

Web scraping can be effectively done directly within a web browser, despite the widespread reliance on Python and other external tools. While limitations like CORS restrictions exist, they can be overcome with the use of proxy servers. This article shows a simple web scraper built entirely within a web browser using just a few lines of JavaScript code.

8chananon.github.io13 min read