Programming · Latest articles

30 new today · 2,696 articles · from 79 blogs

Daniel Lemire··Daniel Lemire

Cheaters are Innovators

AI summaryThe article argues that true innovation comes from those willing to bypass or 'cheat' rigid systems rather than seeking approval within them. Instead of convincing established institutions to change, innovators build alternatives—like starting their own platforms or founding companies such as SpaceX—that render the old system unnecessary. The author encourages readers to test ideas independently and find ways to work around existing rules rather than waiting for permission.

Real Python··Real Python

Build an AI Agent From Scratch in Python

AI summaryThis article introduces a Real Python video course that teaches you how to build an AI agent from scratch in Python using only about 90 lines of code and no frameworks. It explains that an agent is a language model wrapped in a harness—an agentic loop that resends the full conversation context with each request and handles tool calls on the model's behalf. It also mentions a related live course where participants write the loop by hand and learn to recognize its components in tools like Claude Code.

Real Python··Real Python

Conditional Statements in Python

AI summaryThis tutorial introduces Python's first control structure, the if statement, which allows conditional execution of a statement or group of statements based on whether an expression evaluates as truthy or falsy. It covers the basic syntax of the if statement—including the required colon and indentation—and explains why control structures need a mechanism for grouping statements into blocks. The article also previews how these concepts combine to enable complex decision-making in Python programs.

Real Python··Real Python

K-Means Clustering in Python: A Practical Guide

AI summaryThis article is a practical tutorial on k-means clustering, an unsupervised machine learning technique used to group data objects into clusters based on similarity. It walks readers through an end-to-end example of implementing k-means clustering in Python with scikit-learn, covering data preprocessing, selecting a meaningful number of clusters, and evaluating results. It also provides an overview of clustering algorithm categories—including partitional, hierarchical, and density-based clustering—to help readers understand where k-means fits and when to use it.

Real Python··Real Python

Quiz: Python Conditional Statements

AI summaryThis article announces a quiz designed to test readers' understanding of Python conditional statements, meant to be taken after completing the site's 'Conditional Statements in Python' tutorial. The page also promotes a 'Python Tricks' email newsletter that delivers short Python tips to subscribers' inboxes every couple of days.

Real Python··Real Python

Quiz: Plotting Declarative Charts With Altair

AI summaryThis article introduces a quiz that tests readers' understanding of plotting declarative charts with Altair, a Python visualization library. By completing the quiz, readers revisit key concepts such as the difference between declarative and imperative charts, the data, mark, and encoding components of an Altair chart, faceting, interactive selections, linked charts, and exporting charts to HTML.

Planet PostgreSQL·

Jobin Augustine: Pre-Calculating HugePages for PostgreSQL

AI summaryThe article explains that HugePages are a critical PostgreSQL tuning step, mainly for stability and reliability, but traditional sizing methods (measuring a running server or using shared_memory_size_in_huge_pages) are impractical in Kubernetes, where the huge page count must be known before a pod is created and errors can cause restarts or silent fallbacks to normal pages. Drawing on the PostgreSQL source code, the author derives a formula that computes the required number of huge pages directly from configuration parameters such as shared_buffers, wal_buffers, max_locks_per_transaction, and track_activity_query_size. The formula was verified against real PostgreSQL 16, 17, and 18 binaries and provides a near-accurate estimate for operators that need to pre-reserve huge pages on nodes.

Planet PostgreSQL·

Aleksei Aleinikov: PostgreSQL VACUUM & Bloat: Dead Tuples, HOT Updates & Compaction

AI summaryThis article explains why DELETE and VACUUM don't shrink PostgreSQL table files—dead tuples are cleared into internal free space via the Free Space Map, and only a table rewrite (like VACUUM FULL or pg_repack) returns disk to the OS when live rows sit at the file's tail. It demonstrates how setting fillfactor to 70 enables 100% HOT updates, eliminating index bloat from non-indexed UPDATE traffic, and covers diagnosing bloat with pg_stat_user_tables and pgstattuple. Finally, it addresses autovacuum tuning challenges including the xmin horizon trap, cost limits and maintenance_work_mem, per-table scale factors, transaction ID wraparound risks, and safe online compaction options like REINDEX CONCURRENTLY and PostgreSQL 19's native REPACK.

Simon Willison··Simon Willison

datasette-charts 0.2a1

AI summaryThis article announces the release of datasette-charts 0.2a1, which introduces several minor UI improvements. Notable changes include keeping charts visible when collapsing the suggestions section, repositioning the panel below the row count line on table pages, and replacing the data table under each chart with Copy TSV and Copy CSV buttons. Additionally, the 'Chart this data' item was removed from the table, view, and query action menus, and chart tooltips now feature more spacing between lines.

Zach Leatherman··Zach Leatherman

