TLDR Web Dev

TLDR WEB DEV 2024-04-08

5 sections14 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01ARTICLES & TUTORIALS

THE LIFECYCLE OF A CODE AI COMPLETION

Code completion tools provide background LLMs with the right context, such as related files and code snippets from the project. This process, known as retrieval augmented generation (RAG), helps guide LLMs to produce more accurate code completions. Sourcegraph's team has detailed the engineering optimizations they implemented to improve code suggestion quality and speed with Cody autocomplete. For example, they found that including whitespace at the end of prompts causes significantly worse responses.

sourcegraph.com30 min read

GLOBAL PROGRESS IN NEXT.JS

The solution presented in this article adds a loading progress bar to Next.js sites using a custom ‘useProgress’ hook and a ‘ProgressLink’ component, making page transitions smooth without needing router events. It keeps sites responsive and interactive during loads by utilizing React’s ‘startTransition’. The method is future-proof and improves the user experience.

buildui.com14 min read

02OPINIONS & ADVICE

HIGH-FUNCTIONING WORKAHOLISM

The typical definition of workaholism focuses on long hours, which typically comes with negative consequences. True "high-functioning" workaholism affects a person's well-being (like sleep and healthy habits). It is about maximizing output within a set window of time rather than simply working more hours.

dodov.dev6 min read

EXACTLY WHAT TO SAY IN CODE REVIEWS

When giving feedback in code reviews, use gentle questions like "I wonder" and "What do you think" to keep the conversation friendly. Avoid "why" questions - use "what" instead to be less direct. Choose softer words to help everyone feel comfortable and open to suggestions. This way, you can share ideas without making anyone defensive.

open.substack.com12 min read

SHIPPING CODE FASTER

To ship code faster, identify where you spend most of your time: design, coding, testing, review, or deployment. If you’re new to a codebase, focus on understanding code flow, tracing techniques, and learning from experienced colleagues. To optimize testing and review, use feature flags, batch changes, automate testing, and aim for smaller, well-explained code changes for faster reviews.

developing.dev3 min read

03LAUNCHES & TOOLS

AUTOMQ

AutoMQ is a cloud-native implementation for Apache Kafka. It’s serverless, works with any cloud provider, and can cut your cloud infrastructure bill by up to 90%.

github.comGitHub repository

CLANGQL

ClangQL is a tool that allows you to run SQL-like queries on C/C++ Code instead of database files using the GitQL SDK.

github.comGitHub repository

PGMOCK

pgmock is an in-memory PostgreSQL mock server for unit and E2E tests. It requires no external dependencies and runs entirely within WebAssembly on both Node.js and the browser.

github.comGitHub repository

04MISCELLANEOUS

HOW GOOGLE BUILT AN OPEN SOURCE AI TO PROVIDE ACCURATE FLOOD WARNINGS FOR 460 MILLION PEOPLE

Google AI is helping to predict floods better, which could save lots of people and money around the world every year. Utilizing machine learning, particularly LSTM models, Google AI has significantly improved the accuracy and extended the reliability of flood predictions, especially in data-scarce regions like Africa and Asia. It advocates for open-source collaboration, targeted AI investments, and the development of a robust data infrastructure.

open.substack.com25 min read

GOOGLE PUBLIC DNS’S APPROACH TO FIGHT AGAINST CACHE POISONING ATTACKS

DNS cache poisoning attacks exploit weaknesses in DNS to redirect users to malicious sites. Google Public DNS protects against these attacks using a few techniques. It randomizes cases, altering the capitalization of domain names. This protects over 90% of Google Public DNS traffic. Google also uses DNS-over-TLS (ADoT) to encrypt communications with authoritative nameservers.

security.googleblog.com5 min read