TLDR Web Dev 2024-03-25

Open-source Devin 🤖, efficient JavaScript guide ⚡️, the reality of staff devs 🤔

🧑‍💻
Articles & Tutorials

Optimizing Javascript for fun and for profit (24 minute read)

This is a summary of common JavaScript optimization techniques and ways to benchmark performance. Some common practices that can actually hurt performance include string comparison, operating on objects of different shapes, and array/object methods like map, reduce, and filter.

Designing a Pure Python Web Framework (9 minute read)

Reflex is a Python-based web framework where apps are built using composable Python functions as components. Under the hood, it compiles frontend code into a React app and backend logic into a FastAPI server. State and logic are defined in a Python State class, bridging event handling and communication between the frontend and backend. Reflex uses WebSockets to send events from the frontend to the backend and update state accordingly.

How We Built a Custom Permissions DSL at Figma (22 minute read)

Figma had a complex permissions setup, the implementation of which was causing tech debt, bugs, and delays. After not finding any open source answers, its team built a cross-platform DSL (domain specific language) that isolated policies and data while improving performance, accuracy, and developer ergonomics. This is a good case study on problem discovery and building an MVP all the way to a performant and long-lasting solution.
🧠
Opinions & Advice

People who have made the jump from "senior" to "staff" dev, how is it working out? (Reddit Thread)

Staff engineers generally code less than senior engineers and instead need to show impact on an organizational level. This means that the scope of work is often vague and staff engineers have to spend more of their time building cross-functional relationships and getting people excited about their ideas. While they occasionally code, most of their technical work is at a higher level, like architecture and design.

Programmers are bad at managing state (4 minute read)

The age-old tech support advice, "turn it off and on again," is surprisingly effective because it resets programs to a known good state. Software complexity makes it impossible to anticipate every possible state or interaction a user might encounter. Solutions like dedicated uninstaller programs and browser "refresh" features offer users an easy way to reset state. Most software programs for users should provide a way to reset state as a way to deal with unforeseen bugs.

Why I love the way C++ sucks (13 minute read)

C++ has a reputation for being confusing, but it can still be enjoyable due to its powerful type system and other features. C++'s '=' syntax can have nuanced behavior, allowing for fine-grained, flexible control over how objects interact. Since C++ is so verbose and specific, the possibilities for programming in C++ are endless.
🚀
Launches & Tools

Monolith (GitHub Repo)

Monolith is a CLI tool for saving complete web pages as a single HTML file.

OpenDevin (GitHub Repo)

OpenDevin is an open-source project aiming to replicate Devin, the recently-unveiled AI software engineer capable of executing engineering tasks.

oneRepo (Website)

oneRepo provides JavaScript and TypeScript monorepo management tools. It handles common tasks automatically, has strict safety and checks, and provides human-readable output for logs.
🎁
Miscellaneous

Ask HN: How common is developer burnout? Have you ever been burnt out? (Hacker News Thread)

Developer burnout occurs for different reasons, depending on the person. For some people, they don’t mind working long hours as long as they are passionate about the work they are doing. Others find that money or status doesn’t matter to them as long as they have great coworkers, a short commute, and work that ends at the same time every day.

How I reduced (incremental) Rust compile times by up to 40% (3 minute read)

Frustrated by slow Rust compile times, this author modified the Rust compiler (rustc) to cache procedural macro expansions. They focused on improving incremental build times, which yielded 11-40% faster incremental builds in real-world projects.

When Postgres is not enough: performance evaluation of PostgreSQL vs. Distributed DBMSs (13 minute read)

PostgreSQL is highly CPU efficient and performs well on a single server, but sometimes struggles with horizontal scaling and replication can be a significant bottleneck. Distributed databases can scale more easily in modest cluster setups, outperforming PostgreSQL in this aspect.
⚡️
Quick Links

magick.css (Website)

magick.css is a minimalistic, classless CSS framework that is contained in a single file and designed to be easy to use and understand.

3 software development principles I wish I knew earlier in my career (3 minute read)

YAGNI (You Aren't Gonna Need It), KISS (Keep It Simple, Stupid), and DRY (Don't Repeat Yourself) are useful software development principles.

Build time is a collective responsibility (3 minute read)

While compiler improvements are important, developers share the responsibility for build times by understanding their build systems, optimizing code structure, and using language features responsibly.

NVIDIA Just Launched FREE Courses in AI (5 minute read)

Nvidia recently launched a series of AI courses - this is a curation of the 5 best ones for beginners.
Get our free, 5-minute newsletter read by 350,000 frontend, backend, and full stack developers
Join 300,000 readers for