Your Tools are Hiding npm Audits from You

AI summaryThis article argues that npm audit results can be misleading because tools like Next.js bundle 139 of their own dependencies outside of standard auditing mechanisms, hiding 3 critical vulnerabilities—more hidden critical vulnerabilities than visible ones in the no-longer-maintained Gatsby. Similar practices of bundling dependencies or suppressing audit output exist in Vite, various create- CLI tools, and package managers like pnpm and yarn, undermining transparency in security auditing. The author built the Prototype Pollution Report, a daily-updating comparison of vulnerability counts across framework ecosystems, to normalize these discrepancies and provide clearer security insight.

Simon Willison··Simon Willison

datasette-charts 0.2a0

AI summarydatasette-charts 0.2a0 is a new charting plugin for Datasette that now integrates with Datasette Agent, allowing users to request charts through chat using the same underlying chart suggestion and generation tools. A demo video shows the agent generating an inline chart of sqlite-utils downloads over time, with charts able to be opened in a chart builder panel alongside the table page. The agent can also detect when the chart in the panel is changed and describe the updated visualization to the user.

Simon Willison··Simon Willison

datasette-agent 0.7a1

AI summaryDatasette Agent 0.7a1 improves navigation within the iframe side panel of chat sessions by supporting fragment hashes, enabling deeper integration with other Datasette plugins that update fragment hashes as users interact with them. This feature was built to fix bugs in the datasette-charts 0.2a0 release.

PostgreSQL News·

Announcing the first Distributed E-Maj version.

AI summaryThe first release, version 0.9.1, of Distributed E-Maj has been announced as a test-purpose add-on to E-Maj that enables reverting data changes recorded across multiple databases to a consistent stable state. It is compatible with E-Maj 5.0.1 and PostgreSQL versions 14 to 19, with the extension available on pgxn.org and github.org. Distributed E-Maj extends E-Maj's 'Change Data Capture' rollback capabilities—normally applied to table groups within a single database—to table groups spread across multiple databases.

Simon Willison··Simon Willison

GLM-5.4: Toward Generalized Coding with Our First Loop Transformer

AI summaryChinese AI lab Z.ai has released GLM-5.4, its first model to use a looped transformer architecture in which weight-shared layers run multiple iterations per forward pass, enabling deeper reasoning without increasing parameter count. The author tested the model through Z.ai's API (requiring a Coding Plan subscription, since the weights are not yet open-sourced) and built an llm-glm plugin to access it. Comparing pelican-drawing outputs across GLM generations, the author noted that 5.3 and 5.4 now resemble OpenAI and Anthropic models, a stark style shift from the distinctive looks of GLM 5.1 and 5.2.

Simon Willison··Simon Willison

Ladybird's first alpha release

AI summaryLadybird, an ambitious new browser implementing most core components itself (HTML parsing, CSS, layout, JavaScript, and WebAssembly), has released its first alpha for macOS and Linux. The author found it fast and lightweight with most websites working properly, though some complex service worker setups still fail. The project's dramatic October gains on web-platform-tests—which pushed it past Safari—were largely driven by AI coding agents, and while promising, the author recommends using it only for anonymous browsing given its immature security posture.

Simon Willison··Simon Willison

llm-glm 0.1

Release: llm-glm 0.1 See my coverage of GLM 5.4. Tags: llm, generative-ai, glm, ai, ai-in-china, llms

.NET Blog··Luis Quintanilla

Run local models in your .NET apps with Llama on Windows

AI summaryLlama on Windows is a free, open-source system tray app built by the Hugging Face and llama.cpp teams that lets you find, download, and chat with open AI models running locally on your PC. It manages a llama.cpp server on localhost that exposes an OpenAI-compatible API, so .NET apps can call local models using the familiar OpenAI client libraries and Microsoft.Extensions.AI's IChatClient, with no API key required. The article walks through installing Llama, downloading a model, and building a .NET 11 file-based chat app with streaming responses and tool calling.

The Old New Thing··Raymond Chen

Having two security products installed at the same time isn’t a great idea, but sometimes you have to do it

AI summaryInstalling multiple security or anti-malware products simultaneously is risky because they may mistake each other for malware, and system-level modifications like detoured functions can create conflicts or deadlocks. Adding each product to the other's exclusion list only partially solves the problem. Nevertheless, large enterprises often feel forced to run multiple security tools (anti-malware, endpoint detection and response, data loss protection, data classification) since no single product meets all their needs, accepting the risk of conflicts.

CSS-Tricks··Steve Frenzel

Using Fallbacks for a Robust Front-End

It’s important to use fallbacks to build a robust front end, either to quietly and discreetly avoid the error or to communicate it to our users. Using Fallbacks for a Robust Front-End originally handwritten and published with love on CSS-Tr