Sponsored
TLDR WEB DEV 2023-12-12
Parse notes
- Subscription/account footer truncated before parsefooter_truncated
01GENERAL
02ARTICLES & TUTORIALS
SIMPLIFYING COMPLEXITY: THE JOURNEY FROM WEBSOCKETS TO HTTP STREAMS
This article discusses the need to capture tablet screen gestures and transmit them to a browser for local actions. To do these actions, the author initially considered using WebSockets for message exchange due to their suitability for handling streams of messages. However, WebSockets were hard to test and debug, so the author eventually moved towards developing with HTTP streaming. HTTP streaming is a method that Airbnb uses to improve its web performance too.
THE HIDDEN DEPTHS OF THE INPUT ELEMENT
The HTML input element can be assigned 1 of 22 attributes, all of which have different behaviors and purposes. This article covers some of the lesser-known input attributes like inputmode, capture, and more. It describes when and why you should use each of them for the best user experience.
03OPINIONS & ADVICE
THREE TYPES OF AI-ASSISTED PROGRAMMERS
While AI can generate code, it often produces mediocre results and its reliability varies. For no-code entrepreneurs, AI can be enticing but may hide underlying issues. Junior developers may benefit from AI tools by learning and improving their skills. Senior engineers can use AI to speed up coding tasks but should not sacrifice code quality for velocity. Each type of programmer is given tips throughout the article to utilize AI effectively as a tool.
BEHAVIOR BELONGS IN THE HTML
This article proposes the idea of using custom attributes, such as "message," to extend the behavior of HTML elements like buttons. By adding custom attributes to HTML elements, you can define their behavior and functionality directly in the HTML markup, making the code more readable and maintainable.
04LAUNCHES & TOOLS
TEMPL
Templ is a way to convert Go into HTML UI.
BRICKSLLM
BricksLLM is a cloud-native AI gateway written in Go. It lets developers create OpenAI API keys that have rate limits, cost limits, and TTLs. These API keys can be used in both production and development since they have fine-grained access control.
05MISCELLANEOUS
EXPLAINING CHATGPT TO ANYONE IN <20 MINUTES
This article introduces a three-part framework for understanding and explaining generative LLMs. The first part covers decoder-only transformer architecture, a deep neural network architecture used for language tasks. The second part covers language model pretraining, where these models are pretrained on large textual datasets using self-supervised learning. The last part is the alignment process, which makes LLMs more useful and aligned with human intent through supervised finetuning (SFT) and reinforcement learning from human feedback (RLHF).
TEXT EDITOR DATA STRUCTURES: RETHINKING UNDO
The concept of undo and redo operations in text editors needs innovation in how they work. Using a graph-based data structure to store undo/redo information allows for a more flexible and intuitive way to navigate and visualize the editing history. Incorporating diffing will show the changes between different editing states, making it easier for users to understand the impact of undo/redo actions.
06QUICK LINKS
IS REACT NATIVE STILL POPULAR? (HACKER NEWS THREAD)
A Hacker News commenter asks if React Native is still used in the industry. Commenters respond with their thoughts, most of whom say yes. However, there are a fair amount of people who also believe native development is a better dev experience.
MOTIVATION — THE SECRETS BEHIND HOW TO CREATE DRIVE IN YOURSELF AND OTHERS
Thoughts on motivation from a director who was genuinely surprised to find a team that remained motivated and in order even when their manager left. The team was used as an example to demonstrate the major components of motivation (autonomy, mastery, purpose). This post outlines tools you can use to build an energizing workspace.
FASTER TESTING WITH ANGULAR AND VITEST
There are many tools for running unit tests in Angular, and Vitest is a new addition. Vitest is built on top of Vite and offers a host of features including snapshot testing, Typescript support, and more. This article explains how to quickly integrate Vitest with Angular and includes code samples that will help you easily replicate the steps